Skip to content

Commit 202749e

Browse files
committed
Merge branch 'ACP2E-2255' of https://github.com/magento-l3/magento2ce into PR-10122023
2 parents 98b7154 + 3b3b389 commit 202749e

File tree

2 files changed

+5
-15
lines changed

2 files changed

+5
-15
lines changed

app/code/Magento/ConfigurableProduct/Test/Fixture/Attribute.php

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,12 @@
77

88
namespace Magento\ConfigurableProduct\Test\Fixture;
99

10+
use Magento\Catalog\Test\Fixture\SelectAttribute;
1011
use Magento\Framework\DataObject;
1112

12-
class Attribute extends \Magento\Catalog\Test\Fixture\Attribute
13+
class Attribute extends SelectAttribute
1314
{
1415
private const DEFAULT_DATA = [
15-
'frontend_input' => 'select',
16-
'options' => [
17-
[
18-
'label' => 'option1%uniqid%',
19-
'sort_order' => 0,
20-
],
21-
[
22-
'label' => 'option2%uniqid%',
23-
'sort_order' => 1,
24-
]
25-
],
2616
'scope' => 'global',
2717
];
2818

app/code/Magento/ConfigurableProduct/Test/Fixture/Product.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,15 +197,15 @@ static function (array $value) {
197197
);
198198
$variationIndex = 0;
199199
foreach ($variations as $variation) {
200-
foreach ($variation as $attributeId => $valueInfo) {
201-
if (isset($links[$variationIndex]) && $links[$variationIndex] !== 0) {
200+
if (isset($links[$variationIndex]) && $links[$variationIndex] !== 0) {
201+
foreach ($variation as $attributeId => $valueInfo) {
202202
$attribute = $this->eavConfig->getAttribute(\Magento\Catalog\Model\Product::ENTITY, $attributeId);
203203
$product = $this->productRepository->getById($links[$variationIndex]);
204204
$product->setCustomAttribute($attribute->getAttributeCode(), $valueInfo['value']);
205205
$this->productRepository->save($product);
206206
}
207-
$variationIndex++;
208207
}
208+
$variationIndex++;
209209
}
210210
}
211211
}

0 commit comments

Comments
 (0)