For some reason, you may need to change the number of decimals (precision) used when displaying prices in front office of your store.
This extension allows you to set the precision you want.
Tested on Magento CE 1.6 - 1.9
- Free and open source
- Fully configurable
- Bundled with English, French and German (thanks to Thomas Klosinsky) translations
No Magento files will be modified but following classes will be extended and some of their methods overridden:
- Mage_Core_Model_Locale
- Mage_Directory_Model_Currency
- Mage_Sales_Model_Order
- Download the latest version of this module here
- Unzip it
- Move the "app" folder into the root directory of your Magento application, it will be merged with the existing "app" folder
$ modman clone [email protected]:aurmil/magento-set-price-precision.git
- Adapt the following "composer.json" file into yours:
{
"require": {
"aurmil/magento-set-price-precision": "dev-master"
},
"repositories": [
{
"type": "composer",
"url": "http://packages.firegento.com"
},
{
"type": "vcs",
"url": "git://github.com/aurmil/magento-set-price-precision"
}
],
"extra": {
"magento-root-dir": "./"
}
}
- Install or update your composer project dependencies
In System > Configuration > Catalog > Catalog > Price, this extension adds a new option: Price Precision
- Set "2" (default value) to stay with the Magento basic behavior
- Set a different value between 0 and 4 to change the price precision. 0 means no decimals will be displayed.
Avoiding side effect:
If Price Precision is changed in default scope, it will affect admininstration area in some ways. For instance, in Sales > Orders management, Order Totals section will be affected.
To avoid this behavior, let Price Precision unchanged (value = "2") in __default scope __and change its value in website scope, for each website you have (or in "store view" scope if needed).
Incomplete case:
On product detail page of a configurable product, there are drop-down lists (one per attribute), to choose product options. Some options may vary the final price. In this case, the price difference is written into the option label (e.g.: +โฌ50.00 or -$20.00). For these prices, the number of decimals is hard-coded in configurable.js and product.js files. This case is not managed by this extension.
- handle every product type
- handle orders
- fix admin display in "website" or "store view" mode
- initial release