Forums / Addon Admin Tools / Delete products based on a CSV file

Delete products based on a CSV file

Views: 1,184

Results 1 to 5 of 5
17 Dec 2021, 4:19 PM
#1
nishajh avatar

nishajh

Zen Follower

Join Date:
May 2009
Posts:
105
Plugin Contributions:
0

Delete products based on a CSV file

Hello

Is there a module available that can delete products from the site based on the CSV file ( item number)?

Thanks

17 Dec 2021, 4:49 PM
#2
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,718
Plugin Contributions:
56

Re: Delete products based on a CSV file

I don't believe so. Perhaps you could create one?

In 1.5.7, look at category_product_listing.php lines 255-259; that's what you need to do for the removal.
To learn how to process a csv, look at the CSV model update plugin: https://www.zen-cart.com/downloads.php?do=file&id=2213

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

17 Dec 2021, 5:52 PM
#3
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,109
Plugin Contributions:
56

Re: Delete products based on a CSV file

Actually, the Database I/O Manager (https://www.zen-cart.com/downloads.php?do=file&id=2091) enables you to first export your products to a CSV and then selectively delete them.

So does EZ Populate, but I can never find the link to its current download. Perhaps @mc12345678 can step in?

17 Dec 2021, 8:55 PM
#4
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Delete products based on a CSV file

lat9:

Actually, the Database I/O Manager (https://www.zen-cart.com/downloads.php?do=file&id=2091) enables you to first export your products to a CSV and then selectively delete them.

So does EZ Populate, but I can never find the link to its current download. Perhaps @mc12345678 can step in?
Although the "recent" plugin's name has been Easypopulate V4, it is locatable by searching the plugins by any of many names: EZ Populate, Easy Populate, Easypopulate, or even just Populate.

The location from which to download, access GitHub, and read the Forum thread is found at: https://www.zen-cart.com/downloads.php?do=file&id=2069

Also can export a CSV file via export and update data via upload followed by import.

Product deletion is through setting the v_status field to 9 for the product to delete. The product is identified through use of a primary key. By default the primary key is the product's model (v_products_model field). Changing a configuration setting offers the use of the product's id (v_products_id field), and through an observer another primary key could be set/created.

The import file to do deletions should be as simple as having the primary key field and the v_status field for the product to be delete with the v_status field set to 9.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

31 Dec 2021, 6:10 AM
#5
nishajh avatar

nishajh

Zen Follower

Join Date:
May 2009
Posts:
105
Plugin Contributions:
0

Re: Delete products based on a CSV file

Thank you all