Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

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

Edited By: rainman
18-Sep-11 23:57:43

rainman
Beginner Modder
ranks
useravatar
Offline
5 Posts
Administrator has disabled public posting

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

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3312 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1667
Total Polls:
6
Total Posts:
5909
Posts this week:
1
User Info:
 
Total Users:
10137
Newest User:
lexispoker1
Members Online:
1
Guests Online:
213

Online: 
liaskas

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked