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.

 

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!!!

Edited By: jsbrown
05-Oct-11 13:43:57

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

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!

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

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

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
3329 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1684
Total Polls:
6
Total Posts:
5940
Posts this week:
1
User Info:
 
Total Users:
5161
Newest User:
kbmgkey234q
Members Online:
0
Guests Online:
137

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