diff --git a/CHANGELOG.md b/CHANGELOG.md index 25fc05df..350e200d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +# Version 1.0.0-alpha12 + +## Bugfixes + +* None + +## Features + +* Implement add-update operation for product variants + # Version 1.0.0-alpha11 ## Bugfixes diff --git a/projects/.DS_Store b/projects/.DS_Store deleted file mode 100644 index e2449e22..00000000 Binary files a/projects/.DS_Store and /dev/null differ diff --git a/projects/sample-data/ce/212/conf/techdivision-import.json b/projects/sample-data/ce/212/conf/techdivision-import.json index d4fc9a2a..c5f4e636 100644 --- a/projects/sample-data/ce/212/conf/techdivision-import.json +++ b/projects/sample-data/ce/212/conf/techdivision-import.json @@ -215,7 +215,8 @@ "observers": [ { "import": [ - "TechDivision\\Import\\Product\\Variant\\Observers\\VariantObserver" + "TechDivision\\Import\\Product\\Variant\\Observers\\VariantObserver", + "TechDivision\\Import\\Product\\Variant\\Observers\\VariantSuperAttributeObserver" ] } ] @@ -454,6 +455,22 @@ } ] }, + { + "class-name": "TechDivision\\Import\\Product\\Variant\\Subjects\\VariantSubject", + "processor-factory" : "TechDivision\\Import\\Cli\\Services\\ProductVariantProcessorFactory", + "utility-class-name" : "TechDivision\\Import\\Product\\Variant\\Utils\\SqlStatements", + "prefix": "variants", + "source-dir": "projects/sample-data/tmp", + "target-dir": "projects/sample-data/tmp", + "observers": [ + { + "import": [ + "TechDivision\\Import\\Product\\Variant\\Observers\\VariantUpdateObserver", + "TechDivision\\Import\\Product\\Variant\\Observers\\VariantSuperAttributeUpdateObserver" + ] + } + ] + }, { "class-name": "TechDivision\\Import\\Product\\Bundle\\Subjects\\BundleSubject", "processor-factory" : "TechDivision\\Import\\Cli\\Services\\ProductBundleProcessorFactory", diff --git a/projects/sample-data/ce/212/data/add-update/magento-import_20161024_194026_04.csv b/projects/sample-data/ce/212/data/add-update/magento-import_20161024_194026_04.csv index 66623d33..ffb7cef6 100644 --- a/projects/sample-data/ce/212/data/add-update/magento-import_20161024_194026_04.csv +++ b/projects/sample-data/ce/212/data/add-update/magento-import_20161024_194026_04.csv @@ -797,7 +797,7 @@ WSH12-32-Red,,Bottom,simple,"Default Category/Women/Bottoms/Shorts,Default Categ
  • Choice of three natural colors made from phthalate and heavy metal free dyes. ",,,1,,"Catalog, Search",,,,,set-of-sprite-yoga-straps,,,,/l/u/luma-yoga-strap-set.jpg,,/l/u/luma-yoga-strap-set.jpg,,/l/u/luma-yoga-strap-set.jpg,,,,"10/24/16, 12:38 PM","10/24/16, 12:38 PM",,,Block after Info Column,,,,,,,,,,,,,"activity=Yoga,category_gear=Exercise,gender=Men|Women|Unisex,material=Canvas|Plastic",0,0,1,0,0,1,1,1,0,1,1,,1,0,1,1,0,1,0,0,0,,,,,,,/l/u/luma-yoga-strap-set.jpg,Image,,,,,,,,,,"24-WG085=0.0000,24-WG086=0.0000,24-WG087=0.0000" WB03,,Top,configurable,"Default Category/Women/Tops/Bras & Tanks,Default Category/Collections/New Luma Yoga Collection,Default Category/Collections/Performance Fabrics,Default Category",base,Celeste Sports Bra,"

    Whatever your goals for the day's workout, the Celeste Sports Bra lets you do it in comfort and coolness, plus enhanced support and shaping. A power mesh back zone and moisture-wicking fabric ensure you stay dry.

    -

    • Mint bra top.
    • Seam-free interior molded cups
    • Odor control.
    • UV protection.
    • Machine wash/dry.

    ",,,1,Taxable Goods,"Catalog, Search",39,,,,,,,,/w/b/wb03-green_main.jpg,,/w/b/wb03-green_main.jpg,,/w/b/wb03-green_main.jpg,,,,"10/24/16, 12:37 PM","10/24/16, 12:37 PM",,,Block after Info Column,,,,,,,,,,,Use config,,"climate=Indoor|Warm,eco_collection=No,erin_recommends=No,material=Cocona® performance fabric|Organic Cotton,new=Yes,pattern=Solid,performance_fabric=Yes,sale=No,style_general=Bra",0,0,1,0,0,1,1,1,0,1,1,,1,0,1,1,0,1,0,0,0,,,,,,,"/w/b/wb03-green_alt1.jpg,/w/b/wb03-green_back.jpg,/w/b/wb03-green_main.jpg",",,",,,,,,,,"sku=WB03-XS-Green,size=XS|sku=WB03-XS-Red,size=XS|sku=WB03-XS-Yellow,size=XS|sku=WB03-S-Green,size=S|sku=WB03-S-Red,size=S|sku=WB03-S-Yellow,size=S|sku=WB03-M-Green,size=M|sku=WB03-M-Red,size=M|sku=WB03-M-Yellow,size=M|sku=WB03-L-Green,size=L|sku=WB03-L-Red,size=L|sku=WB03-L-Yellow,size=L|sku=WB03-XL-Green,size=XL|sku=WB03-XL-Red,size=XL|sku=WB03-XL-Yellow,size=XL",, +

    • Mint bra top.
    • Seam-free interior molded cups
    • Odor control.
    • UV protection.
    • Machine wash/dry.

    ",,,1,Taxable Goods,"Catalog, Search",39,,,,,,,,/w/b/wb03-green_main.jpg,,/w/b/wb03-green_main.jpg,,/w/b/wb03-green_main.jpg,,,,"10/24/16, 12:37 PM","10/24/16, 12:37 PM",,,Block after Info Column,,,,,,,,,,,Use config,,"climate=Indoor|Warm,eco_collection=No,erin_recommends=No,material=Cocona® performance fabric|Organic Cotton,new=Yes,pattern=Solid,performance_fabric=Yes,sale=No,style_general=Bra",0,0,1,0,0,1,1,1,0,1,1,,1,0,1,1,0,1,0,0,0,,,,,,,"/w/b/wb03-green_alt1.jpg,/w/b/wb03-green_back.jpg,/w/b/wb03-green_main.jpg",",,",,,,,,,,"sku=WB03-XS-Green,size=XS|sku=WB03-XS-Red,size=XS|sku=WB03-XS-Yellow,size=XS|sku=WB03-S-Green,size=S|sku=WB03-S-Red,size=S|sku=WB03-S-Yellow,size=S|sku=WB03-M-Green,size=M|sku=WB03-M-Red,size=M|sku=WB03-M-Yellow,size=M|sku=WB03-L-Green,size=L|sku=WB03-L-Red,size=L|sku=WB03-L-Yellow,size=L|sku=WB03-XL-Green,size=XL|sku=WB03-XL-Red,size=XL|sku=WB03-XL-Yellow,size=XL",size=TEST, WB04,,Top,configurable,Default Category/Women/Tops/Bras & Tanks,base,Prima Compete Bra Top,"

    Pull on the Prima Compete Bra Top and you'll love the fabric: soft, stretchy, and ultra lightweight. But you'll also love the racerback cut, for freer movement through all your athletic feats.
    `
    • Colorblocked details.
    • Machine wash/line dry.

    ",,,1,Taxable Goods,"Catalog, Search",24,,,,,,,,/w/b/wb04-blue_main.jpg,,/w/b/wb04-blue_main.jpg,,/w/b/wb04-blue_main.jpg,,,,"10/24/16, 12:37 PM","10/24/16, 12:37 PM",,,Block after Info Column,,,,,,,,,,,Use config,,"climate=Indoor|Warm,eco_collection=No,erin_recommends=No,material=Spandex|EverCool™|Organic Cotton,new=No,pattern=Solid,performance_fabric=No,sale=No,style_general=Bra",0,0,1,0,0,1,1,1,0,1,1,,1,0,1,1,0,1,0,0,0,,,,,,,"/w/b/wb04-blue-0.jpg,/w/b/wb04-blue_alt1.jpg,/w/b/wb04-blue_back.jpg,/w/b/wb04-blue_main.jpg",",,,",,,,,,,,"sku=WB04-XS-Blue,size=XS|sku=WB04-XS-Purple,size=XS|sku=WB04-XS-Yellow,size=XS|sku=WB04-S-Blue,size=S|sku=WB04-S-Purple,size=S|sku=WB04-S-Yellow,size=S|sku=WB04-M-Blue,size=M|sku=WB04-M-Purple,size=M|sku=WB04-M-Yellow,size=M|sku=WB04-L-Blue,size=L|sku=WB04-L-Purple,size=L|sku=WB04-L-Yellow,size=L|sku=WB04-XL-Blue,size=XL|sku=WB04-XL-Purple,size=XL|sku=WB04-XL-Yellow,size=XL",, WB05,,Top,configurable,Default Category/Women/Tops/Bras & Tanks,base,Lucia Cross-Fit Bra,"

    Being cool is a big part of being comfy, which is why the Lucia Cross-Fit Bra features moisture-wicking technology as well as soft, lightweight fabric.

    • Black/white bra top.
    • Criss-cross back design.
    • Machine wash/dry.

    ",,,1,Taxable Goods,"Catalog, Search",39,,,,,,,,/w/b/wb05-black_main.jpg,,/w/b/wb05-black_main.jpg,,/w/b/wb05-black_main.jpg,,,,"10/24/16, 12:37 PM","10/24/16, 12:37 PM",,,Block after Info Column,,,,,,,,,,,Use config,,"climate=Indoor|Warm,eco_collection=No,erin_recommends=No,material=Nylon|Microfiber|Polyester,new=No,pattern=Checked,performance_fabric=No,sale=No,style_general=Bra",0,0,1,0,0,1,1,1,0,1,1,,1,0,1,1,0,1,0,0,0,,,,,,,"/w/b/wb05-black_back.jpg,/w/b/wb05-black_main.jpg",",",,,,,,,,"sku=WB05-XS-Black,size=XS|sku=WB05-XS-Orange,size=XS|sku=WB05-XS-Purple,size=XS|sku=WB05-S-Black,size=S|sku=WB05-S-Orange,size=S|sku=WB05-S-Purple,size=S|sku=WB05-M-Black,size=M|sku=WB05-M-Orange,size=M|sku=WB05-M-Purple,size=M|sku=WB05-L-Black,size=L|sku=WB05-L-Orange,size=L|sku=WB05-L-Purple,size=L|sku=WB05-XL-Black,size=XL|sku=WB05-XL-Orange,size=XL|sku=WB05-XL-Purple,size=XL",, diff --git a/projects/sample-data/ee/212/conf/techdivision-import.json b/projects/sample-data/ee/212/conf/techdivision-import.json index d36255e6..3d8f7190 100644 --- a/projects/sample-data/ee/212/conf/techdivision-import.json +++ b/projects/sample-data/ee/212/conf/techdivision-import.json @@ -215,7 +215,8 @@ "observers": [ { "import": [ - "TechDivision\\Import\\Product\\Variant\\Ee\\Observers\\EeVariantObserver" + "TechDivision\\Import\\Product\\Variant\\Ee\\Observers\\EeVariantObserver", + "TechDivision\\Import\\Product\\Variant\\Ee\\Observers\\EeVariantSuperAttributeObserver" ] } ] @@ -454,6 +455,22 @@ } ] }, + { + "class-name": "TechDivision\\Import\\Product\\Variant\\Ee\\Subjects\\EeVariantSubject", + "processor-factory" : "TechDivision\\Import\\Cli\\Services\\ProductVariantProcessorFactory", + "utility-class-name" : "TechDivision\\Import\\Product\\Variant\\Utils\\SqlStatements", + "prefix": "variants", + "source-dir": "projects/sample-data/tmp", + "target-dir": "projects/sample-data/tmp", + "observers": [ + { + "import": [ + "TechDivision\\Import\\Product\\Variant\\Ee\\Observers\\EeVariantUpdateObserver", + "TechDivision\\Import\\Product\\Variant\\Ee\\Observers\\EeVariantSuperAttributeUpdateObserver" + ] + } + ] + }, { "class-name": "TechDivision\\Import\\Product\\Bundle\\Ee\\Subjects\\EeBundleSubject", "processor-factory" : "TechDivision\\Import\\Cli\\Services\\ProductBundleProcessorFactory", diff --git a/projects/sample-data/ee/212/data/add-update/magento-import_20161021_161909_04.csv b/projects/sample-data/ee/212/data/add-update/magento-import_20161021_161909_04.csv index e6f023bd..98db80bc 100644 --- a/projects/sample-data/ee/212/data/add-update/magento-import_20161021_161909_04.csv +++ b/projects/sample-data/ee/212/data/add-update/magento-import_20161021_161909_04.csv @@ -809,7 +809,7 @@ WB01,,Top,configurable,"Default Category/Women/Tops/Bras & Tanks,Default Categor WB02,,Top,configurable,Default Category/Women/Tops/Bras & Tanks,base,Erica Evercool Sports Bra,"

    Perfect for medium-impact workouts, our Erica EverCool™ Sports Bra brings a brilliant combo of comfort and style. Moisture-wicking technology keeps you dry, and the flattering hybrid racerback promises an unbeatable range of motion.

    • Honeycomb light blue bra top.
    • Elastic hem.
    • Reinforced binding.
    • Machine wash/dry.

    ",,,1,Taxable Goods,"Catalog, Search",39,,,,,,,,/w/b/wb02-blue_main.jpg,,/w/b/wb02-blue_main.jpg,,/w/b/wb02-blue_main.jpg,,,,"10/21/16, 9:11 AM","10/21/16, 9:11 AM",,,Block after Info Column,,,,,,,,,,,Use config,,"climate=Indoor|Warm,eco_collection=No,erin_recommends=No,material=Lycra®|EverCool™,new=No,pattern=Solid,performance_fabric=No,sale=No,style_general=Bra",0,0,1,0,0,1,1,1,0,1,1,,1,0,1,1,0,1,0,0,0,0,1,,,,,,,"/w/b/wb02-blue_alt1.jpg,/w/b/wb02-blue_back.jpg,/w/b/wb02-blue_main.jpg",",,",,,,,,,,"sku=WB02-XS-Blue,size=XS|sku=WB02-XS-Orange,size=XS|sku=WB02-XS-Yellow,size=XS|sku=WB02-S-Blue,size=S|sku=WB02-S-Orange,size=S|sku=WB02-S-Yellow,size=S|sku=WB02-M-Blue,size=M|sku=WB02-M-Orange,size=M|sku=WB02-M-Yellow,size=M|sku=WB02-L-Blue,size=L|sku=WB02-L-Orange,size=L|sku=WB02-L-Yellow,size=L|sku=WB02-XL-Blue,size=XL|sku=WB02-XL-Orange,size=XL|sku=WB02-XL-Yellow,size=XL",, WB03,,Top,configurable,"Default Category/Women/Tops/Bras & Tanks,Default Category/Collections/New Luma Yoga Collection,Default Category/Collections/Performance Fabrics,Default Category",base,Celeste Sports Bra,"

    Whatever your goals for the day's workout, the Celeste Sports Bra lets you do it in comfort and coolness, plus enhanced support and shaping. A power mesh back zone and moisture-wicking fabric ensure you stay dry.

    -

    • Mint bra top.
    • Seam-free interior molded cups
    • Odor control.
    • UV protection.
    • Machine wash/dry.

    ",,,1,Taxable Goods,"Catalog, Search",39,,,,,,,,/w/b/wb03-green_main.jpg,,/w/b/wb03-green_main.jpg,,/w/b/wb03-green_main.jpg,,,,"10/21/16, 9:11 AM","10/21/16, 9:11 AM",,,Block after Info Column,,,,,,,,,,,Use config,,"climate=Indoor|Warm,eco_collection=No,erin_recommends=No,material=Cocona® performance fabric|Organic Cotton,new=Yes,pattern=Solid,performance_fabric=Yes,sale=No,style_general=Bra",0,0,1,0,0,1,1,1,0,1,1,,1,0,1,1,0,1,0,0,0,0,1,,,,,,,"/w/b/wb03-green_alt1.jpg,/w/b/wb03-green_back.jpg,/w/b/wb03-green_main.jpg",",,",,,,,,,,"sku=WB03-XS-Green,size=XS|sku=WB03-XS-Red,size=XS|sku=WB03-XS-Yellow,size=XS|sku=WB03-S-Green,size=S|sku=WB03-S-Red,size=S|sku=WB03-S-Yellow,size=S|sku=WB03-M-Green,size=M|sku=WB03-M-Red,size=M|sku=WB03-M-Yellow,size=M|sku=WB03-L-Green,size=L|sku=WB03-L-Red,size=L|sku=WB03-L-Yellow,size=L|sku=WB03-XL-Green,size=XL|sku=WB03-XL-Red,size=XL|sku=WB03-XL-Yellow,size=XL",, +

    • Mint bra top.
    • Seam-free interior molded cups
    • Odor control.
    • UV protection.
    • Machine wash/dry.

    ",,,1,Taxable Goods,"Catalog, Search",39,,,,,,,,/w/b/wb03-green_main.jpg,,/w/b/wb03-green_main.jpg,,/w/b/wb03-green_main.jpg,,,,"10/21/16, 9:11 AM","10/21/16, 9:11 AM",,,Block after Info Column,,,,,,,,,,,Use config,,"climate=Indoor|Warm,eco_collection=No,erin_recommends=No,material=Cocona® performance fabric|Organic Cotton,new=Yes,pattern=Solid,performance_fabric=Yes,sale=No,style_general=Bra",0,0,1,0,0,1,1,1,0,1,1,,1,0,1,1,0,1,0,0,0,0,1,,,,,,,"/w/b/wb03-green_alt1.jpg,/w/b/wb03-green_back.jpg,/w/b/wb03-green_main.jpg",",,",,,,,,,,"sku=WB03-XS-Green,size=XS|sku=WB03-XS-Red,size=XS|sku=WB03-XS-Yellow,size=XS|sku=WB03-S-Green,size=S|sku=WB03-S-Red,size=S|sku=WB03-S-Yellow,size=S|sku=WB03-M-Green,size=M|sku=WB03-M-Red,size=M|sku=WB03-M-Yellow,size=M|sku=WB03-L-Green,size=L|sku=WB03-L-Red,size=L|sku=WB03-L-Yellow,size=L|sku=WB03-XL-Green,size=XL|sku=WB03-XL-Red,size=XL|sku=WB03-XL-Yellow,size=XL",size=TEST, WB04,,Top,configurable,Default Category/Women/Tops/Bras & Tanks,base,Prima Compete Bra Top,"

    Pull on the Prima Compete Bra Top and you'll love the fabric: soft, stretchy, and ultra lightweight. But you'll also love the racerback cut, for freer movement through all your athletic feats.
    `
    • Colorblocked details.
    • Machine wash/line dry.

    ",,,1,Taxable Goods,"Catalog, Search",24,,,,,,,,/w/b/wb04-blue_main.jpg,,/w/b/wb04-blue_main.jpg,,/w/b/wb04-blue_main.jpg,,,,"10/21/16, 9:11 AM","10/21/16, 9:11 AM",,,Block after Info Column,,,,,,,,,,,Use config,,"climate=Indoor|Warm,eco_collection=No,erin_recommends=No,material=Spandex|EverCool™|Organic Cotton,new=No,pattern=Solid,performance_fabric=No,sale=No,style_general=Bra",0,0,1,0,0,1,1,1,0,1,1,,1,0,1,1,0,1,0,0,0,0,1,,,,,,,"/w/b/wb04-blue-0.jpg,/w/b/wb04-blue_alt1.jpg,/w/b/wb04-blue_back.jpg,/w/b/wb04-blue_main.jpg",",,,",,,,,,,,"sku=WB04-XS-Blue,size=XS|sku=WB04-XS-Purple,size=XS|sku=WB04-XS-Yellow,size=XS|sku=WB04-S-Blue,size=S|sku=WB04-S-Purple,size=S|sku=WB04-S-Yellow,size=S|sku=WB04-M-Blue,size=M|sku=WB04-M-Purple,size=M|sku=WB04-M-Yellow,size=M|sku=WB04-L-Blue,size=L|sku=WB04-L-Purple,size=L|sku=WB04-L-Yellow,size=L|sku=WB04-XL-Blue,size=XL|sku=WB04-XL-Purple,size=XL|sku=WB04-XL-Yellow,size=XL",, WB05,,Top,configurable,Default Category/Women/Tops/Bras & Tanks,base,Lucia Cross-Fit Bra,"

    Being cool is a big part of being comfy, which is why the Lucia Cross-Fit Bra features moisture-wicking technology as well as soft, lightweight fabric.

    • Black/white bra top.
    • Criss-cross back design.
    • Machine wash/dry.

    ",,,1,Taxable Goods,"Catalog, Search",39,,,,,,,,/w/b/wb05-black_main.jpg,,/w/b/wb05-black_main.jpg,,/w/b/wb05-black_main.jpg,,,,"10/21/16, 9:11 AM","10/21/16, 9:11 AM",,,Block after Info Column,,,,,,,,,,,Use config,,"climate=Indoor|Warm,eco_collection=No,erin_recommends=No,material=Nylon|Microfiber|Polyester,new=No,pattern=Checked,performance_fabric=No,sale=No,style_general=Bra",0,0,1,0,0,1,1,1,0,1,1,,1,0,1,1,0,1,0,0,0,0,1,,,,,,,"/w/b/wb05-black_back.jpg,/w/b/wb05-black_main.jpg",",",,,,,,,,"sku=WB05-XS-Black,size=XS|sku=WB05-XS-Orange,size=XS|sku=WB05-XS-Purple,size=XS|sku=WB05-S-Black,size=S|sku=WB05-S-Orange,size=S|sku=WB05-S-Purple,size=S|sku=WB05-M-Black,size=M|sku=WB05-M-Orange,size=M|sku=WB05-M-Purple,size=M|sku=WB05-L-Black,size=L|sku=WB05-L-Orange,size=L|sku=WB05-L-Purple,size=L|sku=WB05-XL-Black,size=XL|sku=WB05-XL-Orange,size=XL|sku=WB05-XL-Purple,size=XL",, diff --git a/src/Services/ProductBundleProcessorFactory.php b/src/Services/ProductBundleProcessorFactory.php index e7d15792..ad669820 100644 --- a/src/Services/ProductBundleProcessorFactory.php +++ b/src/Services/ProductBundleProcessorFactory.php @@ -32,7 +32,6 @@ use TechDivision\Import\Product\Bundle\Actions\Processors\ProductBundleOptionCreateProcessor; use TechDivision\Import\Product\Bundle\Actions\Processors\ProductBundleOptionUpdateProcessor; use TechDivision\Import\Product\Bundle\Actions\Processors\ProductBundleOptionValueCreateProcessor; -use TechDivision\Import\Product\Bundle\Actions\Processors\ProductBundleOptionValueUpdateProcessor; use TechDivision\Import\Product\Bundle\Actions\Processors\ProductBundleSelectionCreateProcessor; use TechDivision\Import\Product\Bundle\Actions\Processors\ProductBundleSelectionUpdateProcessor; use TechDivision\Import\Product\Bundle\Actions\Processors\ProductBundleSelectionPriceCreateProcessor; diff --git a/src/Services/ProductVariantProcessorFactory.php b/src/Services/ProductVariantProcessorFactory.php index 5555aac0..c2af8b01 100644 --- a/src/Services/ProductVariantProcessorFactory.php +++ b/src/Services/ProductVariantProcessorFactory.php @@ -23,6 +23,10 @@ use TechDivision\Import\Configuration\SubjectInterface; use TechDivision\Import\Repositories\EavAttributeRepository; use TechDivision\Import\Repositories\EavAttributeOptionValueRepository; +use TechDivision\Import\Product\Variant\Repositories\ProductRelationRepository; +use TechDivision\Import\Product\Variant\Repositories\ProductSuperLinkRepository; +use TechDivision\Import\Product\Variant\Repositories\ProductSuperAttributeRepository; +use TechDivision\Import\Product\Variant\Repositories\ProductSuperAttributeLabelRepository; use TechDivision\Import\Product\Variant\Actions\ProductRelationAction; use TechDivision\Import\Product\Variant\Actions\ProductSuperAttributeAction; use TechDivision\Import\Product\Variant\Actions\ProductSuperAttributeLabelAction; @@ -30,7 +34,9 @@ use TechDivision\Import\Product\Variant\Actions\Processors\ProductRelationCreateProcessor; use TechDivision\Import\Product\Variant\Actions\Processors\ProductSuperLinkCreateProcessor; use TechDivision\Import\Product\Variant\Actions\Processors\ProductSuperAttributeCreateProcessor; +use TechDivision\Import\Product\Variant\Actions\Processors\ProductSuperAttributeUpdateProcessor; use TechDivision\Import\Product\Variant\Actions\Processors\ProductSuperAttributeLabelCreateProcessor; +use TechDivision\Import\Product\Variant\Actions\Processors\ProductSuperAttributeLabelUpdateProcessor; /** * Factory to create a new product variant processor. @@ -80,6 +86,30 @@ public static function factory(\PDO $connection, SubjectInterface $configuration $eavAttributeOptionValueRepository->setConnection($connection); $eavAttributeOptionValueRepository->init(); + // initialize the repository that provides product relation query functionality + $productRelationRepository = new ProductRelationRepository(); + $productRelationRepository->setUtilityClassName($utilityClassName); + $productRelationRepository->setConnection($connection); + $productRelationRepository->init(); + + // initialize the repository that provides product super link query functionality + $productSuperLinkRepository = new ProductSuperLinkRepository(); + $productSuperLinkRepository->setUtilityClassName($utilityClassName); + $productSuperLinkRepository->setConnection($connection); + $productSuperLinkRepository->init(); + + // initialize the repository that provides product super attribute query functionality + $productSuperAttributeRepository = new ProductSuperAttributeRepository(); + $productSuperAttributeRepository->setUtilityClassName($utilityClassName); + $productSuperAttributeRepository->setConnection($connection); + $productSuperAttributeRepository->init(); + + // initialize the repository that provides product super attribute label query functionality + $productSuperAttributeLabelRepository = new ProductSuperAttributeLabelRepository(); + $productSuperAttributeLabelRepository->setUtilityClassName($utilityClassName); + $productSuperAttributeLabelRepository->setConnection($connection); + $productSuperAttributeLabelRepository->init(); + // initialize the action that provides product relation CRUD functionality $productRelationCreateProcessor = new ProductRelationCreateProcessor(); $productRelationCreateProcessor->setUtilityClassName($utilityClassName); @@ -93,16 +123,26 @@ public static function factory(\PDO $connection, SubjectInterface $configuration $productSuperAttributeCreateProcessor->setUtilityClassName($utilityClassName); $productSuperAttributeCreateProcessor->setConnection($connection); $productSuperAttributeCreateProcessor->init(); + $productSuperAttributeUpdateProcessor = new ProductSuperAttributeUpdateProcessor(); + $productSuperAttributeUpdateProcessor->setUtilityClassName($utilityClassName); + $productSuperAttributeUpdateProcessor->setConnection($connection); + $productSuperAttributeUpdateProcessor->init(); $productSuperAttributeAction = new ProductSuperAttributeAction(); $productSuperAttributeAction->setCreateProcessor($productSuperAttributeCreateProcessor); + $productSuperAttributeAction->setUpdateProcessor($productSuperAttributeUpdateProcessor); // initialize the action that provides product super attribute label CRUD functionality $productSuperAttributeLabelCreateProcessor = new ProductSuperAttributeLabelCreateProcessor(); $productSuperAttributeLabelCreateProcessor->setUtilityClassName($utilityClassName); $productSuperAttributeLabelCreateProcessor->setConnection($connection); $productSuperAttributeLabelCreateProcessor->init(); + $productSuperAttributeLabelUpdateProcessor = new ProductSuperAttributeLabelUpdateProcessor(); + $productSuperAttributeLabelUpdateProcessor->setUtilityClassName($utilityClassName); + $productSuperAttributeLabelUpdateProcessor->setConnection($connection); + $productSuperAttributeLabelUpdateProcessor->init(); $productSuperAttributeLabelAction = new ProductSuperAttributeLabelAction(); $productSuperAttributeLabelAction->setCreateProcessor($productSuperAttributeLabelCreateProcessor); + $productSuperAttributeLabelAction->setUpdateProcessor($productSuperAttributeLabelUpdateProcessor); // initialize the action that provides product super link CRUD functionality $productSuperLinkCreateProcessor = new ProductSuperLinkCreateProcessor(); @@ -118,6 +158,10 @@ public static function factory(\PDO $connection, SubjectInterface $configuration $productVariantProcessor->setConnection($connection); $productVariantProcessor->setEavAttributeOptionValueRepository($eavAttributeOptionValueRepository); $productVariantProcessor->setEavAttributeRepository($eavAttributeRepository); + $productVariantProcessor->setProductRelationRepository($productRelationRepository); + $productVariantProcessor->setProductSuperLinkRepository($productSuperLinkRepository); + $productVariantProcessor->setProductSuperAttributeRepository($productSuperAttributeRepository); + $productVariantProcessor->setProductSuperAttributeLabelRepository($productSuperAttributeLabelRepository); $productVariantProcessor->setProductRelationAction($productRelationAction); $productVariantProcessor->setProductSuperLinkAction($productSuperLinkAction); $productVariantProcessor->setProductSuperAttributeAction($productSuperAttributeAction);