Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.



Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.


How to Keep New Template for Entire Session

How to Keep New Template for Entire Session

Want to Keep New Template for Entire Session / checkout .
I have a rule which changes my template for a certain virtuemart category.; However, when viewing cart, the template goes back to my original template.

My scenerio is Site A is our main shopping site. Site B is a landing page for certain products. When a customer clicks Buy on Site B, they are brought over to our main site A's category page for that product with the new template. I would like the new template to remain for their entire checkout process.

I tried to create a new rule checking Referrer and setting session variable A, then process next rule.   Then I have my rule2 which checks the session variable.

Can't figure out what I have wrong.  Any help will be appreciated.

Beginner Modder
6 Posts
Administrator has disabled public posting

Re: How to Keep New Template for Entire Session

Hi mowlman,

That's a great use for Chameleon. I think you're probably most of the way there, but I'll just go over a few steps.

Firstly, try turning on Debug mode. It's in Chameleon Parameters (found on the button on the Rule Chain page and Configuration page). Click on Parameters then turn on Debug mode. This will then show you all the steps that Chameleon is taking when you visit the front-end pages.

Here are the rules you will probably need to set up:

1st rule: use the following PHP to detect the referrer. In the succeed action, set session variable A, and "continue to next rule".

if ($core_genius->check("referrer = http://www.example.com/page.html")) return true;

2nd rule: detect Session Variable "A". In the succeed action, set the template to be used.

Give that a go and see how you get on.


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

3330 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
Total Topics:
Total Polls:
Total Posts:
Total Posts Today:
User Info:
Total Users:
Newest User:
Members Online:
Guests Online:

There are no members online

Forum Legend:

 New Sticky