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.

 

Virtuemart recipe help

Virtuemart recipe help

I need help setting up a recipe for virtuemart. I have a virtuemart component set to frotpage and now I would like for modul to appear only on that front page and not on the categories. That means that when vistors click on whatever category the modul shuld disappear. I tried to set Meta mod to show only on the front page but since virtuemart component is assigned to show on front page it had no effect.

What can I do?

rocket
Beginner Modder
ranks
useravatar
Offline
1 Posts
Administrator has disabled public posting

Re: Virtuemart recipe help

When you set up Virtuemart as a component on a menu, the "internal" URL of the page looks something like:

http: //example.com/index.php?option=com_virtuemart&Itemid=83

Even if it's the front page and the URL that the public sees is "http://example.com/", the internal URL contains the option and Itemid information.

When you click on any other Virtuemart link, you get a URL like:

http: //example.com/index.php?option=com_virtuemart&page=shop.product_details&flypage=flypage.tpl&product_id=1&Itemid=74

Therefore, I'd write a rule that checks to see whether $option is "com_virtuemart", and no other categories or pages have been requested.

e.g.

Code:

if ($option == "com_virtuemart" && JRequest::getVar("page") == null && JRequest::getVar("category_id") == null) return 101;

(replace 101 with the module id of the module you want 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
Total Posts Today:
1
User Info:
 
Total Users:
10075
Newest User:
rsker57
Members Online:
0
Guests Online:
169

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