Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod General Support
- » Inserting Module on Both Category...
Inserting Module on Both Category Page and Product Page of Virtuemart
Inserting Module on Both Category Page and Product Page of Virtuemart
Hi, I'm having trouble placing a module on both a category page and a product page by category in my virtuemart installation.
I'm using the following code:
$vm = JomGenius("virtuemart");
if ($vm and $vm->check("pagetype = shop.product_details, shop.browse") ) {
$category_id = $vm->info( "category_id" );
if ($category_id == "1") return 35; /* module 35 for category 1 */
if ($category_id == "2") return 37; /* module 37 for category 2 */
return 39;
}
What's happening is, the module is displaying perfectly on the category page, but on the product page, I'm getting the following error:
Warning: Invalid argument supplied for foreach() in /home/..../modules/mod_metamod/mod_metamod/jomgenius/virtuemart.php on line 840
Any idea what I'm doing wrong?
thanks!
Eli
Re: Inserting Module on Both Category Page and Product Page of Virtuemart
Hi tayellet,
Sorry about the error you were getting - this was due to a bug introduced in the last update to MetaMod.
I've just released a new version, 2.8, downloadable from the Download page:
http://www.metamodpro.com/metamod/download
Just install that over the last version, and I think the error will go away.
Best regards,
Stephen
- Index
- » MetaMod
- » MetaMod General Support
- » Inserting Module on Both Category...
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5942
- Posts this week:
- 2
- User Info:
- Total Users:
- 7628
- Newest User:
- horlogekorting34
- Members Online:
- 1
- Guests Online:
- 138
- Online:
- uistr4qx
Forum Legend:
Topic
New
Locked
Sticky
Active
New/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky/Active/Locked