zinc-collective / convene

An Operating System for the Solidarity Economy
https://convene.zinc.coop
Other
56 stars 19 forks source link

🐞 `Marketplace`: `Buying Products`: Saving `Delivery Details` on `Checkout` when no `Cart Delivery Area` is set #1983

Closed anaulin closed 5 months ago

anaulin commented 5 months ago

When a Cart does not have a DeliveryArea, you can still Checkout.

However, the Checkout screen does not have a way to set the DeliveryArea, and if you try to set your DeliveryAddress it fails to save.

zspencer commented 5 months ago

OK, I think I've got this fixed, as it's no longer possible to get to the Checkout screen until a DeliveryArea is set.

Also, https://github.com/zinc-collective/convene/issues/1962 was getting in the way as well; because we would clear the set delivery area every time the page was loaded. oof.

@anaulin want to re-test and tell me yay or nay? Or do you feel comfortable with my testing?

anaulin commented 5 months ago

@zspencer now I can't get the "Checkout" button to work at all in production:

https://github.com/zinc-collective/convene/assets/6729309/da283cfd-630d-4920-9ead-8896eece9976

zspencer commented 5 months ago

You have no products; so you can't check out. But we should probably make that clearer...

anaulin commented 5 months ago

@zspencer if you watch the video you'll see that i have products in my Cafe Gabriela cart ~and my Crumble carts~

anaulin commented 5 months ago

After some more testing, I see that if I go to a vendor where I didn't already have a cart, and I select a delivery area, and also add something to my cart, then when I click the "Checkout" button it takes me to the next step.

I think there are at least two issues:

zspencer commented 5 months ago

Oh dang, I saw the first one and the last one but didn't realize Cafe Gabriela had the issue too. It is odd for the Cafe Gabriela; I think it's likely that there are some Carts that we should delete now that we've stopped creating multiple Carts per Shopper. I'll go get rid of the carts in pre_checkout.

I've got a PR that removes the Checkout button completely as a kind of "stop-gap" because I didn't want to think about how to present a disabled Checkout button: https://github.com/zinc-collective/convene/pull/1999

zspencer commented 5 months ago

I've purged the other Carts that were in the pre_checkout state; and re-tested and it appears to work now?

anaulin commented 5 months ago

Does seem to work now! (There is a separate bug about the delivery area saving not updating the cart, not sure if we have a separate issue to track that.)

zspencer commented 5 months ago

I've created an issue https://github.com/zinc-collective/convene/issues/2002