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.

 

Hide modules in virtuemart

Hide modules in virtuemart

I have some modules that i want to hide specificially in virtuemart category how can i do that ?
Example i have a menu that i have created for homepage only but it is again here in Virtuemart, it's crazy i have just installed Metamod wich is super but i don't understand how to use it for that job ?
Can you give me a resume clear of what doing ?

Thanks a lot.

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

Re: Hide modules in virtuemart

Hi MrJulien,

This is an overview of what we want to achieve:
1 - stop the module appearing in the normal Joomla way (e.g. set it to "disabled")
2 - set up a MetaMod in the module position that the original module is supposed to appear in
3 - set a rule in MetaMod that includes the original module, but NOT when it's in the specific VM category that you mentioned.

Clear?

Ok, so some rules you examine and modify can be found on the VM recipe page:

http://www.metamodpro.com/support/recip … mart-pages

I'd suggest something like this:

Code:

if ($option == "com_virtuemart") {

$category_id = JRequest::getVar("category_id");
$category = JRequest::getVar("category", null);
$page = JRequest::getVar("page");

// on shop browse page, BAN a specific category (55 in this case)
if ($page == "shop.browse" and $category_id == "55") {
   return; // i.e. return NO module, if on the browse page and on category 55
}
else return 101; // replace 101 with the module id you want to display on all other VM pages
}

Hope this does the job,
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
3313 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5913
Dormant:
User Info:
 
Total Users:
10772
Newest User:
alton29318
Members Online:
0
Guests Online:
112

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