Delete Orders Without Increasing Stock

Howdy,

I need to delete some very old orders but do not want products in those orders stock to be increased, what do I modify to avoid this?

Hello Darius

Before the order is deleted, its status is changed. We have an addon that allows you to block changes in inventory during status changes.

https://marketplace.cs-cart.com/do-not-change-inventory.html

Best regards

Robert

thank but it is just too pricey as a solution, I prefer hardcode as I am going to do this just once..

Hello Darius

Before the order is deleted, its status is changed. We have an addon that allows you to block changes in inventory during status changes.

https://marketplace.cs-cart.com/do-not-change-inventory.html

Best regards

Robert

Hello Darius

File app/functions/fn_cart.php -> function fn_delete_order($order_id)

try comment line

fn_change_order_status($order_id, STATUS_INCOMPLETED_ORDER, '', fn_get_notification_rules(array(), false)); // incomplete to increase inventory

Best regards

Robert

Howdy,

I need to delete some very old orders but do not want products in those orders stock to be increased, what do I modify to avoid this?

You can always use the "archive orders" functionality in our EZ Admin Helper addon. It creates corresponding archive tables and moves the orders/order_data to them so they are saved, but not accessed. And of course you could always find the orders and move them back to their normal tables if you wanted to restore the orders so they're visible in cs-cart.

And how does this work with EU laws where customer can access all info you got on him ?

As to my country law orders accessed via web can only be from couple years history. For example Lithuanian Post gives access to legal invoices only up to ongoing moths 5th day.. If you did not download pdf or print on paper till this day, that is in you will not be able to add it to your bookkeeping..

You can always use the "archive orders" functionality in our EZ Admin Helper addon. It creates corresponding archive tables and moves the orders/order_data to them so they are saved, but not accessed. And of course you could always find the orders and move them back to their normal tables if you wanted to restore the orders so they're visible in cs-cart.

Not a lawyer so can't address the legal side of having the data in tables that are not accessible to the website. How are backups handled when customers request to delete their data? Every country is different so it's possible this one isn't for you.

You can truncate the tables after archiving if you want to delete the data. They are all prefixed like cscart_ez_archive_orders, cscart_ez_archive_order_data, etc....