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 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.

mowlman
Beginner Modder
ranks
useravatar
Offline
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.

Cheers,
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
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:
4378
Newest User:
miller2341
Members Online:
2
Guests Online:
193


Forum Legend:

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