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
 
markw87
Jr. Member
 
Total Posts:  27
Joined:  2010-06-28
 

Hi Dweeves,

Thanks a million that solved the loop problem perfectly, Script seems to be working now.

In regards to the status It doesn’t seem to be working correctly, While it does update in the backend, It doesn’t seem to update on the sites. Ive tried to reIndex & Clear cache but the item is still appearing in my stores after I set status to Disabled. If i go into the product and hit Save it then disappears from the store views.

Ive attached a screenshot of my CSV if its of any help.

Image Attachments
csv.jpg
 
Magento Community Magento Community
Magento Community
Magento Community
 
dweeves
Enthusiast
 
Total Posts:  877
Joined:  2010-06-26
FRANCE
 

to markw87,
obviously it seems that your websites column is empty smile
can you fill it with the websites (comma separated), unless that, the script cannot guess on which websites the product is bound.

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

Dweeves,

But surely the status of an item isnt website/store specific, I know its a required column but I have 4 stores, Some products feature in multiple stores some don’t and I do not know which SKU’s feature in which stores without manually checking them.

 
Magento Community Magento Community
Magento Community
Magento Community
 
shimoda
Jr. Member
 
Total Posts:  22
Joined:  2008-10-30
 

Dweeves, you sir are a scholar and a saint!  Superb script, thanks for sharing and developing.

We’re using it to update stock levels on a multi store installation, and it’s taking around 30 seconds to achieve what it took 4-5 hours in dataflow..!

We also leave the ‘websites’ field blank, and it’s updating default stock levels fine, with different sites showing correct stock availability immediately after the script running.  At least, it does on the test server - now to try it on the production server!

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

Shimoda, Do you mind try changing the status of an item and seeing if it updates on the front end across the stores ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
shimoda
Jr. Member
 
Total Posts:  22
Joined:  2008-10-30
 

Yup, same thing here.

I left all other fields in the working csv the same, just added a ‘status’ field.  Backend shows the changes after update, but have to enter a product and save in order for changes to show on the frontend.

I’ve also left the websites field blank.  Did try changing the ‘status’ attribute to Global as a long shot, but no joy.

Oddly, I only seemed to be able to disable products, not enable them?  I’m a little bit foggy after a Friday night, so it might be down to that!

On a tangent....

Is there a simple way to just update products that currently exist with the data from the csv, rather than creating all the products?  We’re using a small number of products from one of our suppliers currently, but will be adding to it over time.  As we add new products, these will clash with the SKUs of the automatically created ones.

I ran their csv on the test machine, but ended up with over 70,000 products in the database I really didn’t want!!  Mind you, they were added very quickly smile

Maybe an option for the UI?  Reset / update existing / create?

 
Magento Community Magento Community
Magento Community
Magento Community
 
craigcriv
Sr. Member
 
Total Posts:  85
Joined:  2009-08-05
 

Yes that would be very helpful.
I am currently using this to update inventory on about 25,000 skus.
But with that many it’s almost impossible to not send in nonexistent skus. Then the tool creates a new product with the skus I do not have.

A way to prevent a new product being created would be great.

Maybe it could be written in the script to not create a new product or sku if a certain attribute does not exist.  IE: weight or name

Or like the last post if it can be flagged as an update file or new products file.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Ericthemad
Jr. Member
 
Total Posts:  3
Joined:  2010-05-26
 

Just thought I would let you know that when running on a case-insensitive filesystem, such as the default for OS X, you get an error message when attempting to use the script. The solution is simply to rename the config.php file and change line 44 in mmi.php to

require_once("new-config-name.php");

Fatal error: Cannot redeclare class Config in /usr/local/PEAR/Config.php on line 44 Call Stack: 0.0003 642544 1. {main}() /path-to-site-root/mmi/mmiweb/mmi.php:0 0.0037 1230008 2. require_once(’/usr/local/PEAR/config.php’) //path-to-site-root/mmi/mmiweb/mmi.php:44 0.0067 1747512 3. require_once(’/usr/local/PEAR/Config/Container.php’) /usr/local/PEAR/config.php:21 0.0071 1810656 4. require_once(’/usr/local/PEAR/Config.php’) /usr/local/PEAR/Config/Container.php:20

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

Hi all,

took some off time this week end.
i’ll soon post a 0.4.4 with gui options to set mode “update” or “create” regarding non already existent skus.

i’m still investigating the status / frontend relationship. if i find the solution soon enough, i’ll also put it in the 0.4.4

btw, i found a bug in the multiple store mgt in 0.4.3 , you should have ran into a syntax error or unwanted behaviour with multiple stores set in the stores column (comma separated), it’ll be also fixed in 0.4.4

to shimoda, i may admit being some kind of scholar , but still far from being a saint wink

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

When I tried using the latest version, every time I would run it, it would give me a message stating that it was cancelled by the user, or something to that effect.

 
Magento Community Magento Community
Magento Community
Magento Community
 
craigcriv
Sr. Member
 
Total Posts:  85
Joined:  2009-08-05
 

To Ghinton:  Try refreshing your cache on your browser. At some point you probably hit the cancel option and it may be cached.

Dweeves looking forward for the new update. The gui option will be great.

What is the best way to update from previous versions? Delete the mmi folder via ftp or just copy folder over and overwrite?

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

a copy/overwrite is a good choice for updating script.
0.4.4 will also include a better “cancel/finished” state management.

script to be out in a few hours, update only mode is already implemented smile

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

new version 0.4.4

- New import mode selection (on file selection page, an import mode combo is available,defaulting to “update only")
- Better import state management (should solve persistent “canceled” state problem)
- prefixed all potentially conflicting file names to mmi_xxxx in mmiweb directory (should solve OSX issue)

still investigating item status mgt, will use mysql monitoring to see what’s done by the backend and not done by the script. 
if you know what differs , tell me smile

File Attachments
magento_mass_importer.zip  (File Size: 21KB - Downloads: 118)
 
Magento Community Magento Community
Magento Community
Magento Community
 
flawlessnet
Jr. Member
 
Total Posts:  2
Joined:  2008-09-22
 

Many thanks dweeves - you are a life saver and genius!

I just spent the last 6 weeks trying to import a large database at an average speed of 20 items per minute.

With your code, I got an amazing:

imported 17483 items (100 %) in 749.6718 secs (last 83 in 5.0163 secs) - avg speed : 1400 rec/min

BTW - for the future, it would be good to gave a product delete option as well - it can take just as long to delete products as import them.

 
Magento Community Magento Community
Magento Community
Magento Community
 
craigcriv
Sr. Member
 
Total Posts:  85
Joined:  2009-08-05
 

I’ve just noticed that oddly after an import, a lot of my products are showing out of stock on the frontend but look fine on the backend.
Even after refreshing and rebuilding all the cache.

Please Help

websites attribute_set type sku qty status is_in_stock
base Default simple WFP158355 17 Enabled 1

I’ve attached an image. Not sure how to paste it in post

Image Attachments
inv update.jpg
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top