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

HELP - Need ‘import products’ to over-write or delete all existing products - how do I do it? 
 
benfrain.com
Sr. Member
 
Total Posts:  142
Joined:  2008-08-15
 

When I import a CSV into Magento using the Import/Export (dataflow) it adds the products to the existing products as it should. However, can it be made to over-write them?

When I run the import, I want all existing products to be removed, then the items on the the CSV adding. Or, simply remove any items in the current database that aren’t on the new CSV that is being imported.

The reason:
The business I am involved with produces a CSV file each day that contains all the stock/product information. This information changes on a daily basis. If the item is on the CSV it is in stock and available for sale. If it isn’t - they no longer have it in stock and don’t want it for sale on the site.

Is there an amendment I can do to a profile to make this work?

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

I just had another thought…

Is it possible, rather than deleting the existing records, to ‘disable’ them prior to the new dataflow CSV import? Presuming that is possible…

The new import file could have all products set to ‘enable’ so that any SKU’s in the existing Database (that aren’t on the new import) will remain disabled (and therefore not viewable by the end-user) whilst products with ‘enable’ in the CSV will be viewable.

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

There is a different dataflow profile that just does stock quantities.
With the normal Import All Products profile, the product is found by SKU. So if that SKU exists, the product is updated. If the SKU does not exist, the product is created. There is no provision for deleting products with that profile. You might need to use the API.

 
Magento Community Magento Community
Magento Community
Magento Community
 
hulaqueen
Jr. Member
 
Total Posts:  19
Joined:  2008-09-20
 

Unfortunately for me when I did the import it DUPLICATED all products, even though the SKU is the same. Anyone have the same thing happen and find a solution?

Actually I just did it again and it’s not duplicated this time (running the same profile). I wonder if I double clicked the first time and it ran twice into the same file?

 
Magento Community Magento Community
Magento Community
Magento Community
 
hulaqueen
Jr. Member
 
Total Posts:  19
Joined:  2008-09-20
 

Benfrain,

You could export all products, disable them all, then import the file. Then when you imported the new file it would selectively turn on the ones in that file. It seems like that would work.

 
Magento Community Magento Community
Magento Community
Magento Community
 
atlasit
Member
 
Avatar
Total Posts:  40
Joined:  2008-06-03
Los Angeles, CA
 

Hulaqueen,

I can see how the disabling of products would work from an enduser / customer standpoint.  From the admin side though.  even if the product was disabled, it’d still show up in the search results and products lists.  is there a way to have them automatically filtered out without having to manually toggle the ‘enabled’ filter. 

thanks!

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