-
-
Notifications
You must be signed in to change notification settings - Fork 158
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
Shipping rule conditions if total is 0 #2178
Comments
@valentin- what is the total of your order? I guess it is has a shipping applied to it right? |
@dpfaffenbauer no there is no difference between selecting a shipping with/without a price, regarding the available shipping options based on the price. It will only display if the max price is higher than the subtotal. |
@dpfaffenbauer could we check on this again? Thank you |
@valentin- sure, can you elaborate the problem more detailed pls? I cannot really seem to understand the issue. |
So I'd like to add shipping rule (free) with 0 € if the total cart price is 0.
Therefore I'd like to add a shipping rule which shows up when the total price <= 1. But the max price is based on the subtotal, not on the total. Therefore the rule for max <= 1 can't be used. The "free" shipping rule only shows up, if max price is > subtotal. I'd like to show the rule if the total price <= 1 Is it clearer now? Thanks for your support. |
@valentin- for me it seems to work, this is my setup: |
Hi @dpfaffenbauer, indeed it works with min = 0 and max = 0. But to switch the options I'd like to set following rules: Free shipping: Min 0, Max 1 (not visible anymore) -> only works with 0/0 Also I've experienced an error when switching from shipping method with shipping costs to a free shipping method. Should there be a summary redirect added if the cart is free (without payment)? Thanks! |
Ok, I think the problem is that the shipping is part of the "total" cart value. Does it help if you add change the following line: src/CoreShop/Component/Shipping/Rule/Condition/AmountConditionChecker.php:34 to $totalAmount = min(0, $shippable->getSubtotal($gross) - $shippable->getAdjustmentsTotal(AdjustmentInterface::SHIPPING)); |
Yes this will output the shipping options as expected. |
@valentin- then we have a fix :), I'll create a PR |
@valentin- this breaks the tests for some reason, so it might take a bit longer for that to be merged |
@valentin- I made some changes to the PR. Basically I've added a checkbox in the amount configuration to use the total value, could you test that on your side? #2238 |
ping @valentin- |
@dpfaffenbauer I was on vaccaction last week. Thank you! |
Hi, I'd like to add a shipping condition based on the total price.
Currently the amount condition is based on the subtotal, not the total price - therefore it won't apply if the total price is 0 at the end.
Also I'd like to set from = 0 / to = 1 for the free shipping option (and from = 1 / to = 0/null for the paid options), but setting 0 as from value is not possible currently.
Thanks in advance!
Valentin
The text was updated successfully, but these errors were encountered: