The module AvS_FastSimpleImport imports different data in Magento. By using Magento interface “ImportExport”, you guaranty both a fast website and a safe update. In comparison to other import methods, the module offers some advantages (the comparison is in preparation), besides being easy to use and being used more frequently. The core features include:

  • Import of products , customers, categories and product category links
  • Import of simple products , grouped products , configurable products and bundled products
  • Automatic indexing of all imported products
  • Improved error handling

The module is hosted and maintained on GitHub under https://github.com/avstudnitz/AvS_FastSimpleImport.

A team of five people including myself as one of the main developers, dedicated last weekend, at Magento a hackathon in Oldenburg, to the development of the module.
In the following I would like to elaborate on what’s new.

New import format “nested arrays”

The import format of the ImportExport can be very confusing if a field contains multiple values. This can happen, for example, because of several websites, multiple categories or multiple sub-products
(in case of configurable or grouped products).
Example:

With the new option, you can use nested arrays:

You must activate the option in order to be able to use it – either via configuration (see below) or by adding this line to the import calls ->setUseNestedArrays(true).

Configuration

Before you could reach all options through code when calling the interface, but now you can manage them through configuration:


All options are described in the documentation in detail.

All options are described in the documentation in detail. In the last four options you can see that the product import can receive specified default values, therefore this options don’t need to be integrated in each import.

All configuration options can be overwritten via direct module call.

Unit-Tests

Screen Shot 02-24-14 at 12.40 PMBased on PHPUnit and Magento Extensions EcomDev_PHPUnit, we (mainly Dima Janzen and Richard Vogel) developed a test suite, where the core functions are automatically tested.
This includes, for example, the configuration, the import of all supported types of products or the new import structure of “nested arrays” (see above). This will help, in the development or at the appearance of new Magento versions, ensure that all current functions are still working. Even the creation of unit tests helped identify minor errors and so the quality of the module increased.

Documentation

A weak point is the unclear documentation -therefore all features were listed unsorted on the GitHub home page. We managed to completely revise it:
The Readme lists now only the most important facts and the new structured documentation contains a clear description of all features including examples and screenshots.

FastSimpleExport

The counterpart to the FastSimpleImport has been developed by Nils Preuss: FastSimpleExport. It exports different data (current products, customers, orders) as arrays, which can then be further processed.
The data can be for example serialized, transferred to another system and imported there again.

Andreas von Studnitz

Author: Andreas von Studnitz

Andreas von Studnitz is a Magento developer and one of the Managing Directors at integer_net. His main areas of interest are backend development, Magento consulting and giving developer trainings. He is a Magento 2 Certified Professional Developer Plus and holds several other Magento certifications for both Magento 1 and Magento 2. Andreas was selected as a Magento Master in 2019 and 2020.

More Information · Twitter · GitHub · LinkedIn