Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod General Support
- » Display a module on both shopping...
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;
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
- Index
- » MetaMod
- » MetaMod General Support
- » Display a module on both shopping...
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5944
- Posts this week:
- 2
- User Info:
- Total Users:
- 7658
- Newest User:
- carre82601
- Members Online:
- 0
- Guests Online:
- 154
- 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