-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Catalog price rule applied configurable products not show oldPrice in product list #7624
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi, I cannot reproduce this issue. Please add more details to your description of the steps you followed when identifying this issue. |
@olysenko It just classical usage of catalog price rules.
Actually rule is working on all type of products. It may be about with price renderer in $block->getProductPrice(). Because in listing, for configurables, magento gets lowest child's price. I'm investigating this. |
In addition it may be related with #6080 |
Additional Info: After some investigation, i think find a clue
I hope it will help to solve this. |
Hi, after your las comment update I was able to reproduce issue on clear Magento installation with sample data. Your price index is invalid after price was changed. In case your have setting for indexers UPDATE BY SCHEDULE in menu System->Tools->Index Management. You have to setup cron with indexers reindex job. Or use UPDATE ON SAVE mode for indexers. In this case it will reindex price on product save. Please tell me if my comment was helpful for you. |
Hi @olysenko, This issue just about showing oldPrice in frontend. Not about rule applying or other. I did some trick to override it (Magento_Catalog/templates/product/price/final_price.phtml) : if($block->getSaleableItem()->getTypeId()==\Magento\ConfigurableProduct\Model\Product\Type\Configurable::TYPE_CODE) and line around 32 if($finalPriceModel->getAmount()->getValue()<$priceModel->getAmount()->getValue()) |
Hi @rbostan, so we need to synchronize our steps. My steps with no bug you can find below:
|
According to contributor guide, tickets without response for two weeks should be closed. |
I have the exact same issue on a project that has migrated data from a magento 1 store. |
This is on a magento 2.1.6 install on a development environment and a production environment with PHP 7. |
@veloraven this is weird. |
@rbostan can you provide the final price file content? I don't know what to replace or override. thanks in advance! |
Hi, Line 22 in the the file: vendor\magento\module-configurable-product\view\base\templates\product\price\final_price.phtml I replaced This: From onepack, if you want the old price to show in product page (when the swatches are not selected) hope it helps. someone |
@joebordo overwrite provided by @rbostan doesn't work on 2.1.7. I overwrote like this:
|
@gediminaskv It worked form me on 2.1.7 |
@joebordo Thanks it works for me! Someone know how can I change "was" for "old price" ? |
Sorry to reopen and drag this but im having the same issue on a magento 2.2 with migration data. ive tried the method mentioned by @joebordo but doesnt seem to work as no old price is showing. Any advice would be much appreciated. |
I have also tried the method mentioned by @joebordo with Magento 2.2.4 but doesnt seem to work as no old price is showing. Any advice would be much appreciated. |
I found that this solution works for me on 2.2.6, now old prices are showing for configurable products in the catalog, hower this causes a new bug, on product pages the old price is initially shown for a second or 2 and then disappears in a flash :(. When selecting an option it goes back to displaying but that was always like that. Seems like there is some Ajax rewriting the price after the fact on the product page. ======edit: |
@brampta What fix did you find for the bug created by the joebordo fix? I'm on 2.2.3 and I get the old price to flash for a second and then it is replaced with the sale price. So the sale price is displayed and the Original Price, also displays the sale price. |
I am on 2.3.4 and both prices show up after the fix described above. However, I only have special price on some variants of the configurable product, and the old prices show up for all variations. As a result, I have Old price 99EUR new price 99EUR which looks like I am trying to fool my customer. Is there a fix for that? |
Preconditions
Steps to reproduce
Expected result

2. Same as simples, show both final and old price for configurable productsActual result
The text was updated successfully, but these errors were encountered: