Jump to content

How to pass smarty variable to cart


munvera

Recommended Posts

Hi, 

 

I assigned my JS variable to smarty through URL link. 

 $this->context->smarty->assign('variable', $_GET['var']);

I have a CMS page which using JS to store the variable and redirect to my custom page.

Then, I display the variable in my custom page and it works.

My question is, how can I pass this value to cart? Because the variable is empty due to the $_GET['var'] is not available on the link anymore when I at the cart page. 

 

I am new to PS. I know it is a mess.  :(

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...