Change order status directly from a link on the email merchant

Hi :slight_smile:

I want to add a link on the mail sent to the merchant after each order, which change the status to the next step.
On the order-to-merchant.twig file, we have this (as we can find it on the backoffice) :

 <a href="{{ config.site_url }}{{ admin_url('order', { order: }) }}">{{ lex('') }}</a>

I wanted to add a link like this :

I don’t find documentation about available parameters for the function admin_url.
A have tried :

 <a href="{{ config.site_url }}{{ admin_url('order/set_status', { order: }) }}">

but obviously it doesn’t work !

admin_url supports the action (order/set_status) and the query parameters to add in object format. So you’ll need to provide the order and status change ID.

1 Like

Thanks Mark, I get it :

{{ config.site_url }}{{ admin_url('order/set_status', { order:, id: 2 }) }}
1 Like