commerce icon indicating copy to clipboard operation
commerce copied to clipboard

OrderCloud provider: ordercloud.cart cookie is not cleaned up after checkout

Open sc-HaoLiu opened this issue 2 years ago • 0 comments

I am not sure if this is by design for all commerce providers or just with the OrderCloud provider. What I found is that the "ordercloud.cart" cookie (which is the cart/order ID from OC) is still left after the cart has been converted into an order (after a successful checkout). This causes problem for new cart operations because it still re-uses the same OC cart (now it's an order). Some operations are allowed like add/remove lineitems (which is still wrong/dangerous to change the lineitems from an placed order) while others are not (like re-calculate the cart total).

So should the cookie(s), at least the ordercloud.cart, be cleaned programmatically after checkout?

sc-HaoLiu avatar Nov 04 '21 20:11 sc-HaoLiu