Backup your database before running these ...
If a Live Site, set it Down for Maintenance while making these changes ...
Let's say you have:
Pending orders_status_id 1
Processing orders_status_id 2
Delivered orders_status_id 3
Updated orders_status_id 4
and you want a new one:
Packaging orders_status_id 3
Add a New Order Status:
Packaging
and it will be orders_status_id 5
Pending orders_status_id 1
Processing orders_status_id 2
Delivered orders_status_id 3
Updated orders_status_id 4
Packaging orders_status_id 5
Now to adjust everything to make the new Packaging orders_status_id 3 you can run the following SQL statements in phpMyAdmin:
UPDATE orders_status SET orders_status_id = 6 WHERE orders_status_id = 5;
UPDATE orders_status SET orders_status_id = 5 WHERE orders_status_id = 4;
UPDATE orders SET orders_status = 5 WHERE orders_status = 4;
UPDATE orders_status_history SET orders_status_id = 5 WHERE orders_status_id = 4;
UPDATE orders_status SET orders_status_id = 4 WHERE orders_status_id = 3;
UPDATE orders SET orders_status = 4 WHERE orders_status = 3;
UPDATE orders_status_history SET orders_status_id = 4 WHERE orders_status_id = 3;
UPDATE orders_status SET orders_status_id = 3 WHERE orders_status_id = 6;
Now fix the Attribute settings for Downloads ...
Go to the Configuration ... Attribute Settings ... and change the following:
Downloads Controller Update Status Value 5
Downloads Controller Order Status Value >= lower value 3
Downloads Controller Order Status Value <= upper value 5
And, after checking all is correct, take your site off of Down for Maintenance ...



Reply With Quote


Bookmarks