Access values set in Controoller in Prestashop 1.6

Asked

Viewed 10 times

0

I’m setting the value of the cookie on Frontcontrolller:

this->context->cookie->utm_campaign = $_GET['utm_campaign'];

However when accessing Orderconfirmationcontrollercore is coming null:

$this->context->cookie->utm_campaign;

I’ve tried too and it keeps coming empty:

$this->context->smarty->assign('utm_campaign', $this->context->cookie->utm_campaign);   

1 answer

0


I solved the problem by creating a jscript cookie instead of using the Prestashop. Another problem I identified was that Chrome does not create localhost cookies, only in Edge I was able to test.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.