Magento2: Expired special_price is still shown for configurable products when no variant is selected

Created on 2 Sep 2016  路  9Comments  路  Source: magento/magento2

Preconditions

  1. 2.1.1
  2. configurable product with two variants (SKU 1: $8.90, SKU 2: $10)

    Steps to reproduce

  3. edit SKU1 and set special price options like so:
    image

  4. reindex & clear cache
  5. view product

    Expected result

  6. no special price should be shown when page is loaded and no option is selected

    Actual result

image

Tax Fixed in 2.1.x Format is valid Ready for Work bug report

Most helpful comment

Hi,
the problem is that the from and to date won't be selected from the database. 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'])

All 9 comments

Internal ticket created MAGETWO-58010, thanks for reporting

Upgraded a Magento installation to 2.1.3 and this issue still occurs.

Configured a variant (simple product) under a configurable product and added a special price that has already lapsed:
image

Special price still shows up in the front-end:
image

Hi,
the problem is that the from and to date won't be selected from the database. 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'])

Internal ticket to track issue progress: MAGETWO-70491

so what happpened to MAGETWO-58010 mentioned almost a year ago in this thread, @magento-team?

That seems to be an automated comment.
I guess their bot just blindly linked whichever internal tasks had this GitHub issue mentioned (and as it happens, sometimes there are duplicates).

Anyway, both tickets will probably be hanging indefinitely with some low priority, at least until 2.2 comes out.

@heldchen, thank you for your report.
The issue is already fixed in 2.2.0

Hi @heldchen. Thank you for your report.
The issue has been fixed in magento/magento2#13490 by @simpleadm in 2.1-develop branch
Related commit(s):

The fix will be available with the upcoming 2.1.13 release.

Was this page helpful?
0 / 5 - 0 ratings