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;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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