Magento – Effect of Deleting a Product with Associated Orders

ce-1.9.1.0ordersproduct

We use an extension by Celigo that pushes products from our CRM/ERM (Netsuite) into Magento. Somehow the system pushed a couple duplicates (still looking into why). I need to delete the duplicate products but there are existing orders that reference these duplicate products. For now I have disabled the duplicates in Magento so no new orders are created. Ideally I would like to change the orders to reference the correct product but I don't know if that is possible. If I can, the sync back to our CRM/ERM should actually accept the order. The duplicate is currently causing this to fail.

Tl;dr
What happens to an order if I just delete the product associated with it?

Best Answer

Flying this by the seat of my pants but I think you'll be fine as long as any custom modules you have installed are doing their things correctly.

When you create an order the data from the quote item is copied to the order item and essentially becomes decoupled from the actual product.

This is pretty verifiable.

  1. Look at a product in an order history
  2. Find the product in the catalog
  3. Rename it
  4. See that the order history name has not changed

The reason for this decoupling is the exact kind of thing you're asking. So that changing the catalog does not affect historical order information.

Now, I'm just going to sit back and wait for Marius to tell me why I'm wrong :)

Related Topic