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
 
dweeves
Enthusiast
 
Total Posts:  877
Joined:  2010-06-26
FRANCE
 

Hi Alex,

Glad you use the full power of magmi with complex value replacer expressions.

{{preg_replace('/\"(.*?)\"/e''preg_replace(\'/\\\//\', \', \', \'\1\');', preg_replace('/, /', '/', {item.Categories}))}}

The problem comes from “ (double quote) char that conflicts with parameter saving.

try this instead

{{preg_replace('/\x22(.*?)\x22/e''preg_replace(\'/\\\//\', \', \', \'\1\');', preg_replace('/, /', '/', {item.Categories}))}}

this may work better (\x22 being the char value for double quote)

 
Magento Community Magento Community
Magento Community
Magento Community
 
Lightnest
Member
 
Avatar
Total Posts:  31
Joined:  2011-07-09
London, UK
 

Thanks for you quick, and accurate reply! That did the trick!

This is great, but the ability to use utf8_encode on the value replace has been a real life saver!

I\’m still working through the myriad functions it offers, possibly images next! But it really has been a revelation!

Many thanks,

Alex

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

Edited wiki to document restriction on double quote usage in value replacer.

 
Magento Community Magento Community
Magento Community
Magento Community
 
bitstream
Member
 
Avatar
Total Posts:  45
Joined:  2008-04-10
 

Hi,
I don’t know if you remember, I run across this issue a while ago.
I’ll start from end to start.

Image attributes processor v1.0.17 - no image attributes found in datasource, disabling image processor
Column mapper v0.0.3 - Replacing Column pics by image
Column mapper v0.0.3 - Replicating Column pics to small_image,thumbnail

I also have Value Replacer v0.0.5 to replace pics to image.
There is no problem, I can easily change my csv but I wanted to let you know. In this scenario image processor hit first and obviously there are no images columns yet.

 
Magento Community Magento Community
Magento Community
Magento Community
 
vlijmscherp
Jr. Member
 
Total Posts:  5
Joined:  2009-08-02
 

Hi Dweeves,

I have been reading the Wiki and this thread for some hours now, but can’t seem to find an answer to my question:

Is it possible to let Magmi auto-create product attributes + values within a attribute-set (for simple products) during import?

Thanks for your great importer!
Michiel

-------
Thanks for your answer (below)

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

Magmi does not create attrbutes themselves because attributes are a complex beast needing more than a name to be setup.

However, magmi auto create attribute values on the fly for select & multiselect attributes , this is documented in “magmi behaviour & magic values” part of the wiki.

Magmi can also create “custom options” on the fly since their definition parameters will be located in csv header and can benefit from total custom syntax since this feature is totally out of standard magento dataflow syntax and magento does not provide any way to import them.

So magmi tries to keep as compatible as possible with dataflow format, but maybe at a time i will add support for total custom csv format (not guaranteed though)

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

categories plugin 0.1.6b out

available here as usual

- bugfix release related to custom tree level separator

- fixed UI bug preventing custom separator value to not be taken into account at profile save
- fixed import bug creating double category import due to misuse of custom separator in base path detection instead of “/” (since root detection uses internal DB values for path which are / separated)

FORGOT THIS:!!!!!
magmi 0.7.13 out
available here as usual

###############################
# Table Naming Policy Change
###############################
From now,table prefix won’t add “_” between prefix & table names anymore.
Please update your prefixes settings to add “_” if needed.

##########
#Bugfix
#########

Core: Fixed bug that prevented retrieval of first cache miss attribute metadata (configurable attributes generated column might have triggered it)

 
Magento Community Magento Community
Magento Community
Magento Community
 
stepbyiop
Jr. Member
 
Total Posts:  1
Joined:  2011-02-03
 

Thanks for nice extension.

1. Import images question:
I am using Magmi v0.7.13 with imageprocessor.
I am adding only one external image for big/small/thumbnail columns in csv file.

After import I got:
- only one for big image.
- “small_image”,"thumbnail" images not exists after import.

My column for import images from csv file:
“image”,"small_image”,"thumbnail"

2. “media_gallery” column for csv file.
Can’t understand where I should set/configurate this column to have correct import.
Without “media_gallery” column import is ok.
With “media_gallery” column import is not ok.

I read your Wiki documentation, but can’t find answer.

Thanks in advance for your help.

 
Magento Community Magento Community
Magento Community
Magento Community
 
cchrisgates
Jr. Member
 
Total Posts:  5
Joined:  2011-04-13
 

This looks like the golden nugget we’ve been looking for.  We are migrating a site from another CMS to Magento and need to import product specifications, which in Magento terms are attributes.  My questions are:
1) Does MagMI import individual attributes of a product.  I assume that attribute sets and their corresponding attributes need to be set up first.
2) If 1 is true, do you have some example csv files with explanations that I could see as I’m trying to determine what format I need to export from the current cms to Magento. 
Thanks,
Chris Gates

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

@cchrisgates

1) Indeed , magmi can import all kind of attributes but those should be declared in magento first. (ie: the attribute should exist in magento & magmi will import values of this attribute for each item in import source)
2) The magmi supported CSV syntax is “Dataflow” syntax with some extensions for dataflow unsupported features like multiple images per item , custom options, category import/creation on the fly & some extra magmi “meta” processing (like product deletion)

Magmi CSV syntax is explained here.

 
Magento Community Magento Community
Magento Community
Magento Community
 
infrid
Member
 
Total Posts:  42
Joined:  2011-05-12
 

Hi,
for some reason I can get my csv to work, in cli mode it give me

root@casper:/var/www/magento/magmi/cli# php magmi.cli.php  -mode=create -CSV:filename="permagmi.csv" 
startup:Running Magmi Product Import Engine v1.3.2 by dweeves
startup
:Import Mode:create
title
:MAGMI by dweeves version:0.7.12a
step
:step:0.5%
plugin;Magmi_DefaultAttributeItemProcessor;pluginhello:Standard Attribute Import-1.0.0-Dweeves
PHP Notice:  Undefined offset: -1 in /var/www/magento/magmi/inc/magmi_engine.php on line 182
startup
:Performing Datasouce Lookup...
PHP Fatal error:  Call to a member function getRecordsCount() on a non-object in /var/www/magento/magmi/engines/magmi_productimportengine.php on line 1207

and with the gui it skips the rows

here the very short csv used for tests, it looks good to me.

any help is appreciate, thanks smile

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

@infrid
You need to put the full path filename for your csv file in order for it to be read.

so use

-CSV:filename="/full/path/to/yourfile.csv"

moreover , in cli mode you need also to define a profile to use magmi (you could still override csv filename even using an existing profile)

Profiles are defined using magmi web UI and then can be recalled via command line.

The interest of profiles is to setup plenty of useful parameters that will configure import behaviour & options.

So , if magmi works using UI , please check URL UI Plugin & click on configure.

Then a panel will open letting you select which “automation” mode you want to use for calling magmi in a combo box.
one entry of this combo box is “magmi cli”
just use this command line to run magmi via cli.

this should help your csv to be imported

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

@all

Image Processor Plugin 1.0.17a out!!! (available here as usual)

There was a typo in the media gallery processing method that could have caused some strange image affectation bugs.
Please update & check if all is ok now.

 
Magento Community Magento Community
Magento Community
Magento Community
 
infrid
Member
 
Total Posts:  42
Joined:  2011-05-12
 

nice, thanks. Can you edit the page “Magmi command line” and add in the example something like “note: you must use the absolute path and a profile name”? smile

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

edited previous post to explain a bit more, will update wiki as well.

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