How To

Magento 2: Show Both Regular & Special Price on Configurable Products

Hello Magento Friends,

Welcome to Magento 2 How-To Tutorials by MageComp. Today’s solution is about Magento 2: Show Both Regular & Special Price on Configurable Products.

Configurable products are a mixture of simple products with various options like color, size, etc. Magento 2 store owners offer special prices to increase sales, purchasing power, and manage surplus stock. But when special prices are applied, it does not show the original price.

So I am here with the solution to show the special price and original price both on configurable products in Magento 2.

Steps to Show Both Regular & Special Price on Configurable Products in Magento 2:

Step 1: Copy final_price.phtml from 

Vendor\magento\module-configurable-product\view\base\templates\product\price\final_price.phtml

to

app\design\frontend\Themes\Yourtheme\Magento_ConfigurableProduct\templates\product\price\final_price.phtml

Step 2: Now find below lines of code

<?php if ($block->hasSpecialPrice()) : ?>

    <span class="old-price sly-old-price">

And replace it with,

<?php if (!$block->isProductList() && $block->hasSpecialPrice()) : ?>

    <span class="old-price sly-old-price no-display">

After performing the above steps, the special price and original price will be displayed on the category page of configurable products in Magento 2.

Conclusion:

This way you can Show Both Regular & Special Price on Configurable Products in Magento 2. In case of any difficulty, feel comfortable contacting me via the comment section. Share the article with other Magento developers and stay tuned so that you do not miss out on any important solution.

Happy Coding!

Click to rate this post!
[Total: 6 Average: 4.3]
Dhiren Vasoya

Dhiren Vasoya is a Director and Co-founder at MageComp, Passionate 🎖️ Certified Magento Developer👨‍💻. He has more than 9 years of experience in Magento Development and completed 850+ projects to solve the most important E-commerce challenges. He is fond❤️ of coding and if he is not busy developing then you can find him at the cricket ground, hitting boundaries.🏏

Recent Posts

What are Net Sales? How to Calculate Your Net Sales?

In the world of business, understanding financial metrics is crucial for making informed decisions and…

22 hours ago

Magento 2 Extensions Digest April 2024 (New Release & Updates)

Welcome to the MageComp Monthly Digest, where we bring you the latest updates, releases, and…

22 hours ago

The ABCs of Geofencing: Definition, Features and Uses

In this era, businesses are always on the lookout for ways to engage with their…

2 days ago

How to Delete Product Variant in a Shopify Remix App using GraphQL Mutations?

Managing a Shopify store efficiently involves keeping your product catalog organized. This includes removing outdated…

3 days ago

6 Innovative Tools Revolutionizing E-Commerce Operations

E-commerce has transformed the way consumers shop for products and services and interact with businesses.…

5 days ago

How Upcoming Cookie Changes Will Affect Your E-commerce Website?

The e-commerce world is constantly in flux. New tech and strategies emerge daily to help…

5 days ago