diff --git a/htdocs/product/card.php b/htdocs/product/card.php
index 08c391c11c4..c6710c09680 100644
--- a/htdocs/product/card.php
+++ b/htdocs/product/card.php
@@ -979,12 +979,14 @@ else
$doleditor->Create();
print "";
-
- // Categories
- print '
| '.$langs->trans("Categories").' | ';
- $cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, '', 'parent', 64, 0, 1);
- print $form->multiselectarray('categories', $cate_arbo, $arrayselected, '', 0, '', 0, 250);
- print " |
";
+
+ if($conf->categorie->enabled) {
+ // Categories
+ print '| '.$langs->trans("Categories").' | ';
+ $cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, '', 'parent', 64, 0, 1);
+ print $form->multiselectarray('categories', $cate_arbo, $arrayselected, '', 0, '', 0, 250);
+ print " |
";
+ }
// Units
if($conf->global->PRODUCT_USE_UNITS)
@@ -1270,18 +1272,20 @@ else
$doleditor->Create();
print "";
-
- // Categories
- print '| '.$langs->trans("Categories").' | ';
- $cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, '', 'parent', 64, 0, 1);
- $c = new Categorie($db);
- $cats = $c->containing($object->id,Categorie::TYPE_PRODUCT);
- foreach($cats as $cat) {
- $arrayselected[] = $cat->id;
+
+ if($conf->categorie->enabled) {
+ // Categories
+ print ' |
| '.$langs->trans("Categories").' | ';
+ $cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, '', 'parent', 64, 0, 1);
+ $c = new Categorie($db);
+ $cats = $c->containing($object->id,Categorie::TYPE_PRODUCT);
+ foreach($cats as $cat) {
+ $arrayselected[] = $cat->id;
+ }
+ print $form->multiselectarray('categories', $cate_arbo, $arrayselected, '', 0, '', 0, '100%');
+ print " |
";
}
- print $form->multiselectarray('categories', $cate_arbo, $arrayselected, '', 0, '', 0, '100%');
- print "";
-
+
// Units
if($conf->global->PRODUCT_USE_UNITS)
{
@@ -1593,10 +1597,12 @@ else
print ' '."\n";
// Categories
- print '| '.$langs->trans("Categories").' | ';
- print $form->showCategories($object->id,'product',1);
- print " |
";
-
+ if($conf->categorie->enabled) {
+ print '| '.$langs->trans("Categories").' | ';
+ print $form->showCategories($object->id,'product',1);
+ print " |
";
+ }
+
print "\n";
dol_fiche_end();