How to access id_order in hook hookDisplayOrderPreview (order preview on orders list in BO)

35 Views Asked by At

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

1

There are 1 best solutions below

1
Krystian Podemski On BEST ANSWER