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()
290290 array_keys (self ::$ commonAttributesCache ),
291291 self ::$ invAttributesCache
292292 );
293- if ($ unknownAttributeIds ) {
293+ if ($ unknownAttributeIds || $ this -> _forcedAttributesCodes ) {
294294 $ this ->attachAttributesById ($ attributeSetName , $ attributeIds );
295295 }
296296 }
@@ -317,8 +317,11 @@ protected function _initAttributes()
317317 protected function attachAttributesById ($ attributeSetName , $ attributeIds )
318318 {
319319 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+ ]
322325 ) as $ attribute ) {
323326 $ attributeCode = $ attribute ->getAttributeCode ();
324327 $ attributeId = $ attribute ->getId ();
You can’t perform that action at this time.
0 commit comments