After completing the second step at checkout (shipping method), I want to be able to remove all products from the cart and add others.
Products should be added to the cart.
checkoutLinesUpdate mutation says This checkout doesn't need shipping and my checkout is locked. I'm not able to add any product as a logged-in user.
we just discovered the same bug using GraphQL. after we delete all lines using checkoutLineDelete mutation it is not possible to add any product back to that cart.
I would like to fix this bug. Any suggestions ? @bogdal
the problem lies in saleor/graphql/checkout/mutations.py:61 where there is a check for checkout.is_shipping_required() which returns any(line.is_shipping_required() for line in self)
obviously when there are no lines in the checkout it will always return False.
Gues, it's really wired behaviour. Maybe we can invalidate such checkout? Or remove shipping info from it.
it seems that removing shipping info is the most relevant solution. no items in the cart -> nothing to deliver -> it makes no sense to keep the shipping info.
Hello all. Yep, in my opinion, we should delete shipping information when there are no products in the cart. In addition, we need to prepare data migration to fix existing blocked checkouts.
I'm taking the hacktoberfest label off from this one, @fowczarek from our team will work on this issue.
Most helpful comment
Hello all. Yep, in my opinion, we should delete shipping information when there are no products in the cart. In addition, we need to prepare data migration to fix existing blocked checkouts.