What I am trying to achieve is that, I have SALE on an item I've managed to display the Regular Price and the Special Price But let's say I have a product which has regular price of 319.00 I would like to apply 20% discount on this product which results in a price 255.20. What I want is to round the end number. If the value is below .50 to go to the lower number and if the value is above .50 to go to the bigger number. Is this possible without buying an expensive module. Thanks.

3 Answers 3


I've also gone through this problem, Please use this plugin, I hope this will help you. For Me this is best solution and tested in 2.3 and working fine.

Price Decimal Precision Free Magento 2 Extension

  • Thank you for the suggestion but isn't this plugin just hiding the decimal part of the price?
    – Serco33
    Dec 17, 2019 at 19:15

I've found a solution for my issue. I am using Magento 2.3.2. Tried this plugin Magento 2 Price Round plugin Everything is working perfect so far.


I have modified a method convert of file Magento\Directory\Model\Currency

declaring a plugin, file Vendor/Module/etc/di.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
<type name="Magento\Directory\Model\Currency">
    <plugin name="vendor_module" type="Vendor\Module\Model\Plugin\Currency" />

plugin model, file Vendor/Module/Model/Plugin/Currency.php

namespace Vendor\Module\Model\Plugin;
use Magento\Framework\Exception\InputException;

class Currency
    public function aroundConvert($subject, $proceed, $price, $toCurrency = null)
        $price = $proceed($price, $toCurrency);     
        // you logic
        // warning ... logic affects the price of shipping  
        return $price;

Also see Complete code on GitHub

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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