-
Notifications
You must be signed in to change notification settings - Fork 9.4k
[ISM][#18651] TierPrice save float percentage value [2.3] #19140
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
Conversation
Hi @SikailoISM. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
@magento-engcom-team give me test instance |
Hi @rogyar. Thank you for your request. I'm working on Magento instance for you |
Hi @rogyar, here is your new Magento instance. |
@SikailoISM thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository. |
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.
#19030 (comment) CR note is missed.
@SikailoISM please apply necessary changes. |
- removed type conversation
*/ | ||
private function getPercentage(array $priceRow): ?int | ||
private function getPercentage(array $priceRow): float |
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.
Will such type hinting work when there is int
?
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.
Yes, of course.
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.
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.
Just checked :)
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.
@swnsma nice idea ;) such signature will convert to float
though which is not desired: https://3v4l.org/eE28s
Please remove return type and make it possible to pass int
unchanged.
Tierprice can't save float percentage value
Description
Problem:
After save tierprice for product,
discount
field lost value after comma.Fix:
Updated getPercentage method in TierPrices:
Fixed Issues
Manual testing scenarios
discount
value "2.5"Contribution checklist