fbpx

Magento 2.3 How to show regular & special price on products

Magento 2.3 How to show regular & special price on products?

 

Recently I had an issue on a custom theme that MRSP price was not showing so I find a way to show MSRP price on the product page and category page, Past the bellow code into your phtml file where you want to show it should work perfectly!

 


<?php if ($block->hasSpecialPrice()): ?>
    <span class="old-price sly-old-price no-display">
        <?php /* @escapeNotVerified */ echo $block->renderAmount($priceModel->getAmount(), [
            'display_label'   => __('Regular Price'),
            'price_id'        => $block->getPriceId('old-price-' . $idSuffix),
            'price_type'      => 'oldPrice',
            'include_container' => true,
            'skip_adjustments'  => true
        ]); ?>
    </span>
<?php endif; ?>

 

Remove no-display class then it will display both prices in Frontend.

Leave a Reply

Your email address will not be published. Required fields are marked *