0

How to modify Magento 2 in order to be able to show 4 digit prices and tier prices in the admin catalog? I can save 4 digit prices and they go in the database, even when I load a product edit form in the admin I can see a JSON on the source of the page which contains my 4 digit prices, but in the form itself the prices are all rounded to 2 digits. How can I get the form to show my 4 digit prices without rounding them down to 2 digits?

0

Hey after hours of searching I finally found how! its in vendor/magento/zendframework1/library/Zend/Currency.php line 74!

change this bit:

protected $_options = array(
    'position'  => self::STANDARD,
    'script'    => null,
    'format'    => null,
    'display'   => self::NO_SYMBOL,
    'precision' => 2,
    'name'      => null,
    'currency'  => null,
    'symbol'    => null,
    'locale'    => null,
    'value'     => 0,
    'service'   => null,
    'tag'       => 'Zend_Locale'
);

change 'precision' => 2, for 'precision' => 4,

Now I just need to figure the right way to apply this change from a clean module.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.