-
Notifications
You must be signed in to change notification settings - Fork 10
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
T1763 - Change how donations are displayed in cart #39
Conversation
Quality Gate passedIssues Measures |
price = product.standard_price | ||
if not quantity.is_integer(): | ||
quantity = 1 | ||
price = amount | ||
|
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.
This can be done regardless if the quantity is entire or not.
price = product.standard_price | |
if not quantity.is_integer(): | |
quantity = 1 | |
price = amount | |
quantity = 1 | |
price = amount |
PS: the line above can also be removed.
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.
You are right, your changes make more sense :)
If the quantity is not a whole number, change the price to match and set the quantity to 1:
Otherwise, keep the same behavior: