I see that id_order
is not available in $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');
}
I have also tried to get it with:
Tools::getValue('id_order')
no luck either. In .tpl file the $orderID is still empty...
Would appreciate any tips. I quess I am missing something..
I am working with Presta 8
You were close! The correct variable is $params['order_id']
.