Update html.form.class.php

This commit is contained in:
Laurent Destailleur 2018-12-14 10:01:12 +01:00 committed by GitHub
parent 5c9d5bb6ad
commit e1baf3ab2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2017,12 +2017,15 @@ class Form
$sql = "SELECT ";
$sql.= $selectFields . $selectFieldsGrouped;
//Product category
$sql.= ", (SELECT ".MAIN_DB_PREFIX."categorie_product.fk_categorie
FROM ".MAIN_DB_PREFIX."categorie_product
WHERE ".MAIN_DB_PREFIX."categorie_product.fk_product=p.rowid
LIMIT 1
if (! empty($conf->global->PRODUCT_SORT_BY_CATEGORY))
{
//Product category
$sql.= ", (SELECT ".MAIN_DB_PREFIX."categorie_product.fk_categorie
FROM ".MAIN_DB_PREFIX."categorie_product
WHERE ".MAIN_DB_PREFIX."categorie_product.fk_product=p.rowid
LIMIT 1
) AS categorie_product_id ";
}
//Price by customer
if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES) && !empty($socid))