diff --git a/htdocs/product/admin/product.php b/htdocs/product/admin/product.php index 464ab169456..279265b8e96 100644 --- a/htdocs/product/admin/product.php +++ b/htdocs/product/admin/product.php @@ -147,9 +147,6 @@ if ($action == 'other') $value = GETPOST('activate_useProdFournDesc', 'alpha'); $res = dolibarr_set_const($db, "PRODUIT_FOURN_TEXTS", $value, 'chaine', 0, '', $conf->entity); - //$value = GETPOST('activate_globalSearchOnExtrafield', 'alpha'); - //$res = dolibarr_set_const($db, "PRODUIT_GLOBAL_SEARCH_ON_EXTRAFIELD", $value,'chaine',0,'',$conf->entity); - if ($value) { $sql_test = "SELECT count(desc_fourn) as cpt FROM ".MAIN_DB_PREFIX."product_fournisseur_price WHERE 1"; $resql = $db->query($sql_test); @@ -679,12 +676,6 @@ if (! empty($conf->fournisseur->enabled)) print ''; } -/*print ''; -print ''.$langs->trans("GlobalSearchOnExtrafield").''; -print ''; -print $form->selectyesno("activate_globalSearchOnExtrafield", (! empty($conf->global->PRODUIT_GLOBAL_SEARCH_ON_EXTRAFIELD)?$conf->global->PRODUIT_GLOBAL_SEARCH_ON_EXTRAFIELD:0), 1); -print ''; -print '';*/ if (! empty($conf->global->PRODUCT_CANVAS_ABILITY)) { diff --git a/htdocs/product/list.php b/htdocs/product/list.php index a3dac45dcab..460e9d5ee45 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -136,10 +136,6 @@ $fieldstosearchall = array( 'p.label'=>"ProductLabel", 'p.description'=>"Description", "p.note"=>"Note", - "p.note_public"=>"NotePublic", - "p.url"=>"PublicUrl", - "p.accountancy_code_sell"=>"AccountancyCodeSell", - "p.accountancy_code_buy"=>"AccountancyCodeBuy", ); // multilang @@ -153,23 +149,8 @@ if (! empty($conf->barcode->enabled)) { $fieldstosearchall['p.barcode']='Gencod'; $fieldstosearchall['pfp.barcode']='GencodBuyPrice'; } - -//global search on extrafields -if(!empty($conf->global->PRODUIT_GLOBAL_SEARCH_ON_EXTRAFIELD) && !empty($extralabels)) { - foreach($extralabels as $codeExtra => $labelExtra) { - $TExtraTypeNotHandled=array( - 'boolean', - 'select', - 'sellist', - 'radio', - 'checkbox', - 'chkbxlst', - 'link', - 'separate', - ); - if(!in_array($extrafields->attribute_type[$codeExtra], $TExtraTypeNotHandled)) $fieldstosearchall['ef.' . $codeExtra] = $labelExtra; - } -} +// Personalized search criterias. Example: $conf->global->PRODUCT_QUICKSEARCH_ON_FIELDS = 'p.ref=ProductRef;p.label=ProductLabel' +if (! empty($conf->global->PRODUCT_QUICKSEARCH_ON_FIELDS)) $fieldstosearchall=dolExplodeIntoArray($conf->global->PRODUCT_QUICKSEARCH_ON_FIELDS); if (empty($conf->global->PRODUIT_MULTIPRICES)) {