Changed the way to get the home category (get it from Configuration table now)
This commit is contained in:
1 parent
d59f3383cf
commit
2f6e0e3fae
1 file changed
+2
-4
@@ -962,11 +962,9 @@ class shopimporter extends ImportModule
|
|||||||
WHERE c.`id_category_'.bqSQL($moduleName).'` != 0
|
WHERE c.`id_category_'.bqSQL($moduleName).'` != 0
|
||||||
AND c.`id_parent` != 0');
|
AND c.`id_parent` != 0');
|
||||||
|
|
||||||
// get first PS home category's id
|
// get PS home category
|
||||||
$home_categories = Category::getRootCategories();
|
|
||||||
$home_category_id = $home_categories[0]['id_category'];
|
|
||||||
Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'category c
|
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
|
WHERE c.`id_category_'.bqSQL($moduleName).'` != 0
|
||||||
AND c.`id_parent` = 0');
|
AND c.`id_parent` = 0');
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user