Magento : showing wrong product count in category

No comments
Sometimes, while uploading products, importing products from CSV files or removing products manually from Magento administrator some products SKU are still there in your database that’s why wrong product count in category error occurs. Some days back, I was uploading a large number of products in a Magento project and suddenly this error occurs and I was stuck ‘How I will figure out which product is conflicting and how I will fix this issue?’  Then I googled too much and found below trick that works for me. So that here in this post I am going to share my idea actually is not my idea but I was able to fix my problem that’s why I am saying this.

Before executing below query, I would suggest you first create a backup of your database then open your database and run this query.

where product_id NOT IN (SELECT entity_id FROM (catalog_product_entity))

And then clear your cache from cache manager and re index your site from index manager. Now error should fix. Please do let me know your opinion in comment box.

No comments :

Post a Comment