Serial Posted August 18, 2015 Share Posted August 18, 2015 (edited) Hi, I want to create cookie in OrderController.php. It doesn't work. I haven't a cookie in my web browser. This is my override of OrderController.php : public function get_ChoixMagasin() { $retrait = $this->context->cart->id_carrier; if ($retrait == 13) /* Si le client a choisi le retrait en magasin (id : 13) */ { $resultat = Tools::getValue('choix_magasin'); $this->context->cookie->__set('choix_magasin', $resultat); } else /* Sinon on met la variable a 0 */ { $resultat=0; $this->context->cookie->__set('choix_magasin', $resultat); } } And before set template order-payment.tpl in OrderController.php : $this->get_ChoixMagasin(); $this->setTemplate(_PS_THEME_DIR_.'order-payment.tpl'); Edited August 18, 2015 by Serial (see edit history) Link to comment Share on other sites More sharing options...
bellini13 Posted August 18, 2015 Share Posted August 18, 2015 have you confirmed that your override is being executed? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now