Skip to content

Commit

Permalink
fix category import when flat catalog is enabled
Browse files Browse the repository at this point in the history
We should always grab the actual entity table instead of using
getEntityTable on the resource, because that doesn't exist for
flat resource.

Closes #26
  • Loading branch information
danslo committed Feb 11, 2015
1 parent 09990f9 commit fc3bb23
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions code/Model/Import/Entity/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,7 @@ public function __construct()
->_initCategories()
->_initAttributes();

/* @var $categoryResource Mage_Catalog_Model_Resource_Category */
$categoryResource = Mage::getModel('catalog/category')->getResource();
$this->_entityTable = $categoryResource->getEntityTable();
$this->_entityTable = Mage::getSingleton('core/resource')->getTableName('catalog/category');
$this->_dataSourceModel = Danslo_ApiImport_Model_Import::getDataSourceModel();
}

Expand Down

0 comments on commit fc3bb23

Please sign in to comment.