Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod General Support
- » Exclude modules on all pages unless...
Exclude modules on all pages unless specified - virtuemart
Exclude modules on all pages unless specified - virtuemart
Hi All!
We have an urgent problem -
Modules are appearing on some virtuemart pages. We have tried using
$remove = false;
if ( $option == "com_virtuemart" ) {
$page = JRequest::getVar("page");
if ($page == "shop.cart") $remove = true;
if ($page == "checkout.index") $remove = true;
}
// replace XXX, YYY, ZZZ with the modules to be shown in this position
if ($remove == false) return "104";
And adding new if line for each page we see modules, but the problem is the modules still appear on 'proceed to payment' screens.
Is there a way to setup module to appear on product detail page only? And ignore all other pages?
Your help is much appreciated!!!
05-Oct-11 14:43:57
Re: Exclude modules on all pages unless specified - virtuemart
Figured this one out. Code is basically the opposite
$remove = true;
if ( $option == "com_virtuemart" ) {
$page = JRequest::getVar("page");
if ($page == "shop.product_details") $remove = false;
}
// replace XXX, YYY, ZZZ with the modules to be shown in this position
if ($remove == false) return "99";
Hope this helps someone!
Re: Exclude modules on all pages unless specified - virtuemart
Or even faster:
$vm = JomGenius("virtuemart");// do this once before using $vm variable
if ($vm->check("pagetype = shop.product_details")) return 99;
See the recipes page for VM for more examples:
http://www.metamodpro.com/metamod/recip … mart-pages
Cheers,
Stephen
- Index
- » MetaMod
- » MetaMod General Support
- » Exclude modules on all pages unless...
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5944
- Posts this week:
- 1
- User Info:
- Total Users:
- 7671
- Newest User:
- kiresidencescondo2
- Members Online:
- 1
- Guests Online:
- 154
- Online:
- eugene4916
Forum Legend:
Topic
New
Locked
Sticky
Active
New/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky/Active/Locked