Zen Cart Logo
Forums / General Questions / Delete all products?

Delete all products?

Views: 8,807

Results 1 to 20 of 36
30 Aug 2007, 2:50 PM
#1
spatel2007 avatar

spatel2007

New Zenner

Join Date:
Aug 2007
Posts:
2
Plugin Contributions:
0

Delete all products?

how do I delete all products from my zencart store without actually going through each one? My store has 18000+ products, I need to delete all of them so I can reinstall them with the proper format...I installed ez populate, and uploaded all of them but left a single space in the image URL so none of the images show up...I need to go in delete all the old products and resubmit with the updated info...please help.

30 Aug 2007, 4:57 PM
#2
militarygunsupply avatar

militarygunsupply

New Zenner

Join Date:
Aug 2007
Posts:
11
Plugin Contributions:
0

Re: Delete all products?

I would think just clear the item tables on your SQL database. I haven't done it myself but I would assume that would be the easiest solution. Don't delete the whole database! =P

30 Aug 2007, 5:41 PM
#3
ahdonline avatar

ahdonline

New Zenner

Join Date:
Aug 2007
Posts:
1
Plugin Contributions:
0

Re: Delete all products?

If you have access to the mysql database via like phpmyadmin you can just EMPTY the products table. You will need to make sure the same is done for Specials also if the were linked just to keep consistancy.

I dont advise editing via mysql so do so at your own risk

30 Aug 2007, 6:48 PM
#4
pasher avatar

pasher

New Zenner

Join Date:
Dec 2005
Posts:
64
Plugin Contributions:
0

Re: Delete all products?

You could just delete the categories the products are in, then re-create the categories.
I've just done this for exactly the same reasons as you, but it was easy as there was only one category. If you have many, it may not be so practical?
hth
Pa

30 Aug 2007, 7:59 PM
#5
brandtim avatar

brandtim

Zen Follower

Join Date:
Apr 2006
Posts:
250
Plugin Contributions:
0

Re: Delete all products?

It seems like a lot of work to have to go through just remove a single space.

You could easily accomplish the goal of removing the space either with MySQL or PHP ...

BrandTim

4 Apr 2011, 2:39 PM
#6
niallo58 avatar

niallo58

New Zenner

Join Date:
Feb 2011
Posts:
34
Plugin Contributions:
0

Re: Delete all products?

is there a way to delete all the products from my webpage http://mauricedoodysales.ie/
without bringing up the error message, partially deleted items in database?

10 Feb 2013, 5:43 AM
#7
dancingbay avatar

dancingbay

New Zenner

Join Date:
Jan 2013
Posts:
29
Plugin Contributions:
0

Re: Delete all products?

Zen Cart v1.5.1, new install on about 2/4/2013
Plugins: Local Sales Tax Mod, Easy Populate CSV

I want to delete all the products and categories. I loaded the test data with my install, but want to remove it all and start fresh with Easy Populate CSV. I have access to phpMyAdmin and am comfortable with using it, but do not what to truncate any tables that I shouldn't, or not truncate tables that I should. I am hoping there is a cleaner way than truncating a bunch of tables, but I can do it if I know which ones need to emptied.

The ones that I feel like need to be truncated are:

zencart_categories
zencart_categories_description
zencart_products
zencart_products_attributes
zencart_products_attributes_download
zencart_products_description
zencart_products_discount_quantity
zencart_products_options
zencart_products_options_values
zencart_products_options_values_to_products_options
zencart_products_to_categories

Not sure about zencart_product_types & zencart_product_types_to_category

Is my list correct? Are there some in there that shouldn't be emptied? Are there others that should?

I hope there's someone still watching this thread since it was started so long ago. If I don't hear something in a couple of days, I will re-post as a new thread.

Thanks,
Alisa

10 Feb 2013, 5:53 AM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Delete all products?

The SMARTEST way is to run zc_install and set it up as if it's a new site. That'll give you a truly fresh clean database, and you can be confident that you've cleared all the things you ought to.

10 Feb 2013, 8:59 PM
#9
dancingbay avatar

dancingbay

New Zenner

Join Date:
Jan 2013
Posts:
29
Plugin Contributions:
0

Re: Delete all products?

would that mean that I will loose the 2 plugins and the template I've installed, plus all the changes to the template?

Thanks,
Alisa

10 Feb 2013, 9:22 PM
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Delete all products?

Running zc_install and redoing the "install" portion will replace the database contents. It will not touch all the .php files you've uploaded.
It will reset any admin settings you've changed, but there probably weren't many of those so the impact of that would be minimal.

Another thing to consider: there's nothing wrong with having two copies of Zen Cart running: one for testing and one for "live". You might consider setting up another database for live site (I'm assuming that your desire to wipe out demo products means that you're ready to start entering products into your store in preparation for going live).

10 Feb 2013, 10:20 PM
#11
dancingbay avatar

dancingbay

New Zenner

Join Date:
Jan 2013
Posts:
29
Plugin Contributions:
0

Re: Delete all products?

I think the only thing I might have to reload are the tables for Local Sales Tax Mod. I had to created a table and update a few more for that. There also may be and sql statement or 2 I will need to run for my template which is the Alysa Rounded from PicaFlor Azul, but not sure about that. The plugins I installed were Local Sales Tax Mod and EasyPopulate CSV for the version v1.5.1 of ZenCart I'm running.

I initially installed ZenCart at ControlPanel on HostGator, so am not exactly sure how to run zc_install. I'm doing some research so if I figure it out before I hear from anyone, will post back to let you know I've figured it out.

As far as having a test and live ZenCart, I am assuming for the test cart, I would just do a new install from Control Panel, but designate a folder, like public_html/testcart/ for instance.

Thanks,
Alisa

10 Feb 2013, 10:40 PM
#12
dancingbay avatar

dancingbay

New Zenner

Join Date:
Jan 2013
Posts:
29
Plugin Contributions:
0

Re: Delete all products?

I went to public_html in FileZilla, looking for zc_install/index.php an cannot find that folder. In public_html, I have these folders:

admin-xxx (zencart admin)
cache
docs
download
editors
email
extras
images
includes
logs
media
popups
tempEP
Testing (which is a folder I created to test PHP scripts)

Before I installed this on the server, I played around with it some at localhost. In that install, I have a folder called zc_install_DB. Not really sure why it would be here and not on my server since I did the installs the same way. Any advice. Can I just drag that folder over to my live server?

This is giving me a headache.

Thanks,
Alisa

10 Feb 2013, 10:51 PM
#13
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Delete all products?

As far as deleting "all products", there are a LOT of tables involved, including the ones in each of these three sections:
http://www.zen-cart.com/wiki/index.php/Developers_-_Database_Schema#Product_Info
http://www.zen-cart.com/wiki/index.php/Developers_-_Database_Schema#Sales.2FSpecial_Pricing_Details
http://www.zen-cart.com/wiki/index.php/Developers_-_Database_Schema#Product_Type_Extra_Information
... plus any tables you've added (ie: plugins or custom coding) that store data related to any specific product or category or attribute or download or extended product information.

10 Feb 2013, 10:53 PM
#14
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Delete all products?

dancingbay:

I went to public_html in FileZilla, looking for zc_install/index.php an cannot find that folder. In public_html, I have these folders:
...

Before I installed this on the server, I played around with it some at localhost. In that install, I have a folder called zc_install_DB. Not really sure why it would be here and not on my server since I did the installs the same way. Any advice. Can I just drag that folder over to my live server?
Your Hostgator one-click install would have removed the zc_install folder because it's no longer needed after installation (and shouldn't be left on a live server anyway). So, yes, you could drag and drop it to the server (as long as it's from the same version of Zen Cart).

10 Feb 2013, 11:26 PM
#15
johnnycopilot avatar

johnnycopilot

Zen Follower

Join Date:
Mar 2012
Posts:
325
Plugin Contributions:
0

Re: Delete all products?

my reply was for an old post question so I deleted it.. sorry.. Just said that I use Apsona Shopadmin.

11 Feb 2013, 12:05 PM
#16
philip937 avatar

philip937

Totally Zenned

Join Date:
Aug 2009
Location:
Bedford, England
Posts:
968
Plugin Contributions:
0

Re: Delete all products?

another option (not saying its the best) is you could use an addon like Easy Populate.

It has the function to delete products, you simpley download the full catalouge then instead of setting the product status to 0 or 1 you set it to something like 8 or 9 then when you up load the file it deletes the products with the status 8or9..

I have used this factily before and havent had any issues with it....yet ;)

11 Feb 2013, 2:09 PM
#17
dancingbay avatar

dancingbay

New Zenner

Join Date:
Jan 2013
Posts:
29
Plugin Contributions:
0

Re: Delete all products?

Is the product still in the database? What about the categories? All the products/categories in the sample data is related to music and computers. All my products are related to things that can be embroidered or engraved. So, that being said, I want it all gone.

I do have EasyPopulate CSV for v1.5.1 installed, but am having a bit of trouble finding any documentation on what each column in the .csv files does.

Using EasyPopulate wold be my first choice if it does away with all the categories/products that are not needed. On that note, if I go to Catalog -> Categories/Products and try to delete a product from that point, on some products, clicking the red x takes me to a sitemap of my site that says page not found. I did go in and change all the categories and on some of those, it's like the product got unlinked or something.

Thanks,
Alisa

11 Feb 2013, 2:38 PM
#18
philip937 avatar

philip937

Totally Zenned

Join Date:
Aug 2009
Location:
Bedford, England
Posts:
968
Plugin Contributions:
0

Re: Delete all products?

I dont believe easy populate will delete categories. just poducts. if you read the documentation there used to be a section where it tells you what to set the product status to make the product delete.

11 Feb 2013, 4:06 PM
#19
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Delete all products?

EP won't reset the product numbers. It will cause the system to leave gaps and start at the next highest product number since the last product number created whether that number was deleted or not.

11 Feb 2013, 4:34 PM
#20
philip937 avatar

philip937

Totally Zenned

Join Date:
Aug 2009
Location:
Bedford, England
Posts:
968
Plugin Contributions:
0

Re: Delete all products?

DrByte:

EP won't reset the product numbers. It will cause the system to leave gaps and start at the next highest product number since the last product number created whether that number was deleted or not.

not sure I understand DrByte, can this cause a problem? or is it just "untidy"?

what do you mean by leaving gaps? can you give an example so I can understand a little better?

Thanks