Jump to content

problem to delete all products in Prestashop


LeoBundle

Recommended Posts

Hello, I am facing a strange problem when deleting all products from the databases or even trying to delete them from within the store back office My home page is having strange problems, such as I see all the icons have become very large and the page has become strange The second problem is when adding a product, for example, it must have the product number ID 1 no the id with me in my store  become 7853 and This means that I have a number of products 7853 but i cant see this products i have problem i think in database file but i don't know how to fix this 

Link to comment
Share on other sites

3 hours ago, Nickz said:

Since when?

What does your logdata say, and strange files in your shop?
What php setting you use on which shop version and theme?

thank you for replay i'm use php 7.2 and theme 1.7.8 with version prestashop 1.7.8 and i'm uploaded example images i have 4899 products i want to delete all 4899 i'm use this code mysql To delete them quickly

SET foreign_key_checks = 0;

-- Delete all products
DELETE FROM ps_product;
DELETE FROM ps_product_shop;
DELETE FROM ps_product_lang;
DELETE FROM ps_stock_available;

-- Enable foreign key checks
SET foreign_key_checks = 1;

i'm use this code after product deleted i'm screen home page with image name after.png and image with name id you will see Product id 7849 

I think the ID Represents the number of products This is the first product I added after I deleted them from the databases 

 

example.PNG

mysql.PNG

after.PNG

id.PNG

Edited by LeoBundle (see edit history)
Link to comment
Share on other sites

1 hour ago, LeoBundle said:

Hello, I am facing a strange problem when deleting all products from the databases or even trying to delete them from within the store back office My home page is having strange problems, such as I see all the icons have become very large and the page has become strange The second problem is when adding a product, for example, it must have the product number ID 1 no the id with me in my store  become 7853 and This means that I have a number of products 7853 but i cant see this products i have problem i think in database file but i don't know how to fix this 

Hi.

What was the reason for removing the products from the database? The products are stored in the base in 9 database tables. You should have used the Prestashop function in the product list to remove all products. To make the action faster, just delete the TRUNCATE table ps_category_product. TRUNCATE sets autoincrement to 1.

Link to comment
Share on other sites

2 hours ago, ps8moduly.cz said:

Hi.

What was the reason for removing the products from the database? The products are stored in the base in 9 database tables. You should have used the Prestashop function in the product list to remove all products. To make the action faster, just delete the TRUNCATE table ps_category_product. TRUNCATE sets autoincrement to 1.

thank you for replay  I delete products from the database because they are deleted quickly because I have more than 4924  

I installed an extension ps-cleaner and after install I tried it and deleted the products, but I also had a problem with the home page, which is that the pictures are too large I do not know the reason for this problem, and when I add a new product, I see that the product should become ID 1 Because I deleted all the products, I see something else. I see that the new product that I added is recent ID 7849 This indicates that there are products their number is 7849 But I don't see them

Edited by LeoBundle (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...