From 2f6e0e3faefa75a56aae3564d0160eb86dbbaad1 Mon Sep 17 00:00:00 2001 From: sjousse Date: Thu, 5 Sep 2013 10:14:31 +0200 Subject: [PATCH] Changed the way to get the home category (get it from Configuration table now) --- modules/shopimporter/shopimporter.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/shopimporter/shopimporter.php b/modules/shopimporter/shopimporter.php index ac969543a..7b6a7cd02 100644 --- a/modules/shopimporter/shopimporter.php +++ b/modules/shopimporter/shopimporter.php @@ -962,11 +962,9 @@ class shopimporter extends ImportModule WHERE c.`id_category_'.bqSQL($moduleName).'` != 0 AND c.`id_parent` != 0'); - // get first PS home category's id - $home_categories = Category::getRootCategories(); - $home_category_id = $home_categories[0]['id_category']; + // get PS home category Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'category c - SET c.id_parent = '.$home_category_id.' + SET c.id_parent = '.Configuration::get('PS_HOME_CATEGORY').' WHERE c.`id_category_'.bqSQL($moduleName).'` != 0 AND c.`id_parent` = 0');