0

I have a configurable product with two variations. Each simple product has a special price set as expiring yesterday, and this is properly reflected when the product is added to the cart.

However, "As Low As [special price]" still displays on the product. Is this the intended behavior, or is there a way to fix this? Thanks!

Edit: have of course tried flushing cache/reindexing/etc. Also, some easy bounty for someone to collect, I'd imagine.

  • reindex data and flush cache – Ketan Borada Feb 1 '19 at 16:37
  • Already ran reindexer / flushed cache – brackfost Feb 1 '19 at 16:52
  • Check the configurable product itself if has an active special price – arjus Feb 1 '19 at 22:39
  • @arjus the Configurable products don't have special price settings (at least in M2.1.11) – brackfost Feb 3 '19 at 23:52
1
+50

To fix this issue you need to edit the following file:

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'])

  • Thanks for your response. Can you provide any more context on this fix and why it would work? Is this a fix to a known bug, etc? – brackfost Feb 4 '19 at 17:17
  • Confirmed that this works, in terms of not pulling in the special price. "As low as" still shows, up some reason. – brackfost Feb 4 '19 at 17:49
  • 1
    @BrockfastCowboy, don't change directly to the core Magento file, you need to either update the Magento version or override the vendor/magento/module-configurable-product/Pricing/Price/LowestPriceOptionsProvider.php in your module. – Amit Naraniwal Feb 5 '19 at 6:16
  • @AmitNaraniwal I know the score, thank ya. – brackfost Feb 5 '19 at 14:13
1

Its a default bug of Magento2.

You can see the GIT commit in the latest version of Magento2.

Reference GIT commit :

https://github.com/magento/magento2/commit/1ab9b26828cd4da268e9a7481d4969bffb1460c1

Upgrade to the latest version of Magento2 will resolve your issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.