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 Module on productdetails Pages of VM2

Exclude Module on productdetails Pages of VM2

Hey there,

I am trying to use MetaMod Pro to exclude the cherry picker VM module from appearing on the productdetails page.  I did this previously with J1.5, V1.1, and MetaMod Pro a few years back using this code:

$vm = JomGenius("virtuemart");
if ( $vm->check("pagetype = shop.product_details") ) {
  $changes->mod(154)->disable();
}

I tried changing that code in J2.5 and VM2 using the following:

$vm = JomGenius("virtuemart");
if ( $vm->check("pagetype = productdetails") ) {
  $changes->mod(154)->disable();
}

Unfortunately, this did not work and I checked that the mod ID is correct.  Any help on this?  Thanks!

mschwartz
Beginner Modder
ranks
useravatar
Offline
3 Posts
Administrator has disabled public posting

Re: Exclude Module on productdetails Pages of VM2

Can anybody help me on this?  Please let me know if I need to provide more info.  Thanks!

mschwartz
Beginner Modder
ranks
useravatar
Offline
3 Posts
Administrator has disabled public posting

Re: Exclude Module on productdetails Pages of VM2

Hi,

yes, for Chameleon on VM2.0 you the page is renamed productdetails, so your latter code should have worked:


$vm = JomGenius("virtuemart");
if ( $vm->check("pagetype = productdetails") ) {
  $changes->mod(154)->disable();
}

Now, remember that disabling a module in this way only works with MetaMod Pro. Do you have Pro installed?

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

Re: Exclude Module on productdetails Pages of VM2

Thanks, it worked this time, I must have been doing something wrong.  Here is my full code to show on category and disable on product details pages for the cherry picker in case anybody else needs it:

$vm = JomGenius("virtuemart");
if ( $vm->check("pagetype = productdetails") ) {
  $changes->mod(101)->disable();
}

$vm = JomGenius("virtuemart");
if ( $vm->check("pagetype = category") ) {
  $changes->mod(101)->enable();
}

Thanks!

mschwartz
Beginner Modder
ranks
useravatar
Offline
3 Posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1667
Total Polls:
6
Total Posts:
5909
Total Posts Today:
1
User Info:
 
Total Users:
10075
Newest User:
rsker57
Members Online:
0
Guests Online:
248

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