From c2f570ae604d486971a8f4317323c4bf04039709 Mon Sep 17 00:00:00 2001 From: John Botella Date: Tue, 27 Aug 2019 11:54:20 +0200 Subject: [PATCH] FIX: remove disabled product type from product list --- htdocs/core/class/html.form.class.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 8f0af0a5004..ac92e93751c 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -1785,6 +1785,15 @@ class Form $price_level = (! empty($price_level) ? $price_level : 0); + if(strval($filtertype) === '' && (!empty($conf->product->enabled) || !empty($conf->service->enabled))){ + if(!empty($conf->product->enabled) && empty($conf->service->enabled)){ + $filtertype = '0'; + } + elseif(empty($conf->product->enabled) && !empty($conf->service->enabled)){ + $filtertype = '1'; + } + } + if (! empty($conf->use_javascript_ajax) && ! empty($conf->global->PRODUIT_USE_SEARCH_TO_SELECT)) { $placeholder='';