Jump to content

New Order Status Same As Cancelled


YiannisK
 Share

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

Share this post


Link to post
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)

Share this post


Link to post
Share on other sites

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

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

  • 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

Share this post


Link to post
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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More