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.

 

Module on few virtuemart categories and product pages

Module on few virtuemart categories and product pages

Hello.
I want to display few different modules on virtuemart categories and product pages.
Example:
- module ID 111 display on categories 111;112;113;114;115 and product pages in this categories;
- module ID 222 display on categories 222;223;224;225;226 and product pages in this categories;

I have modules (didn't assigned them to menu, they are published).
Could You please give me the recipe for this?

Edited By: PreArt
02-Oct-12 22:22:01

PreArt
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Re: Module on few virtuemart categories and product pages

I found a solution to display specific module on list of categories:

Code:

$vm = JomGenius("virtuemart"); 

if ($vm->check("category_ids = 1, 2, 3 ")) return 111;

but I need code to display the same module on product pages in those categories. Please help me with that.

Edit:
eh. It was a simple solution:

Code:

$vm = JomGenius("virtuemart"); 

if ($vm->check("ancestor_category_ids = 123")) return 111;

PreArt
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Re: Module on few virtuemart categories and product pages

Yes, that's the one!

Glad you found it,
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:
5914
Total Posts Today:
1
User Info:
 
Total Users:
10816
Newest User:
sakmy567q
Members Online:
0
Guests Online:
172

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