Delete a product after it has been ordered?

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Delete a product after it has been ordered?

Post by AbleMods » Mon Nov 26, 2007 4:27 am

Out of curiosity, how does AC7 handle the situation where a product is deleted after it's been ordered? My question is more from a standpoint of order history.

Does the line item drop off the order history? Or is the complete history kept separate from the primary tables and unaffected by them?

I'm not seeing any tables regarding order history and I'm concerned about my customers ability to see accurate previous orders.

If an item is discontinued at a later date, I don't want to have to keep it in ac_Products forever. But at the same time, customer order history should never change as revisions to ac_Products are made in the future.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

User avatar
sohaib
Developer
Developer
Posts: 1079
Joined: Fri Jan 23, 2004 1:38 am

Post by sohaib » Mon Nov 26, 2007 4:43 am

Does the line item drop off the order history? Or is the complete history kept separate from the primary tables and unaffected by them?
They are kept is separate tables. You may have noticed two tables ac_BasketItems and ac_OrderItems.

When basket items are purchased they become order items. A copy of them is created and stored in order items table. The order items contain everything about the order. Even if a product is deleted its information will remain in ac_orderitems table.

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Post by AbleMods » Mon Nov 26, 2007 4:59 am

Sweet!

So, the other side of the coin will be that a problem with an item post-purchase can't be fixed by simply changing the product in the catalog. Not unless you're going to delete the item entirely and re-add it to the order.

...which explains why AC7 gives us the ability to edit the order line items found in the orders admin screen.

Thanks for the clarification.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

User avatar
sohaib
Developer
Developer
Posts: 1079
Joined: Fri Jan 23, 2004 1:38 am

Post by sohaib » Mon Nov 26, 2007 5:20 am

...which explains why AC7 gives us the ability to edit the order line items found in the orders admin screen.
You are quite right.

Allowing orders to be linked to actual products can create numerous problems because you can change anything (including price, discounts, shipping, taxes etc) on a product after the order is placed.
So an order contains a snapshot of product data at the time order was placed.

Post Reply