Besa Besa
Besa Besa

Reputation: 11

Prestashop 1.6 get order reference in prestashop custom module

guys i want to make variable with order reference in my module with DisplayAdminOrder hook. And i try with this method , but nothing is happen are you have idea how to get variable with order reference

 public function hookDisplayAdminOrder()
{
    $orderid - Tools::getValue('id_order');
    $order = new Order($orderid);
    $ref = $order->reference;
    echo $ref;
   //$this->processChangePayment();
   //return $this->display(__FILE__, 'display.tpl');
}

Upvotes: 0

Views: 427

Answers (1)

Mahdi Shad
Mahdi Shad

Reputation: 1447

If the module placed in its hook, it should work. just use d() instead of echo to make sure it work correctly:

d($ref);

Upvotes: 1

Related Questions