php - Magento export product gives error: "Fatal error Call to a member function getName() on a non-object" -
i'm try export product magento admin end & getting below error:
call member function getname() on non-object in /home/projectname/public_html/app/code/core/mage/importexport/model/export/entity/product.php on line 171
and gives error in firebug console:
networkerror: 500 internal server error - http://domain.com/index.php/admin/export/getfilter/key/a1f090de71262ab853875ebe91411165/entity/catalog_product?isajax=true
how resolve error?
before try please try re-index data , check again.
the issue $structure[$i] entity_id (category id) passing in function. seems entity_id not valid in catalog_category_entity or category flat tables.
check in database if flat tables fine.
alternative not solution.
open : /home/projectname/public_html/app/code/core/mage/importexport/model/export/entity/product.php find:
$path[] = $collection->getitembyid($structure[$i])->getname();
replace with
$category = mage::getmodel('catalog/category')->load($structure[$i]); $path[] = $category->getname();
note: before posting new question, please search answers (to avoid duplicate questions) check link: same question
Comments
Post a Comment