Update api_products.class.php
This commit is contained in:
parent
3a50976a4e
commit
40f0bb1b94
@ -188,13 +188,11 @@ class Products extends DolibarrApi
|
||||
$socid = DolibarrApiAccess::$user->socid ? DolibarrApiAccess::$user->socid : '';
|
||||
|
||||
$sql = "SELECT t.rowid, t.ref, t.ref_ext";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."product as t";
|
||||
$sql .= " FROM ".$this->db->prefix()."product as t";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_extrafields AS ef ON ef.fk_object = t.rowid"; // So we will be able to filter on extrafields
|
||||
if ($category > 0) {
|
||||
$sql .= ", ".MAIN_DB_PREFIX."categorie_product as c";
|
||||
}
|
||||
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_extrafields AS ef ON (ef.fk_object = t.rowid)";
|
||||
|
||||
$sql .= ' WHERE t.entity IN ('.getEntity('product').')';
|
||||
|
||||
if ($variant_filter == 1) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user