Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Product / Category Database Cleanup Rate Topic   - - - - -

  • pholcomb
  • Junior Member
  • Members
  • Join Date: 27-May 10
  • 9 posts

Posted 07 July 2014 - 03:04 PM #1

I set up a brand new installation of CS Cart (version 4.1.3) and imported a CSV file containing multiple Categories and Products. All of the site testing was done on these items. However, we are ready to go live now and I have deleted all of the categories (which I assume deletes all of the products, etc) so that we can reimport with all of their current product information.

Deleting the categories worked as expected. HOWEVER, when I look at the database tables (cscart_products, cscart_products, cscart_images, etc), all of the old data is still inside. Is there any way to clear all of this out (as it was in the beginning)? I'm sure there is little difference in database size if I just leave it all there, but I am slightly OCD and want it all cleaned out before the site goes live.

I am a little timid to go in and start clearing out the tables as I saw some of the entries pertained to banners, etc also.

Any suggestions?

  • pholcomb
  • Junior Member
  • Members
  • Join Date: 27-May 10
  • 9 posts

Posted 07 July 2014 - 05:27 PM #2

Also, after deleting all of the categories (and products), I go back to the CSV import and after importing them all again (which I assume is from scratch), I get this message from CS-Cart...

Why didn't the 454 products get deleted completely and how are they still being "updated"?

Data is imported successfully.
New objects - 92;
Updated objects - 454;
Skipped objects - 0;
Total - 546.

  • Hungryweb
  • Senior Member
  • Authorized Reseller
  • Join Date: 10-Feb 12
  • 1267 posts

Posted 07 July 2014 - 06:38 PM #3

Hi @pholcomb,
To delete all products and truncate also tables you need to use some php scripts because some products are not displayed but still are on database ;) and i am telling this from experience.

My Solution:
1. delete all categories
2. create only one category
3. harcode add all products to that category ( PHP script )
4. delete all products
5. truncate ?:categories, ?:category_descriptions, ?:products, ?:product_options ( PHP script to reset mysql indexes )

If you are interested i can create a script to automatically do all steps above but i cannot do it for free because is eating time :D just send me an email and we go from there


part of hungryweb.net