Butch0071 Posted August 18, 2023 Share Posted August 18, 2023 How to access id_order in hook hookDisplayOrderPreview (order preview on orders list in BO) I see that it is not available from $params public function hookDisplayOrderPreview(array $params) { $id_cart = $params['id_cart']; $orderID = (int)$params['id_order']; /* $orderID = Tools::getValue('id_order'); */ $this->context->smarty->assign([ 'order_ID' => $orderID, 'cartID' => $id_cart ]); return $this->display(__FILE__, 'displayOrderPreview.tpl'); } and in .tpl file the $orderID is empty... Would appreciate any tips. I quess I am missing something.. I am working with Presta 8 Link to comment Share on other sites More sharing options...
Butch0071 Posted August 18, 2023 Author Share Posted August 18, 2023 $params['order_id'] I was close enough;) Link to comment Share on other sites More sharing options...
AddWeb Solution Posted August 21, 2023 Share Posted August 21, 2023 On 8/18/2023 at 8:31 PM, Butch0071 said: $params['order_id'] I was close enough;) Have you got the order_id using this? Link to comment Share on other sites More sharing options...
Butch0071 Posted August 21, 2023 Author Share Posted August 21, 2023 5 hours ago, AddWeb Solution said: Have you got the order_id using this? Yes I did. Link to comment Share on other sites More sharing options...
AddWeb Solution Posted August 22, 2023 Share Posted August 22, 2023 Great! Thanks for the update! 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