-
-
Notifications
You must be signed in to change notification settings - Fork 450
[FEAT] allow price rounding between 0 and 4 digits #4701
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
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.
LGTM
just a typo on the label Catalog Price Rounding Crecision |
Thanks for the review. However, it's much better if you had added a review comment, in this way, your contribution would have been logged in Git when your suggestion is committed. @Axepih Please help to approve the PR after your review. We will acknowledge you as a contributor. |
@all-contributors please add @Axepih for review |
I've put up a pull request to add @Axepih! 🎉 |
|
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.
Pull Request Overview
This pull request enables configurable price rounding precision between 0 and 4 decimal places instead of the hardcoded 2 decimal places. This addresses rounding issues that can occur when displaying prices with different precision requirements across store views.
Key changes:
- Introduces a new system configuration option for catalog price rounding precision
- Replaces hardcoded 2-decimal rounding with configurable precision
- Adds helper class to manage rounding precision settings
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
app/code/core/Mage/Core/Model/Store.php | Updates roundPrice() method to use configurable precision instead of hardcoded 2 decimals |
app/code/core/Mage/Catalog/etc/system.xml | Adds new system configuration field for rounding precision with validation |
app/code/core/Mage/Catalog/etc/config.xml | Sets default rounding precision value to 2 in configuration |
app/code/core/Mage/Catalog/Helper/Price.php | New helper class that manages rounding precision configuration and validation |
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Price.php | Updates price formatting in admin forms to use configurable precision |
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Price.php
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
…/Price.php Co-authored-by: Copilot <[email protected]>
Merged with one green. In production for years. |
|
Description (*)
Allow price rounding up to 4 digits.
Used that over years for a shop that wanted to display prices incl/excl per storewiew and we run into multiple rounding issues. That solved it for our cases.
Related Issues
Did not test ...