-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Fix shipping discount failed to apply during place order #18098
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
Fix shipping discount failed to apply during place order #18098
Conversation
Hi @torreytsui. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
@magento-engcom-team give me 2.2.5 instance |
Hi @torreytsui. Thank you for your request. I'm working on Magento 2.2.5 instance for you |
Hi @torreytsui, here is your Magento instance. |
Hi @sidolov, thank you for the review. |
Hi @torreytsui. Thank you for your contribution. Please, consider to port this solution to 2.3 release line. |
The called method $address->getShippingAmountForDiscount() and $address->getBaseShippingAmountForDiscount() and $address->getShippingDiscountPercent() does not exist in the class Address Class Address : Not found these methods. It's true or I'm wrong ??? |
Description
Caused by #13185,
\Magento\Tax\Model\Sales\Total\Quote\Tax::clearValues()
is called to unset the total before collecting total.null
is expected (representing unset state) in below condition however0
is set and failed the condition necessary to calculate correct shipping discount.Shipping discount fail to apply to an order, when:
savePaymentInformation()
(for example, credit card methods usually meet this criteria, while paypal methods not)Fixed Issues (if relevant)
Can't found any related issue so far
Manual testing scenarios
Expected result: Order discount contains shipping amount
Actual result: Order discount does not contain shipping amount
Contribution checklist