From 8b4bd8e471d3a43dd6eac0db39b5f8968717c7f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Gaillard?= Date: Thu, 14 Mar 2013 15:04:54 +0100 Subject: [PATCH] [-] BO: Fix auto-selection of default category when you have choosen one on the listing --- controllers/admin/AdminProductsController.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/controllers/admin/AdminProductsController.php b/controllers/admin/AdminProductsController.php index 56b43f239..3f754c817 100644 --- a/controllers/admin/AdminProductsController.php +++ b/controllers/admin/AdminProductsController.php @@ -2795,8 +2795,7 @@ class AdminProductsControllerCore extends AdminController $data = $this->createTemplate($this->tpl_form); // Prepare Categories tree for display in Associations tab $root = Category::getRootCategory(); - $default_category = Tools::getValue('id_category', Context::getContext()->shop->id_category); - + $default_category = $this->context->cookie->id_category_products_filter ? $this->context->cookie->id_category_products_filter : Context::getContext()->shop->id_category; if (!$product->id || !$product->isAssociatedToShop()) $selected_cat = Category::getCategoryInformations(Tools::getValue('categoryBox', array($default_category)), $this->default_form_language); else