diff --git a/classes/Product.php b/classes/Product.php index 8af855564..480757db4 100644 --- a/classes/Product.php +++ b/classes/Product.php @@ -798,7 +798,7 @@ class ProductCore extends ObjectModel SELECT c.`id_category` FROM `'._DB_PREFIX_.'category_product` cp LEFT JOIN `'._DB_PREFIX_.'category` c ON (c.`id_category` = cp.`id_category`) - '.Shop::addSqlAssociation('category', 'c', true).' + '.Shop::addSqlAssociation('category', 'c', true, null, true).' WHERE cp.`id_category` NOT IN ('.implode(',', array_map('intval', $categories)).') AND cp.id_product = '.$this->id ); diff --git a/controllers/admin/AdminProductsController.php b/controllers/admin/AdminProductsController.php index ae2b93f8d..13cd6a4db 100644 --- a/controllers/admin/AdminProductsController.php +++ b/controllers/admin/AdminProductsController.php @@ -1704,7 +1704,7 @@ class AdminProductsControllerCore extends AdminController $this->updateDownloadProduct($object, 1); $this->updateTags(Language::getLanguages(false), $object); - if ($this->isProductFieldUpdated('category_box') && !$object->updateCategories(Tools::getValue('categoryBox'), true)) + if ($this->isProductFieldUpdated('category_box') && !$object->updateCategories(Tools::getValue('categoryBox'))) $this->errors[] = Tools::displayError('An error occurred while linking object.').' '.$this->table.' '.Tools::displayError('To categories'); }