Im want to import my products from a .txt file. So far no problem. The only issue i have is that i cant link my product with an image ( i have already imported in media/import )
$data = array(
array(
'sku' => $artikel_nr,
'_product_websites' => array('web1','web2'),
'_attribute_set' => convertCategorie($category)[2], // siehe auch in Kategorie tabelle
'_type' => 'simple',
'ean' => $ean_nr,
'price' => $preis,
'name' => $prodkttitel." ".$farbe,
'description' => 'default',
'short_description' => $prodkttitel,
'long_description' => $short_description,
...
'_media_image' => $artikel_nr.".jpg",
'_media_is_disabled' => 1,
'image' => $artikel_nr.".jpg",
'_media_lable' => $artikel_nr.' image',
'_media_position' => 1,
'_media_attribute_id' => Mage::getSingleton('catalog/product')->getResource()->getAttribute('media_gallery')->getAttributeId(),
'small_image' => $artikel_nr.".jpg",
'thumbnail' => $artikel_nr.".jpg",
)
);
my images are named after the sku and i already have them in the media/import. the import is not throwing any exceptions but i cant see any pictures loaded into the produkt.
$import = Mage::getModel('fastsimpleimport/import');
try {
$import = Mage::getModel('fastsimpleimport/import');
$import
->setUseNestedArrays(true)
->processProductImport($data);
} catch (Exception $e) {
print_r($import->getErrorMessages());
}