luisillo Posted April 16, 2019 Share Posted April 16, 2019 I'm trying to confirm an order. My method is: /** * This hook is used to display the order confirmation page. */ public function hookPaymentReturn($params) { if ($this->active == false) return; $order = $params['objOrder']; if ($order->getCurrentOrderState()->id != Configuration::get('PS_OS_ERROR')) $this->smarty->assign('status', 'ok'); $this->smarty->assign(array( 'id_order' => $order->id, 'reference' => $order->reference, 'params' => $params, 'total' => Tools::displayPrice($params['total_to_pay'], $params['currencyObj'], false), )); return $this->display(__FILE__, 'views/templates/hook/confirmation.tpl'); } But I have this problem: Link to comment Share on other sites More sharing options...
luisillo Posted April 16, 2019 Author Share Posted April 16, 2019 My own solution: public function hookPaymentReturn($params) { } Link to comment Share on other sites More sharing options...
joseantgv Posted April 16, 2019 Share Posted April 16, 2019 if (version_compare(_PS_VERSION_, '1.7', '<')) { $order = $params['objOrder']; } else { $order = $params['order']; } 1 Link to comment Share on other sites More sharing options...
luisillo Posted April 16, 2019 Author Share Posted April 16, 2019 23 minutes ago, joseantgv said: if (version_compare(_PS_VERSION_, '1.7', '<')) { $order = $params['objOrder']; } else { $order = $params['order']; } Thanks, but now I have the same problem with $params['total_to_pay'] Link to comment Share on other sites More sharing options...
luisillo Posted April 16, 2019 Author Share Posted April 16, 2019 31 minutes ago, luisillo said: Thanks, but now I have the same problem with $params['total_to_pay'] Solution: $params['order']->getOrdersTotalPaid() Link to comment Share on other sites More sharing options...
CarlosMirandaG Posted January 29, 2021 Share Posted January 29, 2021 Hi good day i have a similar error, would you can help me please? When completing the purchase in my store, it throws the following error (attach screenshoot) Link to comment Share on other sites More sharing options...
joseantgv Posted January 30, 2021 Share Posted January 30, 2021 hace 14 horas, CarlosMirandaG dijo: Hi good day i have a similar error, would you can help me please? When completing the purchase in my store, it throws the following error (attach screenshoot) This is an error from module "ganalytics". Are you running last version? 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