Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Delete Orders Without Increasing Stock Rate Topic   - - - - -

 
  • Darius
  • Douchebag
  • Members
  • Join Date: 20-Apr 08
  • 3309 posts

Posted 14 November 2019 - 07:57 AM #1

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?



 
  • soft-solid
  • Junior Member
  • Members
  • Join Date: 19-Apr 10
  • 915 posts

Posted 14 November 2019 - 09:44 AM #2

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....-inventory.html

 

Best regards

Robert


Team of SoftSolid
cs-cart.pl

 
  • Darius
  • Douchebag
  • Members
  • Join Date: 20-Apr 08
  • 3309 posts

Posted 14 November 2019 - 12:36 PM #3

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....-inventory.html

 

Best regards

Robert



 
  • soft-solid
  • Junior Member
  • Members
  • Join Date: 19-Apr 10
  • 915 posts

Posted 14 November 2019 - 12:56 PM #4

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


Team of SoftSolid
cs-cart.pl

 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11424 posts

Posted 15 November 2019 - 04:53 AM #5

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.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • Darius
  • Douchebag
  • Members
  • Join Date: 20-Apr 08
  • 3309 posts

Posted 15 November 2019 - 07:36 AM #6

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.



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11424 posts

Posted 15 November 2019 - 11:39 PM #7

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....


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.