// multishop category import improved

This commit is contained in:
vChabot
2012-03-15 14:35:07 +00:00
parent 33a30b6dc3
commit 2832cb4177
+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'));
}
}