/import-product-bundle

M2IF library providing basic Magento 2 bundle product import functionality

Primary LanguagePHPOpen Software License 3.0OSL-3.0

M2IF - Bundle Product Import

Latest Stable Version Total Downloads License Build Status Scrutinizer Code Quality Code Coverage

Introduction

This module provides the functionality to import the product bundles defined in the CSV file.

Configuration

In case that the M2IF - Simple Console Tool is used, the funcationality can be enabled by adding the following snippets to the configuration file

{
  "magento-edition": "CE",
  "magento-version": "2.1.2",
  "operation-name" : "replace",
  "installation-dir" : "/var/www/magento",
  "utility-class-name" : "TechDivision\\Import\\Utils\\SqlStatements",
  "database": { ... },
  "operations" : [
    {
      "name" : "replace",
      "subjects": [
        { ... },
        {
          "class-name": "TechDivision\\Import\\Product\\Bundle\\Subjects\\BundleSubject",
          "processor-factory" : "TechDivision\\Import\\Cli\\Services\\ProductBundleProcessorFactory",
          "utility-class-name" : "TechDivision\\Import\\Product\\Bundle\\Utils\\SqlStatements",
          "prefix": "bundles",
          "source-dir": "projects/sample-data/tmp",
          "target-dir": "projects/sample-data/tmp",
          "observers": [
            {
              "import": [
                "TechDivision\\Import\\Product\\Bundle\\Observers\\BundleOptionObserver",
                "TechDivision\\Import\\Product\\Bundle\\Observers\\BundleOptionValueObserver",
                "TechDivision\\Import\\Product\\Bundle\\Observers\\BundleSelectionObserver",
                "TechDivision\\Import\\Product\\Bundle\\Observers\\BundleSelectionPriceObserver"
              ]
            }
          ]
        }
      ]
    },
    {
      "name" : "add-update",
      "subjects": [
        { ... },
        {
          "class-name": "TechDivision\\Import\\Product\\Bundle\\Subjects\\BundleSubject",
          "processor-factory" : "TechDivision\\Import\\Cli\\Services\\ProductBundleProcessorFactory",
          "utility-class-name" : "TechDivision\\Import\\Product\\Bundle\\Utils\\SqlStatements",
          "prefix": "bundles",
          "source-dir": "projects/sample-data/tmp",
          "target-dir": "projects/sample-data/tmp",
          "observers": [
            {
              "import": [
                "TechDivision\\Import\\Product\\Bundle\\Observers\\BundleOptionUpdateObserver",
                "TechDivision\\Import\\Product\\Bundle\\Observers\\BundleOptionValueUpdateObserver",
                "TechDivision\\Import\\Product\\Bundle\\Observers\\BundleSelectionUpdateObserver",
                "TechDivision\\Import\\Product\\Bundle\\Observers\\BundleSelectionPriceUpdateObserver"
              ]
            }
          ]
        }
      ]
    }
  ]
}