Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod Pro
- » MetaMod Pro General Support
- » Need Recipe for Virtuemart
Need Recipe for Virtuemart
Need Recipe for Virtuemart
Hi,
I have MetaMod Pro. My site has Virtuemart attached to the homepage. So that http://mysite.com/index.html goes to the online store with a slideshow at the top. However, in some instances I do not want the slideshow to appear such as when someone is inside the shopping cart and clicks on "Update quantity in cart". However this item is a URL of http://mysite.com/index.html so when it is clicked it shows the slideshow at the top with the shopping cart contents directly below. The debug code does not distinguish it from the homepage, so how do I write a recipe to tell it not to show the slideshow if the "Update quantity in cart" is selected?
Thx
18-Sep-11 23:57:43
Re: Need Recipe for Virtuemart
Hi Rainman,
the MetaMod debug code doesn't give you anything when a POST request has been done, only when a normal GET is done. Therefore that's not much help when you're trying to identify the "update cart" page.
What you're looking for could be this:
$v = JRequest::getVar("func",null,"POST");
if ($v != "cartUpdate" and $v != "cartDelete") return XXX;
// replace XXX with module id of module to display.
An even better alternative is just to exclude all cart pages, which will include the update and delete pages:
$vm = JomGenius("virtuemart");
if (! $vm->check("pagetype = shop.cart")) return XXX;
// replace XXX with module id of module to display.
Hope that helps,
Stephen
- Index
- » MetaMod Pro
- » MetaMod Pro General Support
- » Need Recipe for Virtuemart
Board Info
- Board Stats:
- Total Topics:
- 1698
- Total Polls:
- 6
- Total Posts:
- 5944
- Posts this week:
- 4
- User Info:
- Total Users:
- 5530
- Newest User:
- lawfood2
- Members Online:
- 0
- Guests Online:
- 118
- Online:
- There are no members online
Forum Legend:
Topic
New
Locked
Sticky
Active
New/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky/Active/Locked