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.

 

Display a module on both shopping cart and checkout pages.

Display a module on both shopping cart and checkout pages.

I placed the below code to display a module only on checkout and shopping cart pages. Only checkout pages worked, the shopping cart pages didnt. Please help me identify the problem.

is shop.cart not correct?

$vm = JomGenius("virtuemart"); // need this at the start of every rule
if ( $vm->check( "pagetype != checkout.index" ) ) return 175;

$vm = JomGenius("virtuemart"); // need this at the start of every rule
if ( $vm->check( "pagetype != shop.cart" ) ) return 175;

will.chen
Beginner Modder
ranks
useravatar
Offline
12 Posts
Administrator has disabled public posting

Re: Display a module on both shopping cart and checkout pages.

Hi Will,

If you want a module to appear on 2 types of pages then you can combine them into one rule:

$vm = JomGenius("virtuemart"); // need this at the start of every rule
if ( $vm->check( "pagetype = checkout.index, shop.cart" ) ) return 175;

Note that we're using "pagetype = ..." instead of "pagetype != ..." which you were using.

If you want to reverse this, and place a module on all pages EXCEPT those 2 pages, then do it this way:

$vm = JomGenius("virtuemart"); // need this at the start of every rule
if ( $vm->check( "pagetype = none of checkout.index, shop.cart" ) ) return 175;

i.e. use "= none of ..." instead of "!=".

Hope that helps,
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:
1698
Total Polls:
6
Total Posts:
5944
Posts this week:
4
User Info:
 
Total Users:
5543
Newest User:
aj88
Members Online:
1
Guests Online:
147

Online: 
aj88

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked