diff --git a/CHANGELOG.md b/CHANGELOG.md
index 47d78e35..25fc05df 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,13 @@
+# Version 1.0.0-alpha11
+
+## Bugfixes
+
+* None
+
+## Features
+
+* Implement add-update operation for product link import
+
# Version 1.0.0-alpha10
## Bugfixes
diff --git a/composer.json b/composer.json
index c9da2113..e25864ed 100755
--- a/composer.json
+++ b/composer.json
@@ -15,6 +15,7 @@
"techdivision/import-product-bundle" : "~1.0",
"techdivision/import-product-variant" : "~1.0",
"techdivision/import-product-ee" : "~1.0",
+ "techdivision/import-product-link-ee" : "~1.0",
"techdivision/import-product-media-ee" : "~1.0",
"techdivision/import-product-bundle-ee" : "~1.0",
"techdivision/import-product-variant-ee" : "~1.0"
diff --git a/projects/sample-data/ce/212/conf/techdivision-import.json b/projects/sample-data/ce/212/conf/techdivision-import.json
index bcfc38ea..d4fc9a2a 100644
--- a/projects/sample-data/ce/212/conf/techdivision-import.json
+++ b/projects/sample-data/ce/212/conf/techdivision-import.json
@@ -267,14 +267,15 @@
{
"class-name": "TechDivision\\Import\\Product\\Link\\Subjects\\LinkSubject",
"processor-factory" : "TechDivision\\Import\\Cli\\Services\\ProductLinkProcessorFactory",
- "utility-class-name" : "TechDivision\\Import\\Product\\Links\\Utils\\SqlStatements",
+ "utility-class-name" : "TechDivision\\Import\\Product\\Link\\Utils\\SqlStatements",
"prefix": "links",
"source-dir": "projects/sample-data/tmp",
"target-dir": "projects/sample-data/tmp",
"observers": [
{
"import": [
- "TechDivision\\Import\\Product\\Link\\Observers\\LinkObserver"
+ "TechDivision\\Import\\Product\\Link\\Observers\\LinkObserver",
+ "TechDivision\\Import\\Product\\Link\\Observers\\LinkAttributePositionObserver"
]
}
]
@@ -470,6 +471,22 @@
]
}
]
+ },
+ {
+ "class-name": "TechDivision\\Import\\Product\\Link\\Subjects\\LinkSubject",
+ "processor-factory" : "TechDivision\\Import\\Cli\\Services\\ProductLinkProcessorFactory",
+ "utility-class-name" : "TechDivision\\Import\\Product\\Link\\Utils\\SqlStatements",
+ "prefix": "links",
+ "source-dir": "projects/sample-data/tmp",
+ "target-dir": "projects/sample-data/tmp",
+ "observers": [
+ {
+ "import": [
+ "TechDivision\\Import\\Product\\Link\\Observers\\LinkUpdateObserver",
+ "TechDivision\\Import\\Product\\Link\\Observers\\LinkAttributePositionUpdateObserver"
+ ]
+ }
+ ]
}
]
}
diff --git a/projects/sample-data/ce/212/data/add-update/magento-import_20161024_194026_01.csv b/projects/sample-data/ce/212/data/add-update/magento-import_20161024_194026_01.csv
index 2b7254fa..db0b3041 100644
--- a/projects/sample-data/ce/212/data/add-update/magento-import_20161024_194026_01.csv
+++ b/projects/sample-data/ce/212/data/add-update/magento-import_20161024_194026_01.csv
@@ -5,7 +5,7 @@ sku,store_view_code,attribute_set_code,product_type,categories,product_websites,
Adjustable shoulder strap.
Full-length zipper.
L 29"" x W 13"" x H 11"".
-",,,1,Taxable Goods,"Catalog, Search",36,33,,,joust-duffle-bag-ssss,,,,/m/b/mb01-blue-0.jpg,,/m/b/mb01-blue-0.jpg,,/m/b/mb01-blue-0.jpg,,,,"10/24/16, 12:36 PM","10/24/16, 12:36 PM",,,Block after Info Column,,,,,,,,,,,,,"activity=Gym|Hiking|Trail|Urban,erin_recommends=Yes,features_bags=Audio Pocket|Waterproof|Lightweight|Laptop Sleeve,material=Canvas|Cotton|Mesh|Polyester,sale=Yes,strap_bags=Adjustable|Cross Body|Padded|Shoulder|Single,style_bags=Messenger|Exercise|Tote",100,0,1,0,0,1,1,1,0,1,1,,1,0,1,1,0,1,0,0,0,,,,,,,/m/b/mb01-blue-0.jpg,Image,,,,,,,,,,
+",,,1,Taxable Goods,"Catalog, Search",36,33,,,joust-duffle-bag-ssss,,,,/m/b/mb01-blue-0.jpg,,/m/b/mb01-blue-0.jpg,,/m/b/mb01-blue-0.jpg,,,,"10/24/16, 12:36 PM","10/24/16, 12:36 PM",,,Block after Info Column,,,,,,,,,,,,,"activity=Gym|Hiking|Trail|Urban,erin_recommends=Yes,features_bags=Audio Pocket|Waterproof|Lightweight|Laptop Sleeve,material=Canvas|Cotton|Mesh|Polyester,sale=Yes,strap_bags=Adjustable|Cross Body|Padded|Shoulder|Single,style_bags=Messenger|Exercise|Tote",100,0,1,0,0,1,1,1,0,1,1,,1,0,1,1,0,1,0,0,0,"24-MB05,24-MB03,24-MB04","2,3,1","24-WB05,24-WB02,24-WB01",",,","24-UB02,24-MB02,24-MB06","3,2,1",/m/b/mb01-blue-0.jpg,Image,,,,,,,,,,
24-MB04,,Bag,simple,"Default Category/Gear,Default Category/Collections,Default Category/Gear/Bags",base,Strive Shoulder Pack,"Convenience is next to nothing when your day is crammed with action. So whether you're heading to class, gym, or the unbeaten path, make sure you've got your Strive Shoulder Pack stuffed with all your essentials, and extras as well.
- Zippered main compartment.
diff --git a/projects/sample-data/ce/212/data/replace/magento-import_20161024_194026_01.csv b/projects/sample-data/ce/212/data/replace/magento-import_20161024_194026_01.csv
index 0b046a0b..d2474827 100644
--- a/projects/sample-data/ce/212/data/replace/magento-import_20161024_194026_01.csv
+++ b/projects/sample-data/ce/212/data/replace/magento-import_20161024_194026_01.csv
@@ -5,7 +5,7 @@ sku,store_view_code,attribute_set_code,product_type,categories,product_websites,
- Adjustable shoulder strap.
- Full-length zipper.
- L 29"" x W 13"" x H 11"".
-
",,,1,,"Catalog, Search",34,,,,joust-duffle-bag,,,,/m/b/mb01-blue-0.jpg,,/m/b/mb01-blue-0.jpg,,/m/b/mb01-blue-0.jpg,,,,"10/24/16, 12:36 PM","10/24/16, 12:36 PM",,,,,,,,,,,,,,,,,,0,1,0,0,1,1,1,0,1,1,,1,0,1,1,0,1,0,0,0,,,,,,,/m/b/mb01-blue-0.jpg,Image,,,,,,,,,,
+",,,1,,"Catalog, Search",34,,,,joust-duffle-bag,,,,/m/b/mb01-blue-0.jpg,,/m/b/mb01-blue-0.jpg,,/m/b/mb01-blue-0.jpg,,,,"10/24/16, 12:36 PM","10/24/16, 12:36 PM",,,,,,,,,,,,,,,,,,0,1,0,0,1,1,1,0,1,1,,1,0,1,1,0,1,0,0,0,"24-MB05,24-MB03,24-MB04",",,","24-WB05,24-WB02,24-WB01",",,","24-UB02,24-MB02,24-MB06",",,",/m/b/mb01-blue-0.jpg,Image,,,,,,,,,,
24-MB04,,Bag,simple,"Default Category/Gear,Default Category/Collections,Default Category/Gear/Bags",base,Strive Shoulder Pack,"Convenience is next to nothing when your day is crammed with action. So whether you're heading to class, gym, or the unbeaten path, make sure you've got your Strive Shoulder Pack stuffed with all your essentials, and extras as well.
- Zippered main compartment.
@@ -98,7 +98,7 @@ sku,store_view_code,attribute_set_code,product_type,categories,product_websites,
- Secure clip closures.
- Durable fabric construction.
",,,1,Taxable Goods,"Catalog, Search",45,,,,push-it-messenger-bag,,,,/w/b/wb04-blue-0.jpg,,/w/b/wb04-blue-0.jpg,,/w/b/wb04-blue-0.jpg,,,,"10/24/16, 12:36 PM","10/24/16, 12:36 PM",,,Block after Info Column,,,,,,,,,,,,,"activity=Yoga|School|Urban,features_bags=Waterproof|Lightweight|Laptop Sleeve|Lockable,material=Nylon|Polyester,performance_fabric=Yes,strap_bags=Adjustable|Cross Body|Detachable|Padded|Shoulder|Single,style_bags=Messenger|Laptop",100,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,Image,,,,,,,,,,
-24-UG06,,Gear,simple,"Default Category/Gear,Default Category/Gear/Fitness Equipment",base,Affirm Water Bottle ,"You'll stay hydrated with ease with the Affirm Water Bottle by your side or in hand. Measurements on the outside help you keep track of how much you're drinking, while the screw-top lid prevents spills. A metal carabiner clip allows you to attach it to the outside of a backpack or bag for easy access.
+24-UG06,,Gear,simple,"Default Category/Gear,Default Category/Gear/Fitness Equipment",base,Affirm Water Bottle,"You'll stay hydrated with ease with the Affirm Water Bottle by your side or in hand. Measurements on the outside help you keep track of how much you're drinking, while the screw-top lid prevents spills. A metal carabiner clip allows you to attach it to the outside of a backpack or bag for easy access.
- Made of plastic.
- Grooved sides for an easy grip.
@@ -137,7 +137,7 @@ sku,store_view_code,attribute_set_code,product_type,categories,product_websites,
- Durable and soft, scratch-proof foam.
- Individually wrapped.
- Ten color choices.
-
",,,1,Taxable Goods,"Catalog, Search",5,,,,sprite-foam-yoga-brick,,,,/l/u/luma-yoga-brick.jpg,,/l/u/luma-yoga-brick.jpg,,/l/u/luma-yoga-brick.jpg,,,,"10/24/16, 12:36 PM","10/24/16, 12:36 PM",,,Block after Info Column,,,,,,,,,,,,,"activity=Yoga|Recreation|Gym|Sports,category_gear=Exercise,gender=Men|Women|Unisex,material=Foam",100,0,1,0,0,1,1,1,0,1,1,,1,0,1,1,0,1,0,0,0,,,,,,,/l/u/luma-yoga-brick.jpg,Image,,,,,,,,,,
+",,,1,Taxable Goods,"Catalog, Search",5,,,,sprite-foam-yoga-brick,,,,/l/u/luma-yoga-brick.jpg,,/l/u/luma-yoga-brick.jpg,,/l/u/luma-yoga-brick.jpg,,,,"10/24/16, 12:36 PM","10/24/16, 12:36 PM",,,Block after Info Column,,,,,,,,,,,,,"activity=Yoga|Recreation|Gym|Sports,category_gear=Exercise,gender=Men|Women|Unisex,material=Foam",100,0,1,0,0,1,1,1,0,1,1,,1,0,1,1,0,1,0,0,0,,,,,,,/l/u/luma-yoga-brick.jpg,Image,,,,,,,,,,
24-WG088,,Gear,simple,"Default Category/Gear,Default Category/Gear/Fitness Equipment",base,Sprite Foam Roller,"It hurts so good to use the Sprite Foam Roller on achy, tired muscles for myofascial massage therapy. Or you can add this fundamental piece to your Pilates and yoga accouterment, or apply towards core stability, strengthening and balance exercise.
- 6'' wide by 12'' long.
@@ -145,7 +145,7 @@ sku,store_view_code,attribute_set_code,product_type,categories,product_websites,
- EPP or PE foam options.
- Solid, dense, closed-cell foam.
",,,1,Taxable Goods,"Catalog, Search",19,,,,sprite-foam-roller,,,,/l/u/luma-foam-roller.jpg,,/l/u/luma-foam-roller.jpg,,/l/u/luma-foam-roller.jpg,,,,"10/24/16, 12:36 PM","10/24/16, 12:36 PM",,,Block after Info Column,,,,,,,,,,,,,"activity=Yoga|Gym,category_gear=Exercise,gender=Men|Women|Unisex,material=Foam",100,0,1,0,0,1,1,1,0,1,1,,1,0,1,1,0,1,0,0,0,,,,,,,/l/u/luma-foam-roller.jpg,Image,,,,,,,,,,
-24-UG03,,Gear,simple,"Default Category/Gear,Default Category/Gear/Fitness Equipment",base,Harmony Lumaflex™ Strength Band Kit ,"Forget fancy machines and costly memberships - the Harmony Lumaflex™ Stength Band Kit is all you need for an amazing workout. The kit has everything you need for a range of strengthening and toning exercises.
+24-UG03,,Gear,simple,"Default Category/Gear,Default Category/Gear/Fitness Equipment",base,Harmony Lumaflex™ Strength Band Kit,"Forget fancy machines and costly memberships - the Harmony Lumaflex™ Stength Band Kit is all you need for an amazing workout. The kit has everything you need for a range of strengthening and toning exercises.
- Three flex bands.
- Textured, ergonomic grips.
diff --git a/projects/sample-data/ee/212/conf/techdivision-import.json b/projects/sample-data/ee/212/conf/techdivision-import.json
index fc6317de..d36255e6 100644
--- a/projects/sample-data/ee/212/conf/techdivision-import.json
+++ b/projects/sample-data/ee/212/conf/techdivision-import.json
@@ -265,7 +265,7 @@
]
},
{
- "class-name": "TechDivision\\Import\\Product\\Link\\Subjects\\LinkSubject",
+ "class-name": "TechDivision\\Import\\Product\\Link\\Ee\\Subjects\\EeLinkSubject",
"processor-factory" : "TechDivision\\Import\\Cli\\Services\\ProductLinkProcessorFactory",
"utility-class-name" : "TechDivision\\Import\\Product\\Link\\Utils\\SqlStatements",
"prefix": "links",
@@ -274,7 +274,8 @@
"observers": [
{
"import": [
- "TechDivision\\Import\\Product\\Link\\Observers\\LinkObserver"
+ "TechDivision\\Import\\Product\\Link\\Ee\\Observers\\EeLinkObserver",
+ "TechDivision\\Import\\Product\\Link\\Observers\\LinkAttributePositionObserver"
]
}
]
@@ -470,6 +471,22 @@
]
}
]
+ },
+ {
+ "class-name": "TechDivision\\Import\\Product\\Link\\Ee\\Subjects\\EeLinkSubject",
+ "processor-factory" : "TechDivision\\Import\\Cli\\Services\\ProductLinkProcessorFactory",
+ "utility-class-name" : "TechDivision\\Import\\Product\\Link\\Utils\\SqlStatements",
+ "prefix": "links",
+ "source-dir": "projects/sample-data/tmp",
+ "target-dir": "projects/sample-data/tmp",
+ "observers": [
+ {
+ "import": [
+ "TechDivision\\Import\\Product\\Link\\Ee\\Observers\\EeLinkUpdateObserver",
+ "TechDivision\\Import\\Product\\Link\\Observers\\LinkAttributePositionUpdateObserver"
+ ]
+ }
+ ]
}
]
}
diff --git a/projects/sample-data/ee/212/data/add-update/magento-import_20161021_161909_01.csv b/projects/sample-data/ee/212/data/add-update/magento-import_20161021_161909_01.csv
index 292c2361..ab1d223e 100644
--- a/projects/sample-data/ee/212/data/add-update/magento-import_20161021_161909_01.csv
+++ b/projects/sample-data/ee/212/data/add-update/magento-import_20161021_161909_01.csv
@@ -5,7 +5,7 @@ sku,store_view_code,attribute_set_code,product_type,categories,product_websites,
- Adjustable shoulder strap.
- Full-length zipper.
- L 29"" x W 13"" x H 11"".
-
",,,0,Taxable Goods,"Catalog, Search",36,33,,,joust-duffle-bag-s,,,,/m/b/mb01-blue-0.jpg,,/m/b/mb01-blue-0.jpg,,/m/b/mb01-blue-0.jpg,,,,"10/21/16, 9:10 AM","10/21/16, 9:10 AM",,,Block after Info Column,,,,,,,,,,,,,"activity=Gym|Hiking|Trail|Urban,erin_recommends=Yes,features_bags=Audio Pocket|Waterproof|Lightweight|Laptop Sleeve,material=Canvas|Cotton|Mesh|Polyester,sale=Yes,strap_bags=Adjustable|Cross Body|Padded|Shoulder|Single,style_bags=Messenger|Exercise|Tote",100,0,1,0,0,1,1,1,0,1,1,,1,0,1,1,0,1,0,0,0,0,1,,,,,,,/m/b/mb01-blue-0.jpg,Image,,,,,,,,,,
+",,,0,Taxable Goods,"Catalog, Search",36,33,,,joust-duffle-bag-s,,,,/m/b/mb01-blue-0.jpg,,/m/b/mb01-blue-0.jpg,,/m/b/mb01-blue-0.jpg,,,,"10/21/16, 9:10 AM","10/21/16, 9:10 AM",,,Block after Info Column,,,,,,,,,,,,,"activity=Gym|Hiking|Trail|Urban,erin_recommends=Yes,features_bags=Audio Pocket|Waterproof|Lightweight|Laptop Sleeve,material=Canvas|Cotton|Mesh|Polyester,sale=Yes,strap_bags=Adjustable|Cross Body|Padded|Shoulder|Single,style_bags=Messenger|Exercise|Tote",100,0,1,0,0,1,1,1,0,1,1,,1,0,1,1,0,1,0,0,0,0,1,"24-MB05,24-MB03,24-MB04","2,3,1","24-WB05,24-WB02,24-WB01","3,2,1","24-UB02,24-MB02,24-MB06",",,",/m/b/mb01-blue-0.jpg,Image,,,,,,,,,,
24-MB04,,Bag,simple,"Default Category/Gear,Default Category/Gear/Bags,Default Category/Collections",base,Strive Shoulder Pack,"Convenience is next to nothing when your day is crammed with action. So whether you're heading to class, gym, or the unbeaten path, make sure you've got your Strive Shoulder Pack stuffed with all your essentials, and extras as well.
- Zippered main compartment.
diff --git a/projects/sample-data/ee/212/data/replace/magento-import_20161021_161909_01.csv b/projects/sample-data/ee/212/data/replace/magento-import_20161021_161909_01.csv
index 2c1c08c8..6d2140ba 100644
--- a/projects/sample-data/ee/212/data/replace/magento-import_20161021_161909_01.csv
+++ b/projects/sample-data/ee/212/data/replace/magento-import_20161021_161909_01.csv
@@ -5,7 +5,7 @@ sku,store_view_code,attribute_set_code,product_type,categories,product_websites,
- Adjustable shoulder strap.
- Full-length zipper.
- L 29"" x W 13"" x H 11"".
-
",,,1,,"Catalog, Search",34,,,,joust-duffle-bag,,,,/m/b/mb01-blue-0.jpg,,/m/b/mb01-blue-0.jpg,,/m/b/mb01-blue-0.jpg,,,,"10/21/16, 9:10 AM","10/21/16, 9:10 AM",,,,,,,,,,,,,,,,,,0,1,0,0,1,1,1,0,1,1,,1,0,1,1,0,1,0,0,0,0,1,,,,,,,/m/b/mb01-blue-0.jpg,Image,,,,,,,,,,
+",,,1,,"Catalog, Search",34,,,,joust-duffle-bag,,,,/m/b/mb01-blue-0.jpg,,/m/b/mb01-blue-0.jpg,,/m/b/mb01-blue-0.jpg,,,,"10/21/16, 9:10 AM","10/21/16, 9:10 AM",,,,,,,,,,,,,,,,,,0,1,0,0,1,1,1,0,1,1,,1,0,1,1,0,1,0,0,0,0,1,"24-MB05,24-MB03,24-MB04",",,","24-WB05,24-WB02,24-WB01",",,","24-UB02,24-MB02,24-MB06",",,",/m/b/mb01-blue-0.jpg,Image,,,,,,,,,,
24-MB04,,Bag,simple,"Default Category/Gear,Default Category/Gear/Bags,Default Category/Collections",base,Strive Shoulder Pack,"Convenience is next to nothing when your day is crammed with action. So whether you're heading to class, gym, or the unbeaten path, make sure you've got your Strive Shoulder Pack stuffed with all your essentials, and extras as well.
- Zippered main compartment.
@@ -98,7 +98,7 @@ sku,store_view_code,attribute_set_code,product_type,categories,product_websites,
- Secure clip closures.
- Durable fabric construction.
",,,1,Taxable Goods,"Catalog, Search",45,,,,push-it-messenger-bag,,,,/w/b/wb04-blue-0.jpg,,/w/b/wb04-blue-0.jpg,,/w/b/wb04-blue-0.jpg,,,,"10/21/16, 9:10 AM","10/21/16, 9:10 AM",,,Block after Info Column,,,,,,,,,,,,,"activity=Yoga|School|Urban,features_bags=Waterproof|Lightweight|Laptop Sleeve|Lockable,material=Nylon|Polyester,performance_fabric=Yes,strap_bags=Adjustable|Cross Body|Detachable|Padded|Shoulder|Single,style_bags=Messenger|Laptop",100,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,Image,,,,,,,,,,
-24-UG06,,Gear,simple,"Default Category/Gear,Default Category/Gear/Fitness Equipment",base,Affirm Water Bottle ,"You'll stay hydrated with ease with the Affirm Water Bottle by your side or in hand. Measurements on the outside help you keep track of how much you're drinking, while the screw-top lid prevents spills. A metal carabiner clip allows you to attach it to the outside of a backpack or bag for easy access.
+24-UG06,,Gear,simple,"Default Category/Gear,Default Category/Gear/Fitness Equipment",base,Affirm Water Bottle,"You'll stay hydrated with ease with the Affirm Water Bottle by your side or in hand. Measurements on the outside help you keep track of how much you're drinking, while the screw-top lid prevents spills. A metal carabiner clip allows you to attach it to the outside of a backpack or bag for easy access.
- Made of plastic.
- Grooved sides for an easy grip.
@@ -137,7 +137,7 @@ sku,store_view_code,attribute_set_code,product_type,categories,product_websites,
- Durable and soft, scratch-proof foam.
- Individually wrapped.
- Ten color choices.
-
",,,1,Taxable Goods,"Catalog, Search",5,,,,sprite-foam-yoga-brick,,,,/l/u/luma-yoga-brick.jpg,,/l/u/luma-yoga-brick.jpg,,/l/u/luma-yoga-brick.jpg,,,,"10/21/16, 9:10 AM","10/21/16, 9:10 AM",,,Block after Info Column,,,,,,,,,,,,,"activity=Yoga|Recreation|Gym|Sports,category_gear=Exercise,gender=Men|Women|Unisex,material=Foam",100,0,1,0,0,1,1,1,0,1,1,,1,0,1,1,0,1,0,0,0,0,1,,,,,,,/l/u/luma-yoga-brick.jpg,Image,,,,,,,,,,
+",,,1,Taxable Goods,"Catalog, Search",5,,,,sprite-foam-yoga-brick,,,,/l/u/luma-yoga-brick.jpg,,/l/u/luma-yoga-brick.jpg,,/l/u/luma-yoga-brick.jpg,,,,"10/21/16, 9:10 AM","10/21/16, 9:10 AM",,,Block after Info Column,,,,,,,,,,,,,"activity=Yoga|Recreation|Gym|Sports,category_gear=Exercise,gender=Men|Women|Unisex,material=Foam",100,0,1,0,0,1,1,1,0,1,1,,1,0,1,1,0,1,0,0,0,0,1,,,,,,,/l/u/luma-yoga-brick.jpg,Image,,,,,,,,,,
24-WG088,,Gear,simple,"Default Category/Gear,Default Category/Gear/Fitness Equipment",base,Sprite Foam Roller,"It hurts so good to use the Sprite Foam Roller on achy, tired muscles for myofascial massage therapy. Or you can add this fundamental piece to your Pilates and yoga accouterment, or apply towards core stability, strengthening and balance exercise.
- 6'' wide by 12'' long.
@@ -145,7 +145,7 @@ sku,store_view_code,attribute_set_code,product_type,categories,product_websites,
- EPP or PE foam options.
- Solid, dense, closed-cell foam.
",,,1,Taxable Goods,"Catalog, Search",19,,,,sprite-foam-roller,,,,/l/u/luma-foam-roller.jpg,,/l/u/luma-foam-roller.jpg,,/l/u/luma-foam-roller.jpg,,,,"10/21/16, 9:10 AM","10/21/16, 9:10 AM",,,Block after Info Column,,,,,,,,,,,,,"activity=Yoga|Gym,category_gear=Exercise,gender=Men|Women|Unisex,material=Foam",100,0,1,0,0,1,1,1,0,1,1,,1,0,1,1,0,1,0,0,0,0,1,,,,,,,/l/u/luma-foam-roller.jpg,Image,,,,,,,,,,
-24-UG03,,Gear,simple,"Default Category/Gear,Default Category/Gear/Fitness Equipment",base,Harmony Lumaflex™ Strength Band Kit ,"Forget fancy machines and costly memberships - the Harmony Lumaflex™ Stength Band Kit is all you need for an amazing workout. The kit has everything you need for a range of strengthening and toning exercises.
+24-UG03,,Gear,simple,"Default Category/Gear,Default Category/Gear/Fitness Equipment",base,Harmony Lumaflex™ Strength Band Kit,"Forget fancy machines and costly memberships - the Harmony Lumaflex™ Stength Band Kit is all you need for an amazing workout. The kit has everything you need for a range of strengthening and toning exercises.
- Three flex bands.
- Textured, ergonomic grips.
diff --git a/src/Services/ImportProcessorFactory.php b/src/Services/ImportProcessorFactory.php
index cf4913a9..46801a44 100644
--- a/src/Services/ImportProcessorFactory.php
+++ b/src/Services/ImportProcessorFactory.php
@@ -28,6 +28,7 @@
use TechDivision\Import\Repositories\CategoryRepository;
use TechDivision\Import\Repositories\StoreWebsiteRepository;
use TechDivision\Import\Repositories\EavAttributeRepository;
+use TechDivision\Import\Repositories\LinkAttributeRepository;
use TechDivision\Import\Repositories\CoreConfigDataRepository;
use TechDivision\Import\Repositories\CategoryVarcharRepository;
use TechDivision\Import\Repositories\EavAttributeSetRepository;
@@ -106,6 +107,12 @@ public static function factory(\PDO $connection, ConfigurationInterface $configu
$linkTypeRepository->setConnection($connection);
$linkTypeRepository->init();
+ // initialize the repository that provides link attribute query functionality
+ $linkAttributeRepository = new LinkAttributeRepository();
+ $linkAttributeRepository->setUtilityClassName($utilityClassName);
+ $linkAttributeRepository->setConnection($connection);
+ $linkAttributeRepository->init();
+
// initialize the repository that provides core config data functionality
$coreConfigDataRepository = new CoreConfigDataRepository();
$coreConfigDataRepository->setUtilityClassName($utilityClassName);
@@ -123,6 +130,7 @@ public static function factory(\PDO $connection, ConfigurationInterface $configu
$importProcessor->setStoreWebsiteRepository($storeWebsiteRepository);
$importProcessor->setTaxClassRepository($taxClassRepository);
$importProcessor->setLinkTypeRepository($linkTypeRepository);
+ $importProcessor->setLinkAttributeRepository($linkAttributeRepository);
$importProcessor->setCoreConfigDataRepository($coreConfigDataRepository);
// return the initialize import processor instance
diff --git a/src/Services/ProductLinkProcessorFactory.php b/src/Services/ProductLinkProcessorFactory.php
index 56b6b5b1..17b07161 100644
--- a/src/Services/ProductLinkProcessorFactory.php
+++ b/src/Services/ProductLinkProcessorFactory.php
@@ -21,16 +21,14 @@
namespace TechDivision\Import\Cli\Services;
use TechDivision\Import\Configuration\SubjectInterface;
+use TechDivision\Import\Product\Link\Repositories\ProductLinkRepository;
+use TechDivision\Import\Product\Link\Repositories\ProductLinkAttributeIntRepository;
use TechDivision\Import\Product\Link\Actions\ProductLinkAction;
-use TechDivision\Import\Product\Link\Actions\ProductLinkAttributeAction;
use TechDivision\Import\Product\Link\Actions\ProductLinkAttributeIntAction;
-use TechDivision\Import\Product\Link\Actions\ProductLinkAttributeDecimalAction;
-use TechDivision\Import\Product\Link\Actions\ProductLinkAttributeVarcharAction;
use TechDivision\Import\Product\Link\Actions\Processors\ProductLinkCreateProcessor;
-use TechDivision\Import\Product\Link\Actions\Processors\ProductLinkAttributeCreateProcessor;
+use TechDivision\Import\Product\Link\Actions\Processors\ProductLinkUpdateProcessor;
use TechDivision\Import\Product\Link\Actions\Processors\ProductLinkAttributeIntCreateProcessor;
-use TechDivision\Import\Product\Link\Actions\Processors\ProductLinkAttributeDecimalCreateProcessor;
-use TechDivision\Import\Product\Link\Actions\Processors\ProductLinkAttributeVarcharCreateProcessor;
+use TechDivision\Import\Product\Link\Actions\Processors\ProductLinkAttributeIntUpdateProcessor;
/**
* Factory to create a new product link processor.
@@ -68,55 +66,52 @@ public static function factory(\PDO $connection, SubjectInterface $configuration
// load the utility class name
$utilityClassName = $configuration->getUtilityClassName();
+ // initialize the repository that provides product link query functionality
+ $productLinkRepository = new ProductLinkRepository();
+ $productLinkRepository->setUtilityClassName($utilityClassName);
+ $productLinkRepository->setConnection($connection);
+ $productLinkRepository->init();
+
+ // initialize the repository that provides product link attribute integer query functionality
+ $productLinkAttributeIntRepository = new ProductLinkAttributeIntRepository();
+ $productLinkAttributeIntRepository->setUtilityClassName($utilityClassName);
+ $productLinkAttributeIntRepository->setConnection($connection);
+ $productLinkAttributeIntRepository->init();
+
// initialize the action that provides product link CRUD functionality
$productLinkCreateProcessor = new ProductLinkCreateProcessor();
$productLinkCreateProcessor->setUtilityClassName($utilityClassName);
$productLinkCreateProcessor->setConnection($connection);
$productLinkCreateProcessor->init();
+ $productLinkUpdateProcessor = new ProductLinkUpdateProcessor();
+ $productLinkUpdateProcessor->setUtilityClassName($utilityClassName);
+ $productLinkUpdateProcessor->setConnection($connection);
+ $productLinkUpdateProcessor->init();
$productLinkAction = new ProductLinkAction();
$productLinkAction->setCreateProcessor($productLinkCreateProcessor);
-
- // initialize the action that provides product link attribute CRUD functionality
- $productLinkAttributeCreateProcessor = new ProductLinkAttributeCreateProcessor();
- $productLinkAttributeCreateProcessor->setUtilityClassName($utilityClassName);
- $productLinkAttributeCreateProcessor->setConnection($connection);
- $productLinkAttributeCreateProcessor->init();
- $productLinkAttributeAction = new ProductLinkAttributeAction();
- $productLinkAttributeAction->setCreateProcessor($productLinkAttributeCreateProcessor);
-
- // initialize the action that provides product link attribute decimal CRUD functionality
- $productLinkAttributeDecimalCreateProcessor = new ProductLinkAttributeDecimalCreateProcessor();
- $productLinkAttributeDecimalCreateProcessor->setUtilityClassName($utilityClassName);
- $productLinkAttributeDecimalCreateProcessor->setConnection($connection);
- $productLinkAttributeDecimalCreateProcessor->init();
- $productLinkAttributeDecimalAction = new ProductLinkAttributeDecimalAction();
- $productLinkAttributeDecimalAction->setCreateProcessor($productLinkAttributeDecimalCreateProcessor);
+ $productLinkAction->setUpdateProcessor($productLinkUpdateProcessor);
// initialize the action that provides product link attribute integer CRUD functionality
$productLinkAttributeIntCreateProcessor = new ProductLinkAttributeIntCreateProcessor();
$productLinkAttributeIntCreateProcessor->setUtilityClassName($utilityClassName);
$productLinkAttributeIntCreateProcessor->setConnection($connection);
$productLinkAttributeIntCreateProcessor->init();
+ $productLinkAttributeIntUpdateProcessor = new ProductLinkAttributeIntUpdateProcessor();
+ $productLinkAttributeIntUpdateProcessor->setUtilityClassName($utilityClassName);
+ $productLinkAttributeIntUpdateProcessor->setConnection($connection);
+ $productLinkAttributeIntUpdateProcessor->init();
$productLinkAttributeIntAction = new ProductLinkAttributeIntAction();
$productLinkAttributeIntAction->setCreateProcessor($productLinkAttributeIntCreateProcessor);
-
- // initialize the action that provides product link attribute varchar CRUD functionality
- $productLinkAttributeVarcharCreateProcessor = new ProductLinkAttributeVarcharCreateProcessor();
- $productLinkAttributeVarcharCreateProcessor->setUtilityClassName($utilityClassName);
- $productLinkAttributeVarcharCreateProcessor->setConnection($connection);
- $productLinkAttributeVarcharCreateProcessor->init();
- $productLinkAttributeVarcharAction = new ProductLinkAttributeVarcharAction();
- $productLinkAttributeVarcharAction->setCreateProcessor($productLinkAttributeVarcharCreateProcessor);
+ $productLinkAttributeIntAction->setUpdateProcessor($productLinkAttributeIntUpdateProcessor);
// initialize the product link processor
$processorType = ProductLinkProcessorFactory::getProcessorType();
$productLinkProcessor = new $processorType();
$productLinkProcessor->setConnection($connection);
+ $productLinkProcessor->setProductLinkRepository($productLinkRepository);
+ $productLinkProcessor->setProductLinkAttributeIntRepository($productLinkAttributeIntRepository);
$productLinkProcessor->setProductLinkAction($productLinkAction);
- $productLinkProcessor->setProductLinkAttributeAction($productLinkAttributeAction);
$productLinkProcessor->setProductLinkAttributeIntAction($productLinkAttributeIntAction);
- $productLinkProcessor->setProductLinkAttributeDecimalAction($productLinkAttributeDecimalAction);
- $productLinkProcessor->setProductLinkAttributeVarcharAction($productLinkAttributeVarcharAction);
// return the instance
return $productLinkProcessor;
diff --git a/src/Simple.php b/src/Simple.php
index ca83422d..1ffef4de 100644
--- a/src/Simple.php
+++ b/src/Simple.php
@@ -283,6 +283,7 @@ public function setUp()
$globalData[RegistryKeys::TAX_CLASSES] = $importProcessor->getTaxClasses();
$globalData[RegistryKeys::DEFAULT_STORE] = $importProcessor->getDefaultStore();
$globalData[RegistryKeys::STORE_WEBSITES] = $importProcessor->getStoreWebsites();
+ $globalData[RegistryKeys::LINK_ATTRIBUTES] = $importProcessor->getLinkAttributes();
$globalData[RegistryKeys::ROOT_CATEGORIES] = $importProcessor->getRootCategories();
$globalData[RegistryKeys::CORE_CONFIG_DATA] = $importProcessor->getCoreConfigData();
$globalData[RegistryKeys::ATTRIBUTE_SETS] = $eavAttributeSets = $importProcessor->getEavAttributeSetsByEntityTypeId(4);