Hi there,
We're trying to implement the option to request an order cancelation from the vendor panel in the view orders page. The idea is to rely on order status change : when the vendor clicks on the request cancelation button, the order status changes to await cancelation status … in the admin panel, we add an order tab in the moderation menu, that page will only display the orders with the await cancelation status, the admin can either approve the cancelation or deny it, both actions will also change the order status: Cancelled if approved or previous status before cancelation request if denied.
Now the question is : After adding the button like shown below in design/backend/templates/views/orders/manage.tpl
{if $runtime.company_id} <li>{btn type="list" href="" text={__("request_cancellation")}}</li> {/if}
I need to call the order_status_change API to change the order status to await cancelation: something like this: used in the delete order button
href="orders.delete?order_id=`$o.order_id`&redirect_url=`$current_redirect_url`"
Any ideas on how to do it ?
Thanks