Product / Category Database Cleanup

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?

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”?



[color=#C09853]Data is imported successfully.[/color]

[color=#C09853]New objects - [/color]92[color=#C09853];[/color]

[color=#C09853]Updated objects - [/color]454[color=#C09853];[/color]

[color=#C09853]Skipped objects - [/color]0[color=#C09853];[/color]

[color=#C09853]Total - [/color]546[color=#C09853].[/color]

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



    Regards,





    Valentin

    [color=#808080][size=2]part of hungryweb.net[/size][/color]