From a2fbba78237e071ccd477f6bc3bb332f659f8a68 Mon Sep 17 00:00:00 2001 From: vChabot Date: Tue, 15 May 2012 07:51:46 +0000 Subject: [PATCH] [-] BO : BugFix : #PSCFV-2206 : Cannot change active or inactive for a product with multishop git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15295 b9a71923-0436-4b27-9f14-aed3839534dd --- controllers/admin/AdminProductsController.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/controllers/admin/AdminProductsController.php b/controllers/admin/AdminProductsController.php index e1921f543..b890efe5d 100644 --- a/controllers/admin/AdminProductsController.php +++ b/controllers/admin/AdminProductsController.php @@ -271,6 +271,10 @@ class AdminProductsControllerCore extends AdminController $orderWay = 'ASC'; } + $alias = (Shop::getContext() != Shop::CONTEXT_SHOP) ? 'product_shop': 'sa'; + $this->_select .= ', '.$alias.'.`active`'; + if (!Tools::isSubmit('productFilter_active')) + $this->_filter = ''; parent::getList($id_lang, $orderBy, $orderWay, $start, $limit, $this->context->shop->id); /* update product quantity with attributes ...*/ @@ -2550,7 +2554,7 @@ class AdminProductsControllerCore extends AdminController $tab_root = array('id_category' => $root->id, 'name' => $root->name); $helper = new Helper(); - $category_tree = $helper->renderCategoryTree($tab_root, $selected_cat, 'categoryBox', false, true); + $category_tree = $helper->renderCategoryTree($tab_root, $selected_cat, 'categoryBox', false, true, array(), false, true); $data->assign(array('default_category' => $default_category, 'selected_cat_ids' => implode(',', array_keys($selected_cat)), 'selected_cat' => $selected_cat,