AvS_FastSimpleImport

Wrapper for Magento ImportExport functionality which imports data from arrays

View the Project on GitHub avstudnitz/AvS_FastSimpleImport

Options

You can find the configuration options at
System -> Configuration -> Services -> FastSimpleImport

configuration menu

General Settings

configuration general settings

Import Behavior

Select from:

Partial Indexing

If set to Yes, imported products are indexed on thy fly so they can directly be accessed in the shop. If you set it to No, you have to do a full index update afterwards.

Continue after errors

If set to No, the import is stopped when an error with the import data has occured. If set to Yes, the import is continued anyways unless the Error Limit is reached. Entities with errors will be skipped.

Error Limit

Up to this number of error will be ignored. When this number of errors is reached in one import, the import is stopped and no entities will be imported.

Support Nested Arrays for Import

If you have multiple values for one field, you have the possibility to provide them as an array instead of seperate lines if this option is set to Yes. Example:

$data = array(
    array(
        'sku' => '1234567',
        '_type' => 'simple',
        '_attribute_set' => 'Default',
        '_product_websites' => array('de', 'en', 'fr'),
        'name' => 'Default',
        'price' => 0.99,
        'description' => 'Default',
        'short_description' => 'Default',
        'colors' => array('green', 'silver')
        'weight' => 0,
        'status' => 1,
        'visibility' => 4,
        'tax_class_id' => 2,
        'qty' => 76,
    ),
);

If this option isn't activated, the same import data should look like this:

$data = array(
    array(
        'sku' => '1234567',
        '_type' => 'simple',
        '_attribute_set' => 'Default',
        '_product_websites' => 'de',
        'name' => 'Default',
        'price' => 0.99,
        'description' => 'Default',
        'short_description' => 'Default',
        'colors' => 'green'
        'weight' => 0,
        'status' => 1,
        'visibility' => 4,
        'tax_class_id' => 2,
        'qty' => 76,
    ),
    array(
        'sku' => null,
        '_product_websites' => 'en',
        'colors' => 'silver'
    ),
    array(
        'sku' => null,
        '_product_websites' => 'fr',
    ),
);

This can for example be used for _product_websites, _category, _super_products_sku or arbitrary multiselect attributes.

Ignore Duplicates

With this option set to Yes, you can have the same entity twice in your import data. Otherwise, the import stops with an error.

Product setting

configuration product 1

Create new options for the following select attributes

You can select dropdown attributes here. If you import attribute options which don't exist yet, they will be created for the selected attributes.

Create new options for the following multiselect attributes

Same as above but for multiselect attributes.

configuration product 2

Allow renaming of files

If set to Yes, product images don't get overwritten. For example if there is already a file named example.jpg, it is renamed to example_1.jpg in order to avoid overwriting.

Additional Image Attributes

Select additional image attributes for import here so they get filled correctly by the import.

Default Status

Default value for the Status field if it is not included in the import.

Default Visibility

Default value for the Visibility field if it is not included in the import.

Default Tax Class

Default value for the Tax Class field if it is not included in the import.

Default Weight

Default value for the Weight field if it is not included in the import.

Notes

All options (except default values) can be overwritten in the import call. For example:

/** @var $import AvS_FastSimpleImport_Model_Import */
$import = Mage::getModel('fastsimpleimport/import');
$import
    ->setPartialIndexing(true)
    ->setBehavior(Mage_ImportExport_Model_Import::BEHAVIOR_APPEND)
    ->processProductImport($data);

You can find all options on top of the file app/code/community/AvS/FastSimpleImport/Model/Import.php