-
-
Notifications
You must be signed in to change notification settings - Fork 730
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
Can't proceed to checkout if order total is equal to 0 (blocked at details step) #10787
Comments
Notes for developper: It's probably related to the order state, that is not able to be set to openfoodnetwork/app/models/spree/order.rb Lines 23 to 26 in 6e34f61
openfoodnetwork/app/models/spree/order.rb Lines 207 to 209 in 6e34f61
|
Note that this could probably happen if product is not equal to 0 but if you have paid products + vouchers (or negative fees) so that it brings the order total to 0. |
Possible fix: diff --git a/app/models/spree/order.rb b/app/models/spree/order.rb
index 40dfbcb093..b3cee9f775 100644
--- a/app/models/spree/order.rb
+++ b/app/models/spree/order.rb
@@ -205,7 +205,7 @@ module Spree
# Subscriptions place orders at the beginning of an order cycle. They need to
# be completed to draw from stock levels and trigger emails.
def payment_required?
- total.to_f > 0.0 && !skip_payment_for_subscription?
+ !skip_payment_for_subscription?
end
# Returns the relevant zone (if any) to be used for taxation purposes. Will submit a draft PR, and see how specs goes... |
Description
When a shop displays products at zero euros and a customer wants to shop products at zero euros from this shop, the tool loops on step 1 of spit checkout.
Expected Behavior
Client should be able to shop products at zero euros
Actual Behaviour
How to test
I've create a shop, can be easily reproduced: https://staging.coopcircuits.fr/free-products-shop/shop
Workaround
No free products on a shop
Severity
S3
It's a real bug, but it concerns a rare use of the platform, so I would say S3
The text was updated successfully, but these errors were encountered: