// 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:
vChabot
2012-03-15 14:35:07 +00:00
parent 2566075869
commit 9b907fbd31
+7 -4
View File
@@ -908,12 +908,15 @@ class AdminImportControllerCore extends AdminController
// Associate category to shop
if (Shop::isFeatureActive() && $info['shop'])
{
if (!is_numeric($info['shop']))
$info['id_shop'] = Shop::getIdByName($info['shop']);
$info['shop'] = explode(',', $info['shop']);
foreach ($info['shop'] as $shop)
if (!is_numeric($shop))
$category->addShop(Shop::getIdByName($shop));
else
$category->addShop($shop);
}
else
$info['shop'] = Configuration::get('PS_SHOP_DEFAULT');
$category->addShop($info['shop']);
$category->addShop(Configuration::get('PS_SHOP_DEFAULT'));
}
}