From 18a18a6051d9ea0739ff01c6b1ed6d3279ef1229 Mon Sep 17 00:00:00 2001 From: Richard Brown Date: Thu, 16 Apr 2015 21:08:03 +0100 Subject: [PATCH 1/2] Fix Category.php _getProcessedCategoryIds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit $this->newCategory returns an array (‘entity_id’, ‘path’, ‘level’) not just the entity_id --- .../AvS/FastSimpleImport/Model/Import/Entity/Category.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/code/community/AvS/FastSimpleImport/Model/Import/Entity/Category.php b/src/app/code/community/AvS/FastSimpleImport/Model/Import/Entity/Category.php index 205f0b78..8111ff60 100644 --- a/src/app/code/community/AvS/FastSimpleImport/Model/Import/Entity/Category.php +++ b/src/app/code/community/AvS/FastSimpleImport/Model/Import/Entity/Category.php @@ -1147,7 +1147,7 @@ protected function _getProcessedCategoryIds() while ($source->valid()) { $current = $source->current(); if (isset($this->_newCategory[$current[self::COL_ROOT]][$current[self::COL_CATEGORY]])) { - $categoryIds[] = $this->_newCategory[$current[self::COL_ROOT]][$current[self::COL_CATEGORY]]; + $categoryIds[] = $this->_newCategory[$current[self::COL_ROOT]][$current[self::COL_CATEGORY]]['entity_id']; } elseif (isset($this->_categoriesWithRoots[$current[self::COL_ROOT]][$current[self::COL_CATEGORY]])) { $categoryIds[] = $this->_categoriesWithRoots[$current[self::COL_ROOT]][$current[self::COL_CATEGORY]]; } From 1c8d7005e21e236956059d31e8e8a667715019fe Mon Sep 17 00:00:00 2001 From: Richard Brown Date: Fri, 17 Apr 2015 10:39:40 +0100 Subject: [PATCH 2/2] Fix _getProcessedCategoryIds/_categoriesWithRoots $this-> _categoriesWithRoots also returns an array not just the entity_id --- .../AvS/FastSimpleImport/Model/Import/Entity/Category.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/code/community/AvS/FastSimpleImport/Model/Import/Entity/Category.php b/src/app/code/community/AvS/FastSimpleImport/Model/Import/Entity/Category.php index 8111ff60..2f48b88e 100644 --- a/src/app/code/community/AvS/FastSimpleImport/Model/Import/Entity/Category.php +++ b/src/app/code/community/AvS/FastSimpleImport/Model/Import/Entity/Category.php @@ -1149,7 +1149,7 @@ protected function _getProcessedCategoryIds() if (isset($this->_newCategory[$current[self::COL_ROOT]][$current[self::COL_CATEGORY]])) { $categoryIds[] = $this->_newCategory[$current[self::COL_ROOT]][$current[self::COL_CATEGORY]]['entity_id']; } elseif (isset($this->_categoriesWithRoots[$current[self::COL_ROOT]][$current[self::COL_CATEGORY]])) { - $categoryIds[] = $this->_categoriesWithRoots[$current[self::COL_ROOT]][$current[self::COL_CATEGORY]]; + $categoryIds[] = $this->_categoriesWithRoots[$current[self::COL_ROOT]][$current[self::COL_CATEGORY]]['entity_id']; } $source->next();