Skip to content
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

Merged
merged 3 commits into from
Sep 2, 2024

Conversation

clementcharmillot
Copy link
Contributor

@clementcharmillot clementcharmillot commented Aug 28, 2024

If the quantity is not a whole number, change the price to match and set the quantity to 1:
image
Otherwise, keep the same behavior:
image

@clementcharmillot clementcharmillot self-assigned this Aug 28, 2024
Copy link

sonarcloud bot commented Aug 28, 2024

@clementcharmillot clementcharmillot marked this pull request as ready for review August 29, 2024 06:44
Comment on lines +90 to +94
price = product.standard_price
if not quantity.is_integer():
quantity = 1
price = amount

Copy link
Member

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.

Suggested change
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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But wouldn't it be weird if after selecting 3 toilet accesses it shows toilet accesses 1 for 90.- instead of toilet access 3? Or maybe also change the name of the product to 3 toilet accesses directly?
My change:
image
Your proposition:
image
New Proposition:
image
And maybe something like that for custom donations
image

Copy link
Member

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 :)

@ecino ecino merged commit e7d54b4 into 14.0 Sep 2, 2024
2 checks passed
@ecino ecino deleted the T1763-change-donations-display branch September 2, 2024 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants