Zen Cart Logo
Forums / Customization from the Admin / Delete 'used' order status

Delete 'used' order status

Views: 3,360

Results 1 to 9 of 9
8 May 2012, 2:19 PM
#1
pudzpud avatar

pudzpud

Zen Follower

Join Date:
May 2009
Posts:
156
Plugin Contributions:
0

Delete 'used' order status

HI,

I have renamed a few of the order status but need to delete one however when I try I get the error message:

Error: This order status is currently used in the order status history.

Any ideas how I can remove this even if it has been used in an order?
It's not a major thing, just trying to remove some old processes that are no longer used (my ex set up 9 but we only use 4).
I have had a search on the forum but everything seems to mention how to delete an unused status (which I can do), but not one thats used in the order history already.

8 May 2012, 3:11 PM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Delete 'used' order status

Go to admin > Customers > Orders and select the status you want to delete in Status:[] on the top right. Then change all of those statuses to something relevant so the unwanted status is freed up.

8 May 2012, 3:20 PM
#3
pudzpud avatar

pudzpud

Zen Follower

Join Date:
May 2009
Posts:
156
Plugin Contributions:
0

Re: Delete 'used' order status

Hi - none of the orders have this as final/current method - I think what it is saying is somewhere in one of the orders this delivery method has been used somewhere. For example if the default status is Pending I would change it to Processing and then Posted when the order goes off. One of these unwanted status updates is 'Delivered' and I may have accidentally pressed that status update instead of Processing at some point so one of the many thousand orders may say Pending to Delivered to Posting - there is no way I can see which order used this status or when it was used. I know a few of the unused options have been clicked on by accident in the past so want to delete them as it only causes confusion to the customer (i.e. if their order is Processing but they are emailed to say it is Delivered).

8 May 2012, 3:24 PM
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Delete 'used' order status

You may need to reset those statuses in the database then. This requires good knowledge of MySQL/phpMyAdmin and a thorough understanding of the Zen Cart database to be done safely; if you make a mistake, you could corrupt your database.
Ajeh would know how to do this correctly.

8 May 2012, 3:53 PM
#5
pudzpud avatar

pudzpud

Zen Follower

Join Date:
May 2009
Posts:
156
Plugin Contributions:
0

Re: Delete 'used' order status

Eeks - I may just leave them then and change the names to something else so customers dont think their order is delivered etc.
Thanks for your help.

22 Feb 2013, 12:47 AM
#6
petleyj avatar

petleyj

Zen Follower

Join Date:
Jul 2009
Location:
Norwich, UK
Posts:
122
Plugin Contributions:
0

Re: Delete 'used' order status

gjh42:

You may need to reset those statuses in the database then. This requires good knowledge of MySQL/phpMyAdmin and a thorough understanding of the Zen Cart database to be done safely; if you make a mistake, you could corrupt your database.
Ajeh would know how to do this correctly.

It's pretty easy to do. If you still require help, I may be of assistance.

James

FMUK Consulting - Web Design & Development | Graphics | Marketing | Apps - http://www.FMUKConsulting.co.uk

23 May 2015, 10:52 PM
#7
rgehrs avatar

rgehrs

New Zenner

Join Date:
Aug 2014
Location:
Colorado Springs, CO
Posts:
7
Plugin Contributions:
0

Re: Delete 'used' order status

PetleyJ:

It's pretty easy to do. If you still require help, I may be of assistance.

James

James, I am using 1.5.1 and have permanently deleted all orders (~400) except for the last 5 orders which positively do not have/contain any references to several (9) order status's that were created under Localizations -> Order Status. Yet I still received the [Error: This order status is currently used in the order status history. ] when I attempt to delete my no longer used/needed Order Status.

What steps can I take to remove these now unused Order Status.

Thanks, Richard

24 May 2015, 12:48 AM
#8
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,845
Plugin Contributions:
0

Re: Delete 'used' order status

Check the orders_status_history table in the database.

Mike
AEIIA - Zen Cart Certified & PCI Compliant Hosting
The Zen Cart Forum...Better than a monitor covered with post-it notes!

24 May 2015, 3:40 PM
#9
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,103
Plugin Contributions:
56

Re: Delete 'used' order status

rgehrs:

James, I am using 1.5.1 and **have permanently deleted all orders **(~400) except for the last 5 orders which positively do not have/contain any references to several (9) order status's that were created under Localizations -> Order Status. Yet I still received the [Error: This order status is currently used in the order status history. ] when I attempt to delete my no longer used/needed Order Status.

What steps can I take to remove these now unused Order Status.

Thanks, Richard

barco57:

Check the orders_status_history table in the database.
Continuing on with barco57's comment, what procedure did you use to "permanently delete" those orders? If you did that my using your Zen Cart admin to delete the orders individually, then all the associated database records (orders_products, orders_products_attributes, orders_products_downloads, orders_status_history) would also have been removed.