When we import the following CSV file using the standard Magento import method (not Dataflow Profiles), the inventory quantity (qty) field is unexpectedly being updated to a value of 4 for the SKU's listed below:


I have tested this repeatedly and it continues to update the qty field in addition to the fields above. As I understand it, only the fields in the CSV should be updated.

Does anyone know why this is happening or indeed how to prevent it from happening?

We are running Magento CE

  • Cannot reproduce that. Can you tell us more about that "dropship_cost" attribute (it's not a default value)? Does this happen with other attributes too, and does it happen if you don't include any attribute besides dropship_cost? Feb 14, 2015 at 19:45
  • We were able to reproduce this with all attributes in Magento CE and have now identified the bug which I will post as an answer to this question.
    – Chris
    Feb 16, 2015 at 11:15
  • @Marius How is this off-topic? We hired a Magento developer to fix this and he found a bug in the core coding for as described in my answer. This behaviour can be reproduced on any installation.
    – Chris
    Feb 18, 2015 at 11:38

1 Answer 1


We checked the Magento core coding thoroughly and found a bug in the following file which handles the import routine:


On line 1609 the array is not properly instantiated and therefore repeated loops over that array are not going to overwrite the existing data (hence the spurious import data).

The solution is to add the following line to the file above at line 1609:

$row = array(); // <--- this is the fix
$row['product_id'] = $this->_newSku[$rowData[self::COL_SKU]]['entity_id'];
$row['stock_id'] = 1;

Note: this problem only occurs in Magento CE, we have confirmed it is not present in Magento CE 1.9+,


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.