// multishop category import improved
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14200 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
1 parent
2566075869
commit
9b907fbd31
1 file changed
+7
-4
@@ -908,12 +908,15 @@ class AdminImportControllerCore extends AdminController
|
|||||||
// Associate category to shop
|
// Associate category to shop
|
||||||
if (Shop::isFeatureActive() && $info['shop'])
|
if (Shop::isFeatureActive() && $info['shop'])
|
||||||
{
|
{
|
||||||
if (!is_numeric($info['shop']))
|
$info['shop'] = explode(',', $info['shop']);
|
||||||
$info['id_shop'] = Shop::getIdByName($info['shop']);
|
foreach ($info['shop'] as $shop)
|
||||||
|
if (!is_numeric($shop))
|
||||||
|
$category->addShop(Shop::getIdByName($shop));
|
||||||
|
else
|
||||||
|
$category->addShop($shop);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
$info['shop'] = Configuration::get('PS_SHOP_DEFAULT');
|
$category->addShop(Configuration::get('PS_SHOP_DEFAULT'));
|
||||||
$category->addShop($info['shop']);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user