Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Possible to create a Profile to disable or delete all products? Genius required…
 
benfrain.com
Sr. Member
 
Total Posts:  142
Joined:  2008-08-15
 

Is it possible to create a profile that will disable or delete all products in Magento?

Otherwise is there some other way that can be automated to delete/disable all current products in the database?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Discovery
Enthusiast
 
Total Posts:  767
Joined:  2007-12-29
 

The user interface ‘products’ works fine for deleting all products, admittedly a tad slow when in the thousands. Why do you need a profile for the task?

 
Magento Community Magento Community
Magento Community
Magento Community
 
benfrain.com
Sr. Member
 
Total Posts:  142
Joined:  2008-08-15
 

Discovery, all the products and their enabled/disabled state on this store will need to be updated each day. When I hand it over to the client I would like a single operation to update the products/stock. As the import file will only contain the ‘active’ products, I need a way of disabling the existing ones already on the store before the new ones are imported.

Ideally I would like the products on the incoming file to be set to enabled and any products already in the database (and not on the import file) to be disabled, with the disabling of the old products happening at the end of the operation.

Otherwise, if I disable all first through the admin panel I will have downtime with no active products whilst the new ones are brought in through dataflow. As there is in excess of 1000 products it could be a fair wait as the products are brought in each day.

Hope that made a little sense?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Discovery
Enthusiast
 
Total Posts:  767
Joined:  2007-12-29
 

A few ideas. Maybe don’t bother deleting first, just upload a file that has ‘deleted’ SKU’s set to visible nowhere. Anything old will be over-written with new product descriptions, etc. and has-been products get ‘deleted’. Preparing the file might be easier in the ERP, with a merge program or some other workaround that gets automated. In that way there will be no time when the store is offline.

Also, if importing configurables, check this post:

http://www.magentocommerce.com/boards/viewthread/6941/P60/

 
Magento Community Magento Community
Magento Community
Magento Community
 
benfrain.com
Sr. Member
 
Total Posts:  142
Joined:  2008-08-15
 

The problem is that the ‘upload’ file is effectively a live ‘stock list’ for the store. It will only show the items that are ‘in stock’ or live as it were, it won’t show the products from yesterday that have since been sold (and sold not necessarily through the site but perhaps via the telephone etc - hence my inability to just use stock monitoring).

Therefore, whilst the upload will overwrite ‘good’ SKU’s, it can’t take of the ones that aren’t on the upload file (they would remain alive as they were uploaded as ‘enabled’ the day before)

Discovery - pardon my ignorance but what is “ERP’? They aren’t configurable products (yet) but will check out that thread regardless.

 
Magento Community Magento Community
Magento Community
Magento Community
 
joyously
Guru
 
Total Posts:  447
Joined:  2008-08-21
 

There is a different dataflow profile for updating just the stock quantities. That might work better for you.

You could also take one of the existing adapters (the code for the dataflow profile) and modify it to do deletes or changing the visibility of the product. One thing to consider is how to identify the products that were already there, since you want to disable them at the end of the process. You could use the “New From” date field for that and then just delete anything that doesn’t have today’s date in it at the end.

 
Magento Community Magento Community
Magento Community
Magento Community
 
benfrain.com
Sr. Member
 
Total Posts:  142
Joined:  2008-08-15
 

A few months on and I still don’t have this working right so I have a couple of questions…

Firstly, here is the scenario: the store I am working on needs the stock updated daily. They provide this information as a CSV which imports nicely through dataflow. The only items on this daily list are the items that are ‘in stock’.

At present, each day I am deleting (through Admin) ALL the products. Then using dataflow to import the new stock list and when done - the store is correct. However, this means that any product reviews/tags etc get deleted each day too so far from ideal in the long run.

Question 1 - I have tried simply disabling all products (rather than deleting) first and then importing the new stock list but for some reason, even though they are listed as ‘Enabled’ on the stock list, they do not get changed through the Dataflow. They remain ‘disabled’ in the backend - is this the same for everyone? I would have thought it would have overwritten the ‘disabled’ status with ‘Enabled’.

Question 2 - is there a way of changing the XML of the profile so that it overwrites existing records with whatever is in the CSV? Is it something to do with changing <action type="dataflow/convert_parser_csv" method="parse"> in the top of the Actions XML for “overwrite” or something?

Thanks for any help with this folks…

 
Magento Community Magento Community
Magento Community
Magento Community
 
vinlair
Jr. Member
 
Total Posts:  2
Joined:  2009-10-01
 

I think there’s no software that will delete or disable the entire products. Its impossible unless you turn off your server.

vinlair
Dossier de surendettement

 
Magento Community Magento Community
Magento Community
Magento Community
 
VanGilsWeb
Sr. Member
 
Total Posts:  97
Joined:  2010-03-26
 

This is how we work:

1. disable all products
2. import products that are available for selling (enable these products)
3. delete old products (the products that are still disabled)

There are some drawbacks:
- Between step 1 and 2 the frontend has a downtime (because all products are disabled)
- Disabling all products at backend takes very long time.

It would be better is we could first upload the new roducts and afterwards delete old products. But how can we do this?
In other words: How do you know what the old products are?

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top