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
Thanks for the answer, I tried calling the API this way, but I get a 404 not found message after clicking on the request cancellation as shown in the screenshots below.
Thanks for the answer, I tried calling the API this way, but I get a 404 not found message after clicking on the request cancellation as shown in the screenshots below.
The update_status mode of the orders dispatch accepts only POST requests, GET requests will result in 404 page.
Thanks for the answer, I tried calling the API this way, but I get a 404 not found message after clicking on the request cancellation as shown in the screenshots below.
I have a followup question regarding this feature, as I mentioned the idea is that the admin can see a list contains the orders that the vendor requested to be deleted.
I created an add-on to add the Request deletion item in the vendor's menu as shown in the screenshot, I created a new .tpl file called cancellation in the design/backend/templates/ views/orders/cancellation.tpl
Can you suggest an idea on how to filter the orders, I need to show the ones with the new status that I created ?
In the cancellation.tpl, I tried copying the design/backend/templates/ views/orders/manage.tpl just to check if I can reach the orders data but it's show the page with no data available.
You should also call fn_get_orders function ( check in the app/controllers/backend/orders.php file). You can also add the status parameter to it to receive order with specific order status only
You should also call fn_get_orders function ( check in the app/controllers/backend/orders.php file). You can also add the status parameter to it to receive order with specific order status only
Thanks for the input, I can't get the orders data using the same logic in design/backend/templates/views/orders/manage.tpl … You can see that I debugged the $orders variable in the design/backend/templates/views/orders/cancellation.tpl, but I get nothing.
At first, you should call the fn_get_orders function in the orders.post.php controller for the cancellation mode
I did that and now I have all the orders in the cancellation.tpl, I renamed it to cancel now.
Can you show me how to add the status filter in the fn_get_orders function ?
I mean the links where you click on the order ID or customer name to check the details, we decided to keep them since the admin needs to check the order's details before approving or denying the cancellation.
I'm currently trying to find a way to block the vendor from requesting cancellation if the cancellation was denied once by the admin.
I could also improve the UI like shown in the second screenshot using the thumbs up and down.