質問

Sorry for the probably simple question, but I am new to both Magento and Fast Simple Import.

The plugin works great for single products with single properties and single images. But I ofcoarse want more colors, more images, etc. etc. What is the best way to do this? I searched the trough the docs and Google, but couldn't find a working example (or answer).

This is what I have right now:

$data[] = array(
    // Main product
    'sku' => $randomString,
    '_type' => 'simple',
    '_attribute_set' => 'Default',
    '_product_websites' => 'base',
    '_category' => array(1, 3),

    // Product per row
    'name' => "Wikitest",
    'price' => 0.99,
    'special_price' => 0.90,
    'cost' => 0.50,
    'description' => 'Default',
    'short_description' => 'Default',
    'meta_title' => 'Default',
    'meta_description' => 'Default',
    'meta_keyword' => 'Default',
    'weight' => 11,
    'status' => 1,
    'visibility' => 4,
    'tax_class_id' => 2,
    'qty' => 0,
    'is_in_stock' => 0,
    'enable_googlecheckout' => '1',
    'gift_message_available' => '0',
    'url_key' => strtolower($randomString),

// Images

    // Image 1
    array('_media_image' => 'http://upload.wikimedia.org/wikipedia/meta/6/6d/Wikipedia_wordmark_1x.png',
    '_media_target_filename' => 'wikipedia.jpg',
    'image' => 'wikipedia.jpg',
    'small_image' => 'wikipedia.jpg',
    'thumbnail' => 'wikipedia.jpg')

    // Image 2
    '_media_image' => 'http://upload.wikimedia.org/wikipedia/meta/6/6d/Wikipedia_wordmark_1x.png',
    '_media_target_filename' => 'wikipedia2.jpg',
    'image' => 'wikipedia2.jpg',
    'small_image' => 'wikipedia2.jpg',
    'thumbnail' => 'wikipedia2.jpg',


);

What happens in above example is that I only upload / attach one image to the product. Also, when i add extra colors qty etc it will create multiple products or crash on duplicate SKU.

Second question, I am importing from an XML and CSV feed. Is there some best practise to turn an XML / CSV into an array? I can write something myself, but I guess something is already available. If not, tips are welcome as well.

Thanks all!

正しい解決策はありません

ライセンス: CC-BY-SA帰属
所属していません magento.stackexchange
scroll top