Skip to content

Show old+special price in catalog pages for configurable products

I could successfully force showing old prices along with special prices inside a product page without the user first having to pick a variant (such as size) from the dropdown. However catalog pages proved to be tricky: some logic in Magento seems to iterate over the product object and basically calls the relevant phtmls inside the Catalog module twice if it thinks the product is eligible for special pricing.

That is, I can’t just fix /vendor/magento/module-catalog/view/base/templates/product/price/final_price.phtml or /vendor/magento/module-catalog/view/base/templates/product/price/amount/default.phtml even though there are mentions of “old-price” there because these files are set to be invoked twice by a logic I cannot find.

Anyone knows the proper solution to make old and new prices to display in catalog pages for configurable products if we were to consider any first linked product’s price attributes as authorative? I understand this is by design because Magento doesn’t have a single “price” for a configurable product, but I need to work around that.