3

I have used Magento 2.2.6 version. I have one configurable product. I have added a special price to the associated product.The Special Price is Display but the old price is not displayed on how to show them?

Please refer the following screenshot:

In Frontend:

Magento 2.2.6 Configurable Product How to Show Old Price and Special Price

In admin Special Price:

Magento 2.2.6 Configurable Product How to Show Old Price and Special Price

In admin Product add/edit area:

Magento 2.2.6 Configurable Product How to Show Old Price and Special Price

1 Answer 1

12

Found solution Here

Copy final_price.phtml from

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

to

Vendor/theme/Magento_ConfigurableProduct/templates/product/price/final_price.phtml

change (around line 22)

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

with

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

(special_price will display)

and replace

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

by

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

(remove the no-display class)

5
  • 2
    Fixed the same issue from Magento 2.3.2. Thanks
    – h3k
    Nov 22, 2019 at 15:17
  • This solution does not work if only some product variants have a special price. In this case the same price is displayed twice, which looks weird.
    – hashbang
    Jan 22, 2021 at 12:35
  • @hashbang did you find any solution?... i have the same issue when only one child product has a special price !
    – Medomage
    Apr 6, 2021 at 12:29
  • @hashbang did you find solutions for this? because i am also getting same issue Nov 26, 2021 at 10:58
  • @Medomage did you find solutions for this? because I am also getting the same issue Nov 26, 2021 at 10:58

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.