Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod General Support
- » Hide modules at Checkout in Virtuemart
Hide modules at Checkout in Virtuemart
Re: Hide modules at Checkout in Virtuemart
I helped out someone with this the other day. Here are the steps I took. There are various ways of doing this, but this is a good one:
1 - move each of the modules that are appearing in the checkout into a new module position. e.g. anything that was in "right", change to "right-non-vm". You can just type these new position names into the dropdown list of module positions, when you are editing each module. (yes, you can just type a new value in there even though it looks like a dropdown).
2 - for each of the original module positions concerned (e.g. right, left, top), create a new MetaMod. I name them according to the module position they are in.
So I have a new one in the "right" position that I call "Right for non-vm"; in the "left" position I have one called "Left for non-vm".
3 - in each of the MetaMods, use the following rule:
$vm = JomGenius("virtuemart");
if ($vm->check("pagetype not starts with checkout") ) return "right-non-vm";
(you'll need to change the "right-non-vm" to the appropriate one for the MetaMod you're editing. if it's in the left position, change it to "left-non-vm")
So you'll end up with a MetaMod in the "left" position with this:
$vm = JomGenius("virtuemart");
if ($vm->check("pagetype not starts with checkout") ) return "left-non-vm";
... and in the right position with this:
$vm = JomGenius("virtuemart");
if ($vm->check("pagetype not starts with checkout") ) return "right-non-vm";
... and so on.
Now it should just work.
How does it work?
- each time a page is requested, the MetaMod modules will be "run". They check to see if the page type starts with "checkout" (e.g. checkout.index etc). If NOT, then they tell MetaMod to insert all the modules from the "left-non-vm" position.
- in this way, it's easy to add new modules into your site in the left and right positions - just put them into "left" if they should appear in the VM checkout, and "left-non-vm" if they should not.
Cheers,
Stephen
- Index
- » MetaMod
- » MetaMod General Support
- » Hide modules at Checkout in Virtuemart
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5941
- Posts this week:
- 1
- User Info:
- Total Users:
- 7618
- Newest User:
- goure1dhowen
- Members Online:
- 0
- Guests Online:
- 152
- 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