I am building a module and I am trying to get the link directly or an order in the admin e.g. load up the order details page like adminXXXXXX/index.php/sell/orders/ORDERNUMBER.
I can get get a link to generate but it always sends me to the orders overview page (the list of orders) not directly into an order.
At the moment I am using:
$link = Context::getContext()->link;
$link = $link->getAdminLink('AdminOrders', true, [], ['id_customer' => 3473|intval, 'viewcustomer' => 1]);
$this->context->smarty->assign( "link", $link );
this generates:
/adminXXXXX/index.php/sell/orders/?id_customer=3473&viewcustomer=1&_token=XXXXXXXXXX
which just loads the view all orders page.
Can anyone shed any light how I link directly to the order details page?
worked it out. For anyone else it's:
$link->getAdminLink('AdminOrders', true, [], ['orderId' => ORDERNUMBER, 'vieworder' => 1]);