Magento – Magento 2.1.1 wrong price on product list for configurable product

configurable-productmagento-2.1magento2price

We are using Magento2 version 2.1.1, and have problems by showing prices on product list pages.

We have many configurable products and each of them have some single products (different colors, sizes,…). Every special price has also defined special price date (from – to). Recently we found out, that after special price is expired, we still see special price on product list.

Even full reindex and clearing cache didn't help.

Thanks for help.

Best Answer

Try editing

vendor/magento/module-configurable-product/Pricing/Price/LowestPriceOptionsProvider.php

change line 58. From:

->addAttributeToSelect(['price', 'special_price'])

to:

->addAttributeToSelect(['price', 'special_price', 'special_from_date', 'special_to_date'])

Magento GitHub issue #6457

After that regenerate code by typing php bin/magento setup:upgrade in your console.