Skip to content

Commit 8a2bd36

Browse files
author
Olexandr Lysenko
committed
Merge remote-tracking branch 'mainline/2.1' into MAGETWO-54677-patch21
2 parents 28730e7 + 2765acf commit 8a2bd36

File tree

36 files changed

+284
-139
lines changed

36 files changed

+284
-139
lines changed

app/code/Magento/Authorizenet/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"magento/framework": "100.1.*"
1414
},
1515
"type": "magento2-module",
16-
"version": "100.1.0",
16+
"version": "100.1.1",
1717
"license": [
1818
"proprietary"
1919
],

app/code/Magento/Braintree/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"magento/module-checkout-agreements": "100.1.*"
2424
},
2525
"type": "magento2-module",
26-
"version": "100.1.0",
26+
"version": "100.1.1",
2727
"license": [
2828
"proprietary"
2929
],

app/code/Magento/Catalog/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"magento/module-catalog-sample-data": "Sample Data version:100.1.*"
3434
},
3535
"type": "magento2-module",
36-
"version": "101.0.0",
36+
"version": "101.0.1",
3737
"license": [
3838
"OSL-3.0",
3939
"AFL-3.0"

app/code/Magento/CatalogInventory/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"magento/module-ui": "100.1.*"
1414
},
1515
"type": "magento2-module",
16-
"version": "100.1.0",
16+
"version": "100.1.1",
1717
"license": [
1818
"OSL-3.0",
1919
"AFL-3.0"

app/code/Magento/CatalogRule/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"magento/module-catalog-rule-sample-data": "Sample Data version:100.1.*"
1818
},
1919
"type": "magento2-module",
20-
"version": "100.1.0",
20+
"version": "100.1.1",
2121
"license": [
2222
"OSL-3.0",
2323
"AFL-3.0"

app/code/Magento/CatalogRuleConfigurable/composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
"magento/module-catalog-rule": "100.1.*",
99
"magento/module-store": "100.1.*",
1010
"magento/module-customer": "100.1.*",
11-
"magento/magento-composer-installer": "*"
11+
"magento/magento-composer-installer": "*"
1212
},
1313
"suggest": {
1414
"magento/module-catalog-rule": "100.1.*"
1515
},
1616
"type": "magento2-module",
17-
"version": "100.1.0",
17+
"version": "100.1.1",
1818
"license": [
1919
"OSL-3.0",
2020
"AFL-3.0"

app/code/Magento/CatalogSearch/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"magento/framework": "100.1.*"
1616
},
1717
"type": "magento2-module",
18-
"version": "100.1.0",
18+
"version": "100.1.1",
1919
"license": [
2020
"OSL-3.0",
2121
"AFL-3.0"

app/code/Magento/Checkout/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"magento/module-cookie": "100.1.*"
2828
},
2929
"type": "magento2-module",
30-
"version": "100.1.0",
30+
"version": "100.1.1",
3131
"license": [
3232
"OSL-3.0",
3333
"AFL-3.0"

app/code/Magento/Cms/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"magento/module-cms-sample-data": "Sample Data version:100.1.*"
1919
},
2020
"type": "magento2-module",
21-
"version": "101.0.0",
21+
"version": "101.0.1",
2222
"license": [
2323
"OSL-3.0",
2424
"AFL-3.0"

app/code/Magento/ConfigurableProduct/Controller/Adminhtml/Product/Initialization/Helper/Plugin/Configurable.php

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,9 @@ public function afterInitialize(Helper $subject, ProductInterface $product)
127127
*/
128128
private function setLinkedProducts(ProductInterface $product, ProductExtensionInterface $extensionAttributes)
129129
{
130-
$associatedProductIds = $this->request->getPost('associated_product_ids', []);
131-
$variationsMatrix = $this->getVariationMatrix();
130+
$associatedProductIds = $product->hasData('associated_product_ids') ?
131+
$product->getData('associated_product_ids') : [];
132+
$variationsMatrix = $this->getVariationMatrixFromProduct($product);
132133

133134
if ($associatedProductIds || $variationsMatrix) {
134135
$this->variationHandler->prepareAttributeSet($product);
@@ -141,10 +142,35 @@ private function setLinkedProducts(ProductInterface $product, ProductExtensionIn
141142
$extensionAttributes->setConfigurableProductLinks(array_filter($associatedProductIds));
142143
}
143144

145+
/**
146+
* Get variation-matrix from product
147+
*
148+
* @param ProductInterface $product
149+
* @return array
150+
*/
151+
private function getVariationMatrixFromProduct(ProductInterface $product)
152+
{
153+
$result = [];
154+
155+
$configurableMatrix = $product->hasData('configurable-matrix') ? $product->getData('configurable-matrix') : [];
156+
foreach ($configurableMatrix as $item) {
157+
if ($item['newProduct']) {
158+
$result[$item['variationKey']] = $this->mapData($item);
159+
160+
if (isset($item['qty'])) {
161+
$result[$item['variationKey']]['quantity_and_stock_status']['qty'] = $item['qty'];
162+
}
163+
}
164+
}
165+
166+
return $result;
167+
}
168+
144169
/**
145170
* Get variation-matrix from request
146171
*
147172
* @return array
173+
* @deprecated
148174
*/
149175
protected function getVariationMatrix()
150176
{

0 commit comments

Comments
 (0)