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.

 

How to remove sidebar-1 on cart and checkout?

How to remove sidebar-1 on cart and checkout?

so i installed metamod (free version) and i wanted to removed all modules in the sidebar-1 on the virtuemart checkout and cart pages.
i am using the code i found on your page. problem is it does not work.
metamod is published in the sidebar-1 as well.

Code:

$vm = JomGenius("virtuemart"); 

if ( ! $vm->check("pagetype starts with checkout, cart") ) return sidebar-1;

could you please tell me what to do and guide me in the right direction?
thanks so much!

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

Re: How to remove sidebar-1 on cart and checkout?

Hi Dorkus,

The first thing I noticed is that you need to put quotes around the name of the module position, e.g.

$vm = JomGenius("virtuemart");
if ( ! $vm->check("pagetype starts with checkout, cart") ) return "sidebar-1";

However your setup also needs some changes. I would suggest the following:

1 - keep the MetaMod in sidebar-1
2 - move all the other modules that were in sidebar-1 into a new (fake) position called sidebar-1-conditional. By doing this they won't show up in sidebar-1 until MetaMod includes them.
3 - edit the MetaMod recipe to this:

$vm = JomGenius("virtuemart");
if ( ! $vm->check("pagetype starts with checkout, cart") ) return "sidebar-1-conditional";

4 - ensure the MetaMod is published and assigned to some or all menu items (pages) as appropriate. In this case, probably ALL pages.

That should do it :-)

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

Re: How to remove sidebar-1 on cart and checkout?

hi thanks for your instructions.
it is now displaying the modules, but all in one div it seems. i played with the settings of the metamod but i did not manage to display it correctly.
how it looks now:
https://dl.dropboxusercontent.com/u/25785459/now.png
and how it was before and how i want it:
https://dl.dropboxusercontent.com/u/25785459/before.png
any ideas how to fix this?? or isnt this possible with the free version?
thanks!

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

Re: How to remove sidebar-1 on cart and checkout?

Hi,

the easiest way to fix it is to go Pro, but depending on your CSS setup on your template it may be possible. The most likely thing to work (if it does work) without going Pro is this:

- in the MetaMod, add a bogus module class suffix e.g. "foo"
- in the MetaMod, set the "Style for included modules" dropdown to the style of module in the module position you are using. If you don't know how to find this out, just try each of the options in turn.

What this does is to sometimes fool the CSS into not realising that the MetaMod is a module, because of the class suffix. This can sometimes then allow the CSS to detect the modules that MetaMod contains to be styled as modules.

If that works - great. Otherwise, going Pro is sure to fix it.

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

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5933
Posts this week:
4
User Info:
 
Total Users:
4384
Newest User:
rash39381
Members Online:
1
Guests Online:
145

Online: 
metamodguy

Forum Legend:

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