Welcome to FireGento_FastSimpleImport2’s documentation!

Contents:

Installation

Installation Instructions for latest stable Version

composer require firegento/fastsimpleimport 
bin/magento module:enable FireGento_FastSimpleImport
bin/magento setup:upgrade

Installation Instructions for the latest development/contribution Version

composer config repositories.firegento_fastsimpleimport vcs https://github.com/firegento/FireGento_FastSimpleImport2
composer require firegento/fastsimpleimport dev-master
bin/magento module:enable FireGento_FastSimpleImport
bin/magento setup:upgrade

Importing Products

Simple Product

You can call the import from your own Magento 2 code. Example:

/** @var \FireGento\FastSimpleImport\Model\Importer $importerModel */
$importerModel = $this->objectManager->create('FireGento\FastSimpleImport\Model\Importer');

$productsArray = [
    [
        'sku' => 'firegento-test',
        'attribute_set_code' => 'Default',
        'product_type' => 'simple',
        'product_websites' => 'base',
        'name' => 'FireGento Test Product',
        'price' => '14.0000',
    ],
];

try {
    $importerModel->processImport($productsArray);
} catch (\Exception $e) {
    $output->writeln($e->getMessage());
}

print_r($importerModel->getLogTrace());
print_r($importerModel->getErrorMessages());

You can find more examples in our demo module. We have implemented a few command line commands which demonstrate the usage of FastSimpleImport in a custom module.

Importing Categories

Category Import

You can call the import from your own Magento 2 code. Example:

/** @var \FireGento\FastSimpleImport\Model\Importer $importerModel */
$importerModel = $this->objectManager->create('FireGento\FastSimpleImport\Model\Importer');

$categoryArray = [
    [
        '_root' => 'Default Category',
        '_category' => 'FireGento TestCategory',
        'description' => 'Test',
        'is_active' => '1',
        'include_in_menu' => '1',
        'meta_description' => 'Meta Test',
        'available_sort_by' => 'position',
        'default_sort_by' => 'position',
    ],
];

$importerModel->setEntityCode('catalog_category');


try {
    $importerModel->processImport($categoryArray);
} catch (\Exception $e) {
    print_r($e->getMessage());
}

print_r($importerModel->getLogTrace());
print_r($importerModel->getErrorMessages());

Appendix : Fieldnames

Products Fields

“Product Fields”
Fieldname Explanation
sku SKU of Product
store_view_code StoreView Code of the StoreView to import
attribute_set_code Attribute Set Code
product_type Product Type
categories TODO
product_websites TODO
name TODO
description TODO
short_description TODO
weight TODO
product_online TODO
tax_class_name TODO
visibility TODO
price TODO
special_price TODO
special_price_from_date TODO
special_price_to_date TODO
url_key TODO
meta_title TODO
meta_keywords TODO
meta_description TODO
base_image TODO
base_image_label TODO
small_image TODO
small_image_label TODO
thumbnail_image TODO
thumbnail_image_label TODO
swatch_image TODO
swatch_image_label TODO
created_at TODO
updated_at TODO
new_from_date TODO
new_to_date TODO
display_product_options_in TODO
map_price TODO
msrp_price TODO
map_enabled TODO
gift_message_available TODO
custom_design TODO
custom_design_from TODO
custom_design_to TODO
custom_layout_update TODO
page_layout TODO
product_options_container TODO
msrp_display_actual_price_type TODO
country_of_manufacture TODO
additional_attributes TODO
qty TODO
out_of_stock_qty TODO
use_config_min_qty TODO
is_qty_decimal TODO
allow_backorders TODO
use_config_backorders TODO
min_cart_qty TODO
use_config_min_sale_qty TODO
max_cart_qty TODO
use_config_max_sale_qty TODO
is_in_stock TODO
notify_on_stock_below TODO
use_config_notify_stock_qty TODO
manage_stock TODO
use_config_manage_stock TODO
use_config_qty_increments TODO
qty_increments TODO
use_config_enable_qty_inc TODO
enable_qty_increments TODO
is_decimal_divided TODO
website_id TODO
related_skus TODO
related_position TODO
crosssell_skus TODO
crosssell_position TODO
upsell_skus TODO
upsell_position TODO
additional_images TODO
additional_image_labels TODO
hide_from_product_page TODO
bundle_price_type TODO
bundle_sku_type TODO
bundle_price_view TODO
bundle_weight_type TODO
bundle_values TODO
bundle_shipment_type TODO
associated_skus TODO

Indices and tables