Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Mass Products Delete?


chackett

Recommended Posts

Posted

Is there anyway I can quickly and easily do a mass product delete?

 

My situation is that I've just discovered that my supplier has created a "discontinued" products list, and I need to go through and make sure these items are deleted from my store.

 

I've got about 4,500 items in my store, and there are maybe 300 items in the discontinued items list. If I were a developer, I'm sure I could quickly and easily write a script. Alas I'm not :)

 

But what I'd like to do is something like foeach $prodcutID in @discontinued_products { delete_from_store($productID); }

 

How bout them apples? Seriously though, I think you can see the jist of what I want to accomplish, but it's way over my head :) I know it's not that easy, since the product / model exists in multiple tables and I don't know how to read in the csv or list of products to be deleted to construct something like @discontinued_products.

 

Is there anything out there that can do this for me? Is there a guide on how I can use EPA or EPB to accomplish something like this?

 

Thanks all,

 

Chris

Posted

Chris,

 

 

If you have used the Manufactures box to identify all the products that supplier sells in your store, you can delete the manufacture and the products in one step.

 

If you have all the products in one category, delete the category.

 

IF you didn't do any of those things, and have a common search criteria for the products you can use myphpadmin to identify the products in the products table and remove them.

 

 

 

Chris

Posted

 

IF you didn't do any of those things, and have a common search criteria for the products you can use myphpadmin to identify the products in the products table and remove them.

That's the only way I see of doing it as well. But, and sql statement will have to delete from a couple of tables... Products, products_descriptions, products_to_categories....maybe more. But easily done.

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Posted

Thanks for the quick responses! I appreciate it.

 

My supplier simply sends a simple csv file that has the productid / product_model, description and a couple other fields that I don't really care about. Really I only care about the product model, which is my product id.

 

Is anyone willing to assist me with writing a script to accept (or parse out) a list of productID's and delete them from the necessary tables?

 

Another table I can think of is "products_specials" I think .. since I use that table to do the strikethrough / lower sale price on all my items.

 

Thanks!

Chris

Posted

Before writing something new, take a look at EasyPopulate. It can mass add products from a CSV file -- I'm not familiar with the details, but perhaps it can also delete products? Worth a look before you start fooling with the database, or deleting hundreds of products one-by-one.

Posted

Maybe this is a documented issue, but I have CRE, and it's got Easy Populate installed, and there are two sections, Basic and Advanced.

 

I took a small export using EPA, and deleted everything but the header row. Then I copied and pasted the column for product_model and pasted "delete" in the v_action field. I also copied EOREOR into the final column.

 

When I tried to import this file using EPA (which is what I created the export with), it tells me that I'm trying to import a file created with Easy Populate Basic. What's that all about.

 

Trying to import the file with EPA seems to yield nothing. No status message about items deleted or updated, but no failures either.

 

Any suggestions?

 

Thanks,

Chris

Posted

Sorry, I don't use EP myself, so I can't help with that. I just thought that since it can bulk import, it might be able to bulk delete. Maybe not.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...