2

There is a known issue affecting both the Magento Community and Enterprise Edition export system.

The issue is with the core Import/Export functionality found in System > Import/Export > Export menu item in the Magento backend.

If you have configurable products that are configurable by only 1 attribute, you won't experience difficulities. However, if you have a configurable product with multiple configurable attributes (i.e. a T-Shirt configurable by both size and color) then you will notice that your export file only contains data about one configurable attribute. This data can be found in the _super_attribute_code and _super_attribute_option columns. As in the case of my T-Shirt example, these columns would only contain data about the size attribute options, and nothing about color.

To fix this issue we must override one of Magento's core class files, at least until they come out with a newer patched version. We never touch core Magento files, so what we are going to do is replicate this file in the local code pool and make our changes there. From your root Magento install directory, copy the file

app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable.php

to

app/code/local/Mage/Catalog/Model/Resource/Product/Type/Configurable.php

Now, open up the Configurable.php file you just copied to the local code pool and navigate to line 223. This line should read

$attributesOptionsData[$superAttribute->getAttributeId()] = $this->_getReadAdapter()->fetchAssoc($select);

You need to change this line to read

$attributesOptionsData[$superAttribute->getAttributeId()] = $this->_getReadAdapter()->fetchAll($select);

Now, clear your cache and try the export again. You should see all your configurable attribute data in the file now. And now, my T-Shirts have both the size and color attribute associations in the export file. Once Magento fixes this issue in a later release, just remember to delete your local copy of Configurable.php.

Refer Source: http://razoyo.com/main/?q=blog/magento-17-configurable-product-export-fix

3
  • Is there supposed to be a question in here somewhere?
    – jesseconnr
    Feb 17, 2014 at 15:09
  • Add your question as comment or answer
    – Helphin
    Feb 18, 2014 at 5:05
  • Having same issue in magento 2. Any idea for magento 2.1.2 please
    – Jarnail S
    Dec 19, 2016 at 12:32

0