Magento2.2.5 show original price when configurable product is part of catalog price rule

magento.stackexchange https://magento.stackexchange.com/questions/252307

  •  07-02-2021
  •  | 
  •  

Pergunta

I have a catalog price rule that setup so I can do a x% off site wide sale. Now when i view any category my simple products show the original price crossed out and then show the new discounted price next to it.

However configurable products are showing only the discount price and not the original price? All of the simple products which are inside the configurable product have the same price.

What file do I need to edit and how so that the configurable products will show the original price?

I saw one post about editing

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

However I don't want to edit a core magento file for obvious reasons.

Suggestions??

Foi útil?

Solução

Copy this file vendor/magento/module-configurable-product/view/base/templates/product/price/final_price.phtml into your theme/module and remove the following condition,

!$block->isProductList() && on line 22:

Original Code:

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

Thanks!

Outras dicas

Can anyone give me the exact location where to create the duplicate file of final_price.phtml as I'm unable to find the exact path/ location.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a magento.stackexchange
scroll top