@
Mario Vavti I saw the "remove item" stuff. Looks good! There is a means to "update" items that are in the cart - with deletion happening when an item is updated to quantity 0. But I can see some utility to deleting all instances of a SKU as well. I didn't examine it fully, but I got the sense of what you have. Given "how things work now," it's a reasonable approach.
Just a few things to keep in mind, though:
There are some instances where deleting all instances of a SKU in an order will be undesirable. For example - in the case of a SKU with customizable options (color, size, engraved text, or other custom options) and multiple "versions" of that SKU are desired (eg, ordering 4 items of the same SKU with different size/color/text on each). In those cases, a customer may want to delete one "version" of the ordered item and keep the others.
The choice to have every item on it's own line was a pragmatic decision at this stage to reduce coding/debugging to get a workable system out as quickly as I was able - but at least SOME of the update code exists already. An update to a quantity of 0 will remove the line-item from the order.
Additional orders for the same SKU can be aggregated using the before_additem hooks to check to see if there is an item with that SKU in the order already and doing and UPDATE instead of an ADD. This should be done using the cart_order_before_additem_$itemtype hook - because some types of items should not be aggregated (see notes above) so you don't want to apply it to ALL items of the same SKU, just those of itemtypes for which it is appropriate.