magento-engcom / import-export-improvements

Open Software License 3.0
31 stars 29 forks source link

magento-engcom/import-export-improvements#88: Set store id on import product category initialization to 0 #112

Closed pogster closed 6 years ago

pogster commented 6 years ago

Description

It seems that the \Magento\Catalog\Model\ResourceModel\Collection\AbstractCollection will always, when there is no store id supplied, set it to the value supplied by $this->_storeManager->getStore()->getId()) (= 1 for example). This will result in store 1 values being used to identify the categories on product import instead of the values from admin scope (store 0).

The core behaviour may be questionable, but we can just set it to 0 in our \Model\Import\Product\CategoryProcessor to avoid this.

Fixed Issues (if relevant)

  1. magento-engcom/import-export-improvements#88

Manual testing scenarios

Reproduction as described in #88 (short version):

Contribution checklist

magento-cicd2 commented 6 years ago

CLA assistant check
All committers have signed the CLA.

pogster commented 6 years ago

Solved the integration test problem by adjusting the test csv used... obviously it was meant to be using storeId 1 value for identification of the category (!?).