0

After migrating from M1.9 to M2.3.1. Layered Navigation Shows Negative price range

enter image description here

I remove all Negative prices manually. After that layered navigation filter shows the correct range and doesn't show the negative price range.

enter image description here


But after running the commands :

sudo php bin/magento setup:upgrade sudo php bin/magento setup:di:compile sudo php bin/magento setup:static-content:deploy -f sudo php bin/magento cache:clean sudo php bin/magento cache:flush 

All Negative values reverted and layered navigation show the Negative price range. Why this happening?

1 Answer 1

1

Configurable products have redundant prices that cause wrong configurable min_price calculation.

To see the count of all configurable products prices records from the database:

SELECT count(*) FROM catalog_product_entity_decimal WHERE entity_id in (SELECT entity_id FROM catalog_product_entity c where c.type_id = 'configurable');

Please backup your database before executing the query below!!!

To resolve, delete the price records from the database:

DELETE FROM catalog_product_entity_decimal WHERE entity_id in (SELECT entity_id FROM catalog_product_entity c where c.type_id = 'configurable');

Then run the following commands which will update the catalog_product_index_price table:

bin/mage index:reindex bin/mage cache:clean

Run the following to check for negative product prices:

select * from catalog_product_index_price where min_price < 0;

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.