There's currently inconsistent behavior between setting the last cart item's quantity to 0 on the cart view, versus using the remove functionality. The latter deletes the cart as well, the former leaves the cart with no items.
When carts are set to hang around for a long time this leads to ghost carts building up in the DB. This is undesirable for a couple different reasons.
Fix is simple, just delete the cart if the last item was deleted via the quantity is 0 mechanism.
There's currently inconsistent behavior between setting the last cart item's quantity to 0 on the cart view, versus using the remove functionality. The latter deletes the cart as well, the former leaves the cart with no items.
When carts are set to hang around for a long time this leads to ghost carts building up in the DB. This is undesirable for a couple different reasons.
Fix is simple, just delete the cart if the last item was deleted via the quantity is 0 mechanism.