hellykun Posted July 7, 2015 Share Posted July 7, 2015 Hello everyone, I am using prestashop 1.6 and I would like to display the order_id in the order confirmation page. I have tried many solutions but none of them worked for me. I am using {php} tags in smarty because I want to do some other things also. Can anyone help? Thanks a lot in advance. Link to comment Share on other sites More sharing options...
vekia Posted July 7, 2015 Share Posted July 7, 2015 hello it's not possible to use {php} code in the smarty how it is possible that you use it? perhaps you use some old ps version? are you sure that it is 1.6 ? Link to comment Share on other sites More sharing options...
hellykun Posted July 7, 2015 Author Share Posted July 7, 2015 Thanks a lot for the reply Vekia. I am using the SmartyBC class by making the necessary changes in config.inc Is it possible to get the order id with php code? Thanks you Link to comment Share on other sites More sharing options...
gonebdg - webindoshop.com Posted July 8, 2015 Share Posted July 8, 2015 Override OrderConfirmationController.php class OrderConfirmationController extends OrderConfirmationControllerCore { public function initContent() { $this->context->smarty->assign('id_order', $this->id_order); perent::initContent(); } } Then put following smarty var on your order-confirmation.tpl file {$id_order} Note: By default, the smarty var id_order is available only for guest customer 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