magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.5k stars 9.3k forks source link

Delete order possibility out of box #1803

Closed biotech closed 8 years ago

biotech commented 9 years ago

Delete order extension always be one of most useful free M1 extensions for sure with lot of implementation for this simple action dropdown action.

Any reason why this is not can be included out of box to Magento2? Thanks.

joshuaswarren commented 9 years ago

I believe not including delete order functionality in Magento 1 or Magento 2 core was intentional. I know that I've seen a lot of sites end up with database and consistency problems from using various order edit/order delete extensions, and I've heard of some 'system of record' type concerns for not wanting to make it simple to delete orders out of the box.

There's definitely some questions that come up when you start deleting orders. For instance, if an order is deleted, should the inventory for any product on the order be adjusted?

Are there times when canceling an order isn't enough, that a complete deletion is needed?

KAB8609 commented 9 years ago

The biggest issue I see with deleting orders in Magento 1/2 is accountability. You are loosing the paper trail on payment transactions, shipping transactions, and possibility your integrations to your ERP.

A "dumb" CSR going through orders can cause a lot of havoc if they accidentally delete orders, and will bring up more issues then it can solve (should it auto refund payment, etc).

alankent commented 9 years ago

I remember listening in on one internal conversation on this topic once. I may misquote, but it was along the lines "the original Magento design was by accountants - make sure you never change an order because that does not make sense - cancel and create a new one as changing orders can have unforseen side effects" vs "but most Merchants just don't care - if they stuffed it up they want to fix it".

I would be interested in community perspectives on this. Do we need to support both modes into the future?

biotech commented 9 years ago

We have some discussion here https://twitter.com/fbeardev/status/640222715891294208 and for sure all facts are right. But from other side clients always looking for at least delete test orders from box. Also i am sure this is would be again one of the most popular free extensions on Connect after releases (currently more that 20k installs for free solutions + GitHub + paid extensions) - so maybe it's make sense provide some stable valid possibility for do that out of box.

IvanChepurnyi commented 9 years ago

In my opinion it should prohibit to delete paid orders by a customer. Also Magento already has a feature on payment method level to enable test mode, so why not use that in order to mark order as one that is possible to delete with all the data associated to it, like invoices, shipments, etc. Of course it also required to keep separate order, invoice, shipment identifiers for test orders, so there are no collisions with real orders. Also would be nice to show huge notification in admin and on frontend, when you use test mode, that it is not a full transaction, to prevent dumb switch of test mode for payment method.

biotech commented 9 years ago

Here is first one :) https://github.com/ibnab/magento2-delete-orders