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

the quest for an efficient product import script
 
Harry-S
Jr. Member
 
Total Posts:  8
Joined:  2009-11-04
 

to dweeves
unfortunatly it stopped work for me. the fields expect qty, type, websites, attribut_set, sku are not imported and all empty (on older versions it import all)
here is link to my test file, which i import
http://dl.dropbox.com/u/1645583/import3.csv
can you look
thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
Harry-S
Jr. Member
 
Total Posts:  8
Joined:  2009-11-04
 

to dweeves
i found that all attributes after import are presented in database, but in admin panel on product grid and product edit page all fields are empty

 
Magento Community Magento Community
Magento Community
Magento Community
 
Harry-S
Jr. Member
 
Total Posts:  8
Joined:  2009-11-04
 

i have error
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘71-1’ for key ‘UNQ_CATEGORY_PRODUCT’
when i import file wjth two lines for one product each for separate store view

 
Magento Community Magento Community
Magento Community
Magento Community
 
ghinton
Jr. Member
 
Total Posts:  6
Joined:  2010-05-09
 

First off… thank you very much!!! With over 14,000 products now and will soon be adding another 85,000 products, this is a life saver!!!

Now, when I just used version 4 I did an import using the entire header which is standard with magento, but it seems to ignore tax class, weight, and recurring. I have all of those fields filled in, but they are not taken into account when importing.

 
Magento Community Magento Community
Magento Community
Magento Community
 
markw87
Jr. Member
 
Total Posts:  27
Joined:  2010-06-28
 

Hey There,

Script seems to go into endless loop and causes too many connections to SQL, It does seem to import data though however I cant seem to get it to update the Status field, Ive got to update the status of all my stock based on an external feed. So i generate a CSV file whith the status of the sku but it does not seem to update in the backend. When i added a diffrent website the product updated so it seems to be working just not processing the status column.

Regards,

Mark.

 
Magento Community Magento Community
Magento Community
Magento Community
 
MarkR
Jr. Member
 
Total Posts:  6
Joined:  2008-09-04
 

Same as above, script went into an endless loop which resulted in my host sending me an email about overloading the server! I’m using 1.4.1.1. Any ideas, I really could do with this script working.

 
Magento Community Magento Community
Magento Community
Magento Community
 
dweeves
Enthusiast
 
Total Posts:  877
Joined:  2010-06-26
FRANCE
 

Hi all,
i’m currently away from my computer but will be back beginning of next week.
will implement a fix for both status management & categories.
i’ll also take a look at tax class & weight issue (however both should have worked)

 
Magento Community Magento Community
Magento Community
Magento Community
 
ayasoftware
Jr. Member
 
Avatar
Total Posts:  21
Joined:  2009-06-02
 

Hello everybody!

I have released a new “Direct SQL Update “ extension based on Dweeves script.
The Module will be available soon (has now a pending status) and can be downloaded via Magento Connect (FOR FREE).

http://www.ayasoftware.com/content/magento-direct-sql-update

Thanks,

 
Magento Community Magento Community
Magento Community
Magento Community
 
dweeves
Enthusiast
 
Total Posts:  877
Joined:  2010-06-26
FRANCE
 

back on my computer !!!!
will upload a 0.4.1 in the following hour.

 
Magento Community Magento Community
Magento Community
Magento Community
 
sonix
Jr. Member
 
Total Posts:  8
Joined:  2010-05-26
 

dweeves, thanks for your great work. any possible to add function to export the products?
and also I have to reindex Stock Status after import using ver. 0.4, or all of my products are out of stock.

 
Magento Community Magento Community
Magento Community
Magento Community
 
dweeves
Enthusiast
 
Total Posts:  877
Joined:  2010-06-26
FRANCE
 

updated version 0.4.1
- slightly enhanced web interface css
- directory permissions test added
- warning message for 1.3.x users to tell them to reindex (since no shell reindexer is available)
-bugfixes on:
status management (see below)
category management (now if the same product redeclares its categories on different stores, it won\’t raise an exception)

code changes:
externalized properties class.
added fshelper class & some handy functions.

Status Management:
You should now declare the “Enabled” status label in the config (defaults to “Enabled”, so english users won’t have to worry about it, for other languages users, put the localized string that match “Enabled” status , i.e : “Activé” in french (with the accent))

Qty & other decimal values management policy
All empty values are considered as “non significant”, so no change will be done on the imported product stock for qty and attribute value will remain unchanged for other decimal values.this is to have a coherent behaviour on “update” & “creation” mode.
if you want to set 0 qty please put 0 in the qty column.

As usual, feel free to report any problem.

File Attachments
magento_mass_importer.zip  (File Size: 20KB - Downloads: 190)
 
Magento Community Magento Community
Magento Community
Magento Community
 
dweeves
Enthusiast
 
Total Posts:  877
Joined:  2010-06-26
FRANCE
 

to ayasoftware:
you may also add the web interface in your module, that would make a great alternative to dataflow !!!!

 
Magento Community Magento Community
Magento Community
Magento Community
 
dweeves
Enthusiast
 
Total Posts:  877
Joined:  2010-06-26
FRANCE
 

to all,

if you could help me on this one, it would be great:
http://www.magentocommerce.com/boards/viewthread/202211/

 
Magento Community Magento Community
Magento Community
Magento Community
 
ayasoftware
Jr. Member
 
Avatar
Total Posts:  21
Joined:  2009-06-02
 

Hello Dweeves, Yes I’ll look at your web interface.

If you want I can give you access to the module’s directory (using FTP) . You can then add any changes you want and we will upload the final work to Magento Connect.  This will save some time for members, because they will be able to update the version very easily using Magento Connect.

I’m also adding some new functions. Thus will be a great idea if we can cooperate. 

TODO:  Remove product Using SQL

It is safe to remove products using SQL (1000’s of products) in case something goes wrong when the script tries to add new products.

Here is a scenario:

A user X, generates a csv with 1000’s of SKU . Many websites share the same CSV,
thus the script should not add any new products (I understand, we can solve this by changing the following: 

if (! isset ( $pid )) {
                
//$pid = $this->createProduct ( $item, $asid );
            
}

Regards,

 
Magento Community Magento Community
Magento Community
Magento Community
 
dweeves
Enthusiast
 
Total Posts:  877
Joined:  2010-06-26
FRANCE
 

cleanly deleting products by their sku means:
- removing all attributes associations bound to this product
- then remove product from catalog table for the current websites/stores.

i think the best way to perform batch deletion is to provide a “delete” special column (however,in that case, we would diverge from magento csv format)
however, a tradeoff can be made by creating a “delete” global option for the importer that tells that it should not create new products but only remove all attributes bound to the product.
don’t forget that attributes are only deleted/recreated if present in the csv columns. so an attribute that is not in the csv column will remain untouched in case of update.
so, the “attribute cleaning” code should change if we are in “delete” mode or we find a delete flag on the row to remove all attribute bindings for the product (not only those matching csv columns)

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