0
votes

I am on a urgent project where I need to import and export configurable products with proper mapping to simple products and additional images too.

I started by buying a plugin for import export for $99 from Magento Connect but it did not do as promised. We followed the recommended procedure several times. It can map configurable with simple but cannot map additional images.

Then I tried using a custom solution but it fails to map the quantity as well as additional images..

Next I stumbled upon this great tool called MAGMI. I tried to import using this tool but although it does the import correctly, it shows up a warning for each configurable product:

No configurable attributes found for configurable sku: dress1 cannot link simples.

How can I fix this error?

3

3 Answers

2
votes

For magmi to import configurables, you have to set "configurable_attributes" column in your csv and fill it for configurable type lines,and also to read the configurable plugin wiki documentation carefully that may guide you on the many possibilities it offers

2
votes

I can't give you advice on using Magmi, but I'll put in a shameless plug for a free module called ApiImport. It's ImportExport-based and it's free.

Imports are all done by providing your data as an array. Importing a single configurable product is as easy as:

<?php

require_once 'app/Mage.php';

Mage::init();

$entities = array(
    // Configurable product.
    array(
        'description'       => 'Some description',
        '_attribute_set'    => 'Default',
        'short_description' => 'Some short description',
        '_product_websites' => 'base',
        'status'            => Mage_Catalog_Model_Product_Status::STATUS_ENABLED,
        'visibility'        => Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH,
        'tax_class_id'      => 0,
        'is_in_stock'       => 1,
        'sku'               => 'some_configurable',
        '_type'             => Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE,
        'name'              => 'Some configurable',
        'price'             => rand(1, 1000),
        'weight'            => rand(1, 1000),

        // Link the first simple product:
        '_super_products_sku'     => 'my_red_blue_simple', 
        '_super_attribute_code'   => 'color',
        '_super_attribute_option' => 'blue'
    ),

    // Now optionally link some more simple products:
    array(
        '_super_products_sku'     => 'my_red_simple_product', 
        '_super_attribute_code'   => 'color',
        '_super_attribute_option' => 'red'
    )
);

// Start the import.
Mage::getModel('api_import/import_api')->importEntities(
    $entities, 
    Mage_ImportExport_Model_Export_Entity_Product::getEntityTypeCode()
);

If you want more help on programmatically generating these entities, you could have a look at Test helper in ApiImport. It can generate random products for all product types and customer.

I also recommend you read the Frequently Asked Questions first before asking any questions :)

Good luck.

0
votes

A good answer was given by dweeves, the creator of MAGMI

The thing is that magmi uses specific CSV's to import different features. If you need the examples of column headers and its contents, you can see them here https://docs.google.com/spreadsheet/ccc?key=0AgOC3MxA5YaLdFFwTk9uY2RQbmthQmZZdmVYZ3FUOEE&usp=drive_web#gid=2.

For example:

 type           configurable_attributes     super_attribute_pricing                                 
 configurable   size,color                  size::L:12;XL:15,color::red:10;green:15                             

In this case it will generate on the fly all possible simple variants calculated from columns "configurable_attributes" and "super_attribute_pricing"

Also if you're considering paid extensions, there's a good stable module here which is an UI-wrap based on MAGMI. It automatically forms the columns.

For example, you can export your configurable products right into the Google spreadsheet in magmi format with this extension and then use this formatting to import new products.