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.

 

display module for particalur VM cats and another module elsewhere

display module for particalur VM cats and another module elsewhere

Hi, I'm hoping for a new recipe from the master chef...

Is it possible to to configure MetaModPro to do this all in the same module position?

Display one module for a particular group of VirtueMart categories, display another module for a different group of categories, display a third module for a every other page on the site.

I look forward to seeing if / how this can be done, thanks in advance

morktron
Beginner Modder
ranks
useravatar
Offline
11 Posts
User info in posts
Administrator has disabled public posting

Re: display module for particalur VM cats and another module elsewhere

Yes, JomGenius to the rescue...

Let's assume that you're going to identify the categories directly, rather than ancestor categories. The following example will display on category pages (where the category is the one listed in each case) and also on product pages, where the product is in the category listed.

$vm = JomGenius("virtuemart");
if ( $vm->check("category_ids = 3, 4, 5, 6") ) return XXX;
if ( $vm->check("category_ids = 7, 8, 9") ) return YYY;
return ZZZ; // any page on the site not matching the previous 2 lines

Replace XXX, YYY and ZZZ with the appropriate module ids to return in each case.

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

Re: display module for particalur VM cats and another module elsewhere

Hi Stephen, thanks so much for your help, I'd be stuck without you and MetaMod Pro! Sorry for my slow reply.

The code works beautifully, check it out here (beware it's an underwear site!)

There is a module for all Mens categories, another for Women and a third one for everywhere else.

Thanks again Stephen your a legend! smile

morktron
Beginner Modder
ranks
useravatar
Offline
11 Posts
User info in posts
Administrator has disabled public posting

Re: display module for particalur VM cats and another module elsewhere

Ahem, yeah, looking good!

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:
1666
Total Polls:
6
Total Posts:
5909
Dormant:
User Info:
 
Total Users:
10093
Newest User:
lamanaudio
Members Online:
0
Guests Online:
272

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