File tree Expand file tree Collapse file tree 2 files changed +5
-15
lines changed
app/code/Magento/ConfigurableProduct/Test/Fixture Expand file tree Collapse file tree 2 files changed +5
-15
lines changed Original file line number Diff line number Diff line change 77
88namespace Magento \ConfigurableProduct \Test \Fixture ;
99
10+ use Magento \Catalog \Test \Fixture \SelectAttribute ;
1011use 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
Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments