Andreas von Studnitz - MM14NL

Post on 09-May-2015

726 views 5 download

description

Importing Products into Magento – Comparison of the different methods Importing data is one of the challenges with Magento development. There are several ways to do it, and every solution has its pros and cons. Andreas von Studnitz will compare the possible approaches regarding features and usability. Last but not least, he will present the results of his performance analysis comparing the time needed to import up to 50,000 products with and without indexing for several different import methods.

Transcript of Andreas von Studnitz - MM14NL

22/05/2014

Importing Products into Magento

A Comparison of Import Methods

Andreas von Studnitz - Importing Products into Magento 1

22/05/2014 22/05/2014

Overview

Andreas von Studnitz - Importing Products into Magento 2

• Introduction

• Import Methods: Features, Pros and Cons

– Built-In Methods

– Third Party Modules

• Performance Comparison

• Discussion

22/05/2014 22/05/2014

About me • Andreas von Studnitz • Living and working in Aachen (Aken),

Germany • Magento developer since 2008 • Freelancer since 2009 • Co-founder of integer_net GmbH in 2012 • Active member of the German Magento

Community • Magento Frontend/Backend Development,

Magento Training, Magento Consulting

Andreas von Studnitz - Importing Products into Magento 3

22/05/2014 22/05/2014

Andreas von Studnitz - Importing Products into Magento 4

Task: - Import products into Magento

- Arbitrary data source (Probably transformation of the data is needed before the import)

- Once or on a regular basis

22/05/2014 22/05/2014

Andreas von Studnitz - Importing Products into Magento 5

Nice to Have: - Import different product types

- Import other entity types (categories, customers, …)

- Indexing on the fly

- Access through a webservice

22/05/2014 22/05/2014

Andreas von Studnitz - Importing Products into Magento 6

Mage::getModel

• Reliable

• Supports all data entities

• Customizable to any kind of input data

• Indexing integrated

Slow

22/05/2014 22/05/2014

Andreas von Studnitz - Importing Products into Magento 7

$product = Mage::getModel(‘catalog/product’)

->load($productId);

$product

->addData(array(

‘sku’ => ‘12345’,

‘name’ => ‘Product 1’,

...

))

->save();

Mage::getModel

22/05/2014 22/05/2014

Andreas von Studnitz - Importing Products into Magento 8

22/05/2014 22/05/2014

Andreas von Studnitz - Importing Products into Magento 9

SOAP / XmlRpc

- Call from any external system

- Standardized

- Supports many data entities

- Hard to extend

- Really slow

22/05/2014 22/05/2014

Andreas von Studnitz - Importing Products into Magento 10

1 Free module available

22/05/2014 22/05/2014

Andreas von Studnitz - Importing Products into Magento 11

REST

- Call from any external system

- Introduced in Magento CE 1.7

- Authorization via Oauth

- Few data entities supported

- Very slow

22/05/2014 22/05/2014

Andreas von Studnitz - Importing Products into Magento 12

1 Free module available

22/05/2014 22/05/2014

Andreas von Studnitz - Importing Products into Magento 13

Dataflow

- Import text files

- Specific format

- Few data entities supported

- Hard to integrate into your own workflow

- Outdated

- Slow

22/05/2014 22/05/2014

Andreas von Studnitz - Importing Products into Magento 14

1 Free module available 2 Commercial module available

22/05/2014 22/05/2014

Andreas von Studnitz - Importing Products into Magento 15

ImportExport Introduced in Magento CE 1.5

Fast

Standardized

Imports from CSV files only

Few data entities supported

Complicated data format (http://www.integer-net.com/2012/04/04/importing-products-with-the-import-export-interface/)

22/05/2014 22/05/2014

Andreas von Studnitz - Importing Products into Magento 16

1 Free module available 2 Commercial module available

22/05/2014 22/05/2014

Andreas von Studnitz - Importing Products into Magento 17

FastSimpleImport

• Based on Mage_ImportExport

• Array Adapter, to be used in your own module

• Adds more data entities, better error messages, indexing on the fly, …

• Fast

Complicated (but improved) data format

https://github.com/avstudnitz/AvS_FastSimpleImport

22/05/2014 22/05/2014

Andreas von Studnitz - Importing Products into Magento 18

FastSimpleImport $data = array(

array(

‘sku’ => ‘12345’,

‘name’ => ‘Product 1’,

...

),

...

);

Mage::getModel(‘fastsimpleimport/import’)

->processProductImport($data);

22/05/2014 22/05/2014

Andreas von Studnitz - Importing Products into Magento 19

1 Free module available 2 Commercial module available

22/05/2014 22/05/2014

Andreas von Studnitz - Importing Products into Magento 20

ApiImport

Based on Mage_ImportExport

Array Adapter, to be used in your own module

Can be called via Magento SOAP/XmlRpc

Adds more data entities, indexing on the fly, …

Fast

Complicated data format

https://github.com/danslo/ApiImport

22/05/2014 22/05/2014

Andreas von Studnitz - Importing Products into Magento 21

1 Free module available 2 Commercial module available

22/05/2014 22/05/2014

Andreas von Studnitz - Importing Products into Magento 23

22/05/2014 22/05/2014

Andreas von Studnitz - Importing Products into Magento 24

Magmi

External PHP Tool

Import from CSV files or PHP array (Dataflow format)

Plugin system

Considerably fast

Accesses the Magento database directly

22/05/2014 22/05/2014

Andreas von Studnitz - Importing Products into Magento 25 3 Not all indices are supported

22/05/2014 22/05/2014

Andreas von Studnitz - Importing Products into Magento 26

uRapidFlow (Pro)

Commercial Magento module

Pro version adds more data entities

Import from CSV files in specific format

Very flexible, configurable profiles

Considerably Fast

Encoded with IonCube

22/05/2014 22/05/2014

Andreas von Studnitz - Importing Products into Magento 27

22/05/2014 22/05/2014

Andreas von Studnitz - Importing Products into Magento 28

Performance Testing • Test all methods on the same server

• Same configuration, same products

• Test up to 50,000 products with and without indexing

22/05/2014 22/05/2014

Andreas von Studnitz - Importing Products into Magento 29

Results (no Indexing)

22/05/2014 22/05/2014

Andreas von Studnitz - Importing Products into Magento 30

Results (with Indexing)

1 Not all indices are supported

22/05/2014 22/05/2014

5,5 0,2 0,6

4

135 135

76

22

116

25

13

0,8

115

76

22

14

5

0

20

40

60

80

100

120

140

160without Indexing

with Indexing

Andreas von Studnitz - Importing Products into Magento 31

Products/second

22/05/2014 22/05/2014

Personal Recommendation

Andreas von Studnitz - Importing Products into Magento 32

• Importing products / customer / categories?

– FastSimpleImport

• In need of a webservice?

– ApiImport

• Importing other entities?

– Mage::getModel

22/05/2014 22/05/2014

Thank you!

Andreas von Studnitz - Importing Products into Magento 33

Contact me:

– http://www.integer-net.com

– http://www.integer-net.de

– avs@integer-net.de

– twitter/GitHub/IRC: @avstudnitz