Magento Forum

   
the quest for an efficient product import script
 
Heesbeen
Jr. Member
 
Total Posts:  8
Joined:  2010-05-11
 

First of All! What a great script!

I would like to support development. Is there a way to do a small donation?

And of course there are some wishes.

In my old fasion import i have made a array with attribute names (dropdowns or multiselect) wich may get new values from the import if the value not allready excists for that attribute.

For example attribute color has in magento blue, yellow, white. Green and other colours are automatically added when they are found in the import.

Is that possible with this script?

I want to do some things after import with the file. For example move it to a archive folder. I can make this my self. 

Hope to hear from you!

Thanks a lot

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

@Heesbeen

Magmi automatically creates attribute option values if not exist. see the wiki , look in “magmi behaviour & magic values” -> “select/multiselect attributes”

it explains how magmi handles this.

for the donation, just go to magmi sf site where you downloaded it, there is a small donate link on the top right of project summary page.

For doing something after import, the easier is to create a shell script that will use magmi cli (a way to call magmi from a php command line) , the command line itself is available using magmi UI URL plugin , by selecting “magmi cli” in the select box of the configuration panel.

 
Magento Community Magento Community
Magento Community
Magento Community
 
laccas
Member
 
Total Posts:  39
Joined:  2010-08-08
 

Hello!

I\’m trying to import with magmi, but it always stuck at the line 16. I will deleted 1/3 of the lines, but it\’s always stuck at line 16. I uploaded a sample file. I use Excel for editing.

I use $ for seperator. Category import is ok, i use the -> for the different levels. I also changed character encoding to utf-8 without BOM, but a few line also works. After 15 lines, it’s not working.

Thanks for your help.

File Attachments
failed_import.txt  (File Size: 257KB - Downloads: 83)
 
Magento Community Magento Community
Magento Community
Magento Community
 
dweeves
Enthusiast
 
Total Posts:  877
Joined:  2010-06-26
FRANCE
 

Hi

1.This csv format is not a Dataflow format. (the columns using _ are typical from 1.5 newer import/export format which is not supported by magmi)
Please generate file using Dataflow profile for export to have good column names.

 
Magento Community Magento Community
Magento Community
Magento Community
 
laccas
Member
 
Total Posts:  39
Joined:  2010-08-08
 

Same error again. I changed the file header. The first is: CSV Datasource v1.1.2 - warning: line 16 , wrong column number : 62 found over 64, line skipped

I attached the csv file.

File Attachments
not-good.txt  (File Size: 108KB - Downloads: 83)
 
Magento Community Magento Community
Magento Community
Magento Community
 
randomharvest
Jr. Member
 
Total Posts:  15
Joined:  2008-12-01
 

@dweeves

Firstly, congrats on developing and maintaining the most important tool for Magento.  You should be licensing this software to make some money to pay for further development and support staff.

Anyway, my question is this ..

How do we set a generic position for an imported product in a category, or in all categories that it resides? .. in my case I have it set so that the import runs products into their specific category, with closer to the root node categories showing the subcategory items but they are all set to position 0.  Ideally I\’d like all products to have their position set to 100 for all categories so that I can manually promote products to certain positions within a category if I wish (creating a working gap if you will).

Note: I realise we can set minus values manually, but would like to import their default position in all categories they reside with the import process.

Thoughts on how to do this with Magmi importing both products, categories etc?

 
Magento Community Magento Community
Magento Community
Magento Community
 
laccas
Member
 
Total Posts:  39
Joined:  2010-08-08
 

If it would be working, i will give you donation. You offer payed support? I have other questions, too.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Heesbeen
Jr. Member
 
Total Posts:  8
Joined:  2010-05-11
 

Thanks again. This script works so great. I’ve made a donation.

You Can Donate Here

 
Magento Community Magento Community
Magento Community
Magento Community
 
laccas
Member
 
Total Posts:  39
Joined:  2010-08-08
 

It stucks always after 15 product. :( I tried to change the seperator

UPDATE: It\’s working. I checked Allow truncated lines (bypasses data line structure correlation with headers).

 
Magento Community Magento Community
Magento Community
Magento Community
 
laccas
Member
 
Total Posts:  39
Joined:  2010-08-08
 

Product reindexing not work correctly, because the products not visible at frontend. They’re all visible, and all products settings ok.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Heesbeen
Jr. Member
 
Total Posts:  8
Joined:  2010-05-11
 

I’ve made a nice .sh script thats running thru the cron.

One problem.

After it has runned permissions of created files and folders are set to 664. This gives issues with the images for a second import and gives issues with the magmi interfaces. Giving some warnings about the fwrite() function.

After i chmod both magmi and media folder everythings works fine again.

I this a server issue? the directory permissions and file permission field in Magmi are both seth to 755

This is the warning i get for the images of the product i’m updating

/home/username/domains/mywebsite/public_html/media/catalog/product/e/x/explorer.jpg : 2,copy(/home/username/domains/mywebsite/public_html/media/catalog/product/e/x/explorer.jpg) [function.copy]: failed to open stream: Permission denied
Image attributes processor v1.0.19 - error copying

Thanks a lot!

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

@laccas

1) Since your csv had _ in the headers of your csv, i suppose the format is not really the one magmi expects , but near enough to work.

2) for the allow truncated lines, this proves your csv had some formatting / generation problems. this also means there is no way to know which of the columns are missing on some rows. while a handy “workaround”, it won’t guarantee the faulty lines will be imported with the right data at the right place.

3) For the visibility & status, and as said in the magmi wiki , ensure you use the ”Generic mapper” plugin and that you have made the necessary translation files for it if your data is not in english (which seems to be the case).

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

@HeesBeen

First, thanks for the donation.

For your permission problem :

- Try to resave the global parameters of magmi (perhaps you did set them to 755 but forgot to save)
- If strange behaviour still happen, then maybe it’s a server issue.

 
Magento Community Magento Community
Magento Community
Magento Community
 
safisch
Jr. Member
 
Total Posts:  24
Joined:  2011-07-24
 

I’m suddenly getting this error:

Warning: fopen(/hsphere/local/home/xxx/xxx.com/magmi/state/magmistate): failed to open stream: Permission denied in /xxx/local/home/xxx/xxx.com/magmi/inc/magmi_statemanager.php on line 45 Warning: fwrite(): supplied argument is not a valid stream resource in /xxx/local/home/xxx/xxx.com/magmi/inc/magmi_statemanager.php on line 46 Warning: fclose(): supplied argument is not a valid stream resource in /xxx/local/home/xxx/xxx.com/magmi/inc/magmi_statemanager.php on line 47

 
Magento Community Magento Community
Magento Community
Magento Community
 
safisch
Jr. Member
 
Total Posts:  24
Joined:  2011-07-24
 
kirkland_books - 01 December 2011 09:44 AM

Excellent module.  Why can’t the Magento native import be that flexible easy to configure ?!

One tiny problem I noticed I’m having is dates.  I put for example “30/11/2012” in the csv, but it ends up as ‘30/11/200” in the db?

Any ides why.

Hi Kirkland,

Magmi wants the date in the format yyyy/mm/dd.  Dweeves promises to make the dd/mm/yyyy compatable in a future release.

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