cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble deleting products - category amount stay

SOLVED

Trouble deleting products - category amount stay

Hey there.

 

I clear SQL with this script.

https://gist.githubusercontent.com/codesprint/7b05a236a10009946ce1/raw/fbf966bd573f3ea207b08f6caaa10...

That works perfect.
Now i have no product online. But when i check categories at the backend there is a amount of products deposited.
I add a screenshot. 
Can someone know how can i clear all old categorie staff but keep them (empty) with same ID.
screenshot -> http://imgur.com/SDVzqof


Thx.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Trouble deleting products - category amount stay

That SQL works for me.

 

SET FOREIGN_KEY_CHECKS = 0;
TRUNCATE TABLE `catalog_category_product`;
TRUNCATE TABLE `catalog_category_product_index`;
SET FOREIGN_KEY_CHECKS = 1;

View solution in original post

1 REPLY 1

Re: Trouble deleting products - category amount stay

That SQL works for me.

 

SET FOREIGN_KEY_CHECKS = 0;
TRUNCATE TABLE `catalog_category_product`;
TRUNCATE TABLE `catalog_category_product_index`;
SET FOREIGN_KEY_CHECKS = 1;