Skip to content

Commit

Permalink
Merge pull request #11760 from atm-john/FIX_module_product_disabled
Browse files Browse the repository at this point in the history
FIX: remove disabled product type from product list
  • Loading branch information
eldy committed Aug 27, 2019
2 parents 60b8982 + c2f570a commit 8a4ac2c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions htdocs/core/class/html.form.class.php
Expand Up @@ -1785,6 +1785,15 @@ function select_produits($selected='', $htmlname='productid', $filtertype='', $l

$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='';
Expand Down

0 comments on commit 8a4ac2c

Please sign in to comment.