File tree Expand file tree Collapse file tree 6 files changed +15
-15
lines changed Expand file tree Collapse file tree 6 files changed +15
-15
lines changed Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" ?>
2
2
<config xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" urn:magento:framework:Module/etc/module.xsd" >
3
- <module name =" Ometria_AbandonedCarts" setup_version =" 2.4 .0" />
3
+ <module name =" Ometria_AbandonedCarts" setup_version =" 2.5 .0" />
4
4
</config >
Original file line number Diff line number Diff line change @@ -262,16 +262,14 @@ protected function serializeItem($item)
262
262
->addFieldToFilter ('attribute_code ' , $ attribute ['attribute_code ' ])
263
263
->getFirstItem ();
264
264
265
- $ key = 'value ' ;
266
-
267
- if (in_array ($ full_attribute ->getFrontendInput (), ['select ' , 'multiselect ' ])) {
268
- $ key = 'id ' ;
269
- }
265
+ $ inputType = $ fullAttribute ->getFrontendInput ();
266
+ $ type = $ inputType == 'multiselect ' ? '& ' . $ attribute ['attribute_code ' ] : $ attribute ['attribute_code ' ];
267
+ $ valueIdx = in_array ($ inputType , ['select ' , 'multiselect ' ]) ? 'id ' : 'value ' ;
270
268
271
269
$ tmp ['attributes ' ][] = [
272
- 'type ' => $ attribute [ ' attribute_code ' ] ,
273
- $ key => $ attribute ['value ' ],
274
- 'label ' => $ full_attribute ->getFrontendLabel ()
270
+ 'type ' => $ type ,
271
+ $ valueIdx => $ attribute ['value ' ],
272
+ 'label ' => $ fullAttribute ->getFrontendLabel ()
275
273
];
276
274
}
277
275
Original file line number Diff line number Diff line change @@ -389,12 +389,14 @@ private function getAttributes(ProductInterface $product)
389
389
continue ;
390
390
}
391
391
392
- $ valueIdx = in_array ($ attributeData ['input ' ], ['select ' , 'multiselect ' ]) ? 'id ' : 'value ' ;
392
+ $ inputType = $ attributeData ['input ' ];
393
+ $ type = $ inputType == 'multiselect ' ? '& ' . $ attribute ->getAttributeCode () : $ attribute ->getAttributeCode ();
394
+ $ valueIdx = in_array ($ inputType , ['select ' , 'multiselect ' ]) ? 'id ' : 'value ' ;
393
395
394
396
$ attributes [] = [
395
- 'type ' => $ attribute -> getAttributeCode () ,
397
+ 'type ' => $ type ,
396
398
$ valueIdx => $ attribute ->getValue (),
397
- 'label ' => $ attributeData ['label ' ]
399
+ 'label ' => $ attributeData ['label ' ]
398
400
];
399
401
}
400
402
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" ?>
2
2
<config xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" urn:magento:framework:Module/etc/module.xsd" >
3
- <module name =" Ometria_Api" setup_version =" 2.4 .0" />
3
+ <module name =" Ometria_Api" setup_version =" 2.5 .0" />
4
4
</config >
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" ?>
2
2
<config xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" urn:magento:framework:Module/etc/module.xsd" >
3
- <module name =" Ometria_Core" setup_version =" 2.4 .0" />
3
+ <module name =" Ometria_Core" setup_version =" 2.5 .0" />
4
4
</config >
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " ometria/magento2" ,
3
3
"type" : " magento2-module" ,
4
- "version" : " 2.4 .0" ,
4
+ "version" : " 2.5 .0" ,
5
5
"description" : " Dev composer package for Ometria Extension" ,
6
6
"authors" : [
7
7
{
You can’t perform that action at this time.
0 commit comments