File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
app/code/Magento/CatalogImportExport/Model/Import/Product/Type Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -290,7 +290,7 @@ protected function _initAttributes()
290
290
array_keys (self ::$ commonAttributesCache ),
291
291
self ::$ invAttributesCache
292
292
);
293
- if ($ unknownAttributeIds ) {
293
+ if ($ unknownAttributeIds || $ this -> _forcedAttributesCodes ) {
294
294
$ this ->attachAttributesById ($ attributeSetName , $ attributeIds );
295
295
}
296
296
}
@@ -317,8 +317,11 @@ protected function _initAttributes()
317
317
protected function attachAttributesById ($ attributeSetName , $ attributeIds )
318
318
{
319
319
foreach ($ this ->_prodAttrColFac ->create ()->addFieldToFilter (
320
- 'main_table.attribute_id ' ,
321
- ['in ' => $ attributeIds ]
320
+ ['main_table.attribute_id ' , 'main_table.attribute_code ' ],
321
+ [
322
+ ['in ' => $ attributeIds ],
323
+ ['in ' => $ this ->_forcedAttributesCodes ]
324
+ ]
322
325
) as $ attribute ) {
323
326
$ attributeCode = $ attribute ->getAttributeCode ();
324
327
$ attributeId = $ attribute ->getId ();
You can’t perform that action at this time.
0 commit comments