// BO : product form improved (categories association)

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14777 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
vChabot
2012-04-19 16:18:58 +00:00
parent 8bb5cd701f
commit e8dfa8311d
5 changed files with 24 additions and 18 deletions
+4 -2
View File
@@ -513,11 +513,13 @@ class AdminShopControllerCore extends AdminController
return $object;
}
public function initCategoriesAssociation($id_root = 1)
public function initCategoriesAssociation($id_root = null)
{
if (is_null($id_root))
$id_root = Configuration::get('PS_ROOT_CATEGORY');
$id_shop = (int)Tools::getValue('id_shop');
$shop = new Shop($id_shop);
$selected_cat = Shop::getCategories($id_shop);
$selected_cat = Shop::getCategories();
if (empty($selected_cat))
{
// get first category root and preselect all these children