Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow the order total to be equal to 0 #10788

Conversation

jibees
Copy link
Contributor

@jibees jibees commented May 2, 2023

What? Why?

The aim of this PR is to not check the total of an order before going to payment state for an order. This is a side effect of the split checkout: order with total equals to 0 can't go to next step (from details to payment)

What should we test?

  • As a producer, sells product at 0
  • As a consumer, add this product to cart
  • Check that you can order product (with different payment methods), even if total order is equal to 0

Release notes

Changelog Category: User facing changes

The title of the pull request will be included in the release notes.

Dependencies

Documentation updates

@jibees jibees self-assigned this May 2, 2023
@jibees jibees force-pushed the 10787-cant-proceed-to-checkout-if-order-total-is-equal-to-0-blocked-at-details-step branch from 28f066b to 3ead474 Compare May 3, 2023 09:11
@jibees jibees changed the title Do not test the total value of the order to move to the payment state Allow the order total to be equal to 0 May 11, 2023
@jibees jibees force-pushed the 10787-cant-proceed-to-checkout-if-order-total-is-equal-to-0-blocked-at-details-step branch from 3ead474 to b55dcf0 Compare May 11, 2023 10:13
@jibees jibees force-pushed the 10787-cant-proceed-to-checkout-if-order-total-is-equal-to-0-blocked-at-details-step branch from b55dcf0 to 2890b29 Compare May 11, 2023 10:14
@Matt-Yorkley
Copy link
Contributor

Matt-Yorkley commented May 11, 2023

Hmmmm... I think there were some technical reasons why various bits of the code don't allow placing an order with a total of zero. Off the top of my head, I think if you have Paypal as the selected payment option it will throw an error if the total is zero and the checkout will fail.

So this might need a little more thinking about how this case is handled and what consequences these changes might have in various parts of the app... 😬

Eg; if a shop only has one payment method enabled and that method is Paypal, you can't check out without a valid payment method being selected, and the only payment method available will not allow checkout. I imagine Stripe is similar.

@jibees
Copy link
Contributor Author

jibees commented May 11, 2023

I think there were some technical reasons why various bits of the code don't allow placing an order with a total of zero.

I agree, but it was somehow possible with the legacy/old checkout ; also I couldn't find any reason of why this code has been placed here, and I thought it was from legacy Spree.

So this might need a little more thinking about how this case is handled and what consequences these changes might have in various parts of the app... 😬

I agree also, that's why I've put this in Draft mode. I'm not sure on how we can check those consequences. Maybe add some specs with that particular case?

@jibees
Copy link
Contributor Author

jibees commented May 29, 2023

Closing here, not sure this is relevant.

@jibees jibees closed this May 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't proceed to checkout if order total is equal to 0 (blocked at details step)
2 participants