Jump to content

New Order Status Same As Cancelled


YiannisK

Recommended Posts

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 :)

Link to comment
Share on other sites

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 by joss54 (see edit history)
Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...
  • 1 year later...
  • 1 year later...

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);

 

  • Thanks 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...