-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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 zero price simple failed to resolve as default #16540
Fix zero price simple failed to resolve as default #16540
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-develop instance |
Hi @torreytsui. Thank you for your request. I'm working on Magento 2.2-develop instance for you |
Hi @torreytsui, here is your Magento instance. |
Tested on the instance and somehow can't replicate. I have done a 3v4l demo, hopefully this can convince as a bug. |
Hi @torreytsui, thank you for the collaboration. The issue doesn't reproduce, but I agree that your fix is correct. |
0, | ||
20, | ||
], | ||
$expectedPrice = 0.00, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @VladimirZaets I have refactored the unit test to be more meaningful as test cases. New test cases are added to reflect the bug. Does it make sense to you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @torreytsui, yes, it is ok, thanks!
Hi @torreytsui. Thank you for your contribution. Please, consider to port this solution to 2.3 release line. |
Description
When two simple products of a configurable have different prices, the lowest price simple product is expected to resolve as the default price showing on product detail page.
If one of the simple products has price=0, it will fail to resolve as default.
Notice that it is an edge case having price=0 product. It probably is still worth fixing.
Fixed Issues (if relevant)
Can't find any related issues at the moment
Manual testing scenarios
Expected result: Default price rendered as £0
Actual result: Default price rendered as £3
Contribution checklist