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 screen
-
Welcome to Stack Overflow. Please read up on how to provide a Minimal, Complete, and Verifiable example You may also benefit from How to ask and What is expected of SO users– mtr.webApr 19, 2018 at 16:19
1 Answer
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.