Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod General Support
- » How do I assign a module to a...
How do I assign a module to a Virtuemart category?
Re: How do I assign a module to a Virtuemart category?
Hi Jenna,
Assuming that you have everything else set up right (see the Quick Start guide), you can do the following:
$vm = JomGenius("virtuemart");
if ($vm->check("category_ids = 4, 5, 6")) return XXX;
// replace XXX with the module id to use on categories 4, 5 and 6
The "category_ids" keyword checks for all categories that a product has been directly placed into, not just its primary one.
If you want to check for all categories below a particular category, you can use this instead:
$vm = JomGenius("virtuemart");
if ($vm->check("ancestor_category_ids = 4, 5")) return XXX;
// replace XXX with the module id to use on categories 4 & 5,
// and all their subcategories, and all their subcategories...
There are lots of other possibilities on the VM Recipe Page:
http://www.metamodpro.com/metamod/recip … mart-pages
Cheers,
Stephen
- Index
- » MetaMod
- » MetaMod General Support
- » How do I assign a module to a...
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5943
- Posts this week:
- 2
- User Info:
- Total Users:
- 7644
- Newest User:
- melton7386
- Members Online:
- 2
- Guests Online:
- 157
- Online:
- melton7386, ulmer60661
Forum Legend:
Topic
New
Locked
Sticky
Active
New/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky/Active/Locked