YiannisK Posted December 14, 2015 Posted December 14, 2015 Hello, I need to make a new order status named "Delivery Denied" and have the same action as a cancelled order. Which means when I choose this status the items should update (are added in) the inventory. My status already has same options with cancelled but I think that I have to change some core files (Classes?) in order to update inventory. Any help? Thanks in advance Share this post Link to post Share on other sites More sharing options...
YiannisK Posted December 15, 2015 Posted December 15, 2015 (edited) Workaround after browsing the forum for similar cases, I've come to the conclusion that the order has to follow its workflow to behave in a right way. First I have to make the order cancelled to return the stock and after I can change the order to delivery denied for my history purposes. Maybe this is better since we better keep up with the order history. UPDATE After updating to the new status "Delivery Denied" the item again is subtracted from stock. What should I do for the status not to update stock? Or even return the items in stock? Edited December 30, 2015 by joss54 (see edit history) Share this post Link to post Share on other sites More sharing options...
garcialopez Posted February 8, 2016 Posted February 8, 2016 Hi! How can you resolve that? I have the same problem, I have a order status that it is the same that cancelled. I need to put the correct stock, not one left. Please help! Share this post Link to post Share on other sites More sharing options...
YiannisK Posted February 8, 2016 Posted February 8, 2016 Hi! How can you resolve that? I have the same problem, I have a order status that it is the same that cancelled. I need to put the correct stock, not one left. Please help! Unfortunately no solution yet. Share this post Link to post Share on other sites More sharing options...
garcialopez Posted February 8, 2016 Posted February 8, 2016 I am looking in the code the part where canceled order status is increasing the stock when it is active. But at the moment I don't find it. Share this post Link to post Share on other sites More sharing options...
Tárraga Posted March 21, 2016 Posted March 21, 2016 I am looking in the code the part where canceled order status is increasing the stock when it is active. But at the moment I don't find it. Did you find it? It would be a wonderful help Share this post Link to post Share on other sites More sharing options...
garcialopez Posted March 21, 2016 Posted March 21, 2016 No.. nothing Share this post Link to post Share on other sites More sharing options...
tmzwinkels Posted March 21, 2016 Posted March 21, 2016 I would either do it from module with 'hookActionOrderStatusUpdate' or directly in core code /prestashop/controllers/admin/AdminOrdersController.php Share this post Link to post Share on other sites More sharing options...
Tárraga Posted March 22, 2016 Posted March 22, 2016 OK I have just found the solution. You have to add your new status id to the ps_configuration table in your phpmyadmin. Search the row name = PS_OS_CANCELED, just copy it and change the value to your status id. Share this post Link to post Share on other sites More sharing options...
garcialopez Posted March 22, 2016 Posted March 22, 2016 Are you sure? I tried it but not working. The stock not increase. Share this post Link to post Share on other sites More sharing options...
YiannisK Posted March 22, 2016 Posted March 22, 2016 not working for me either... I found the PS_OS_CANCELED though with value 6 can't we replace the values to 6,15 instead? Share this post Link to post Share on other sites More sharing options...
Briljander Posted February 2, 2018 Posted February 2, 2018 Did anyone find a solution for this? Share this post Link to post Share on other sites More sharing options...
PrestaPros Posted July 12, 2019 Posted July 12, 2019 in 1.6 you can try to override order\OrderHistory.php, method changeIdOrderState variable $error_or_canceled_statuses ie: from: $error_or_canceled_statuses = array(Configuration::get('PS_OS_ERROR'), Configuration::get('PS_OS_CANCELED')); to: $error_or_canceled_statuses = array(Configuration::get('PS_OS_ERROR'), Configuration::get('PS_OS_CANCELED'), 22); 1 Share this post Link to post Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now