AdityaYadav Posted February 18, 2016 Share Posted February 18, 2016 Hi Guys, I want to add the order code in confirmation page during checkouts. I can see the order code getting displayed during Bankwire processing but not during Cash on delivery, I have tried updating the cashondelivery.php using the following code public function hookPaymentReturn($params) { if (!$this->active) return ; //$smarty->assign('id_order',$params[0]); //changes return $this->display(__FILE__, 'confirmation.tpl'); } and adding {l s='Your order ID is:'} <span class="bold">{$id_order} in the confirmation.tpl but it doesnt seem to work. Link to comment Share on other sites More sharing options...
bellini13 Posted February 18, 2016 Share Posted February 18, 2016 please elaborate on what you mean by "order code". what exactly are you trying to make appear on the order confirmation page? Link to comment Share on other sites More sharing options...
AdityaYadav Posted February 19, 2016 Author Share Posted February 19, 2016 Hi bellini13, I want to display the order id along with the confirmation text. i can see the order id(reference) in the order history currently. Link to comment Share on other sites More sharing options...
bellini13 Posted February 19, 2016 Share Posted February 19, 2016 I would suggest you review the code from the bankwire or check modules. They already do what you want Link to comment Share on other sites More sharing options...
tmzwinkels Posted February 23, 2016 Share Posted February 23, 2016 Are you sure $params[0] has a value ? why did you comment //$smarty->assign ? Link to comment Share on other sites More sharing options...
AdityaYadav Posted February 23, 2016 Author Share Posted February 23, 2016 Hi tmzwinkels, It wasnt commented before, but if i remove the comment the page appears blank (White Page), to get rid of this issue i have commented it. Link to comment Share on other sites More sharing options...
abdullacm Posted March 1, 2016 Share Posted March 1, 2016 public function hookPaymentReturn($params) { if (!$this->active) return ; $smarty->assign('id_order', $params['objOrder']->id); return $this->display(__FILE__, 'confirmation.tpl'); } you can use $params['objOrder'] its the order object, you can access the variables and methods using this object Link to comment Share on other sites More sharing options...
AdityaYadav Posted March 4, 2016 Author Share Posted March 4, 2016 Hi Abdulla CM, Thanks for your reply. ill try this code 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