0

In Magneto2.1.5 product detail page remove decimal after price display like this $20.00 instead of $20 but this is not fix it please if any solution reply my post I have share my site screenenter image description here

Rv Singh
  • 1,617
  • 15
  • 34

1 Answers1

0

I have found solution in this issue please go to your theme-Magento_catalog/product/price/final_price.phtml and replace below code

echo str_replace('.00', '',$block->renderAmount($priceModel->getAmount(), [

            'price_id'          => $block->getPriceId('old-price-' . $idSuffix),
            'price_type'        => 'oldPrice',
            'include_container' => true,
            'skip_adjustments'  => true
        ]));

Here i have use str_replace function u can use all price add this function and you have one js file path go to price-utils.js and line no 84 replace this

return pattern.replace('%s', r).replace(/^\s\s*/, '').replace(/\s\s*$/, '').replace('.00','');

Thanks, hope it will be helps.

Amit Bera
  • 77,456
  • 20
  • 123
  • 237
Rv Singh
  • 1,617
  • 15
  • 34