Jump to content

How to get current order reference


Recommended Posts

Hello, guys i have one question how to get order refference in hookDisplayAdminOrder i try this method but nothing 

 

public function hookDisplayAdminOrder()
    {
		$orderid - Tools::getValue('id_order');
        echo $orderid;
    }

I just want to get order refference and make it variable with him :)

Edited by r00t3r
I just edit code to be great example :) (see edit history)
Link to comment
Share on other sites

1 hour ago, Daresh said:

$order = new Order($orderid);
$ref = $order->reference;

 

Mmm still not workin :( 

public function hookDisplayAdminOrder()
    {
		$orderid - Tools::getValue('id_order');
		$order = new Order($orderid);
        $ref = $order->reference;
        echo $ref;
    }

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...