Magento 1.9.2 Dataflow Export Error – Undefined index: website

Magento Dataflow Error

Magento 1.9.2 Dataflow Export Error – Undefined index: website

Shortly after updating Magento 1.9.1.1 to 1.9.2 I needed to do a Dataflow export of product data. When the ‘Run Profile In Popup’ button was pressed I was almost instantly greeted with an error messages.

Notice: Undefined index: website in /var/www/vhosts/domain.com/htdocs/app/code/core/Mage/Catalog/Model/Convert/Parser/Product.php on line 510

To fix this issue I had to make 3 changes to the Product.php file.

Line 423 change ‘websites’      => ”, to ‘website’      => ”,
Line 436 change $row[‘websites’] = join(‘,’, $websiteCodes); to $row[‘website’] = join(‘,’, $websiteCodes);
Line 438 change $row[‘websites’] = $this->getStore()->getWebsite()->getCode(); to $row[‘website’] = $this->getStore()->getWebsite()->getCode();

Hopefully this little fix should have you back on your way but if you do require magento support then get in touch.

Share this post

Comments (9)

  • Nebojsa Reply

    Tnx mate. This solved problem with me. Although I’ve made local copy of file.

    28th October 2015 at 12:33 am
  • Patrick Cronin Reply

    Thank you!

    29th January 2016 at 6:09 pm
  • chirs Reply

    Thanks for the incite and clear instructions. Do you know if this issue shows up elsewhere in the import & export of Magento 1.9.2 ? I’m creating import files for clients and want to know if this is an issue when they take over to run the import?
    Thanks
    Chris

    19th April 2016 at 3:33 pm
  • chirs Reply

    I think you’re solution should be changed. The correct fix is to change line 510 to:
    ‘websites’ => $row[‘websites’],
    by making your above changes to “website”, the import function no longer ready the exported file correctly. Specifically when re-importing your export file it also looks for websites NOT website.
    I hope this helps.

    19th April 2016 at 9:36 pm
  • michel Reply

    hello,

    I get a error when I have change it :

    Notice: Use of undefined constant ‘website’ – assumed ‘‘website’’ in /data/web/public/app/code/core/Mage/Catalog/Model/Convert/Parser/Product.php on line 438

    20th April 2016 at 9:21 am
  • Bernhard Prange Reply

    Works like a charm! Thanks mate.

    26th August 2016 at 9:30 am
  • Sam Rajs Reply

    Thank you mate. I solved the issue in a single try with the help of you 🙂 Great work..

    29th August 2016 at 12:56 pm
  • Mark Marčec Reply

    You could also use this instead to mess up the core files 🙂

    In index.php
    Mage::setIsDeveloperMode(true); change to #Mage::setIsDeveloperMode(true);
    Mage::setIsDeveloperMode(true); change to #ini_set(‘display_errors’, 1);

    11th October 2016 at 11:56 am
  • Matt Reply

    Thanks!

    1st November 2016 at 3:08 pm

Leave a Reply

Your email address will not be published. Required fields are marked *