début ajout possibilité de déterminer si le contenu d'une catégorie sera visible ou
non dans la liste des produits/services, ceci afin de pouvoir cacher les sous-produits par exemple.
This commit is contained in:
parent
ed867bdba9
commit
6adcc7a6fe
@ -118,6 +118,13 @@ print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
|
|||||||
$max=15;
|
$max=15;
|
||||||
$sql = "SELECT p.rowid, p.label, p.price, p.ref, p.fk_product_type, p.envente";
|
$sql = "SELECT p.rowid, p.label, p.price, p.ref, p.fk_product_type, p.envente";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."product as p";
|
$sql.= " FROM ".MAIN_DB_PREFIX."product as p";
|
||||||
|
if (!$user->rights->categorie->voir)
|
||||||
|
{
|
||||||
|
$sql .= ", ".MAIN_DB_PREFIX."categorie_product as cp";
|
||||||
|
$sql .= ", ".MAIN_DB_PREFIX."categorie as c";
|
||||||
|
$sql .= " WHERE cp.fk_product = p.rowid";
|
||||||
|
$sql .= " AND cp.fk_categorie = c.rowid AND c.visible = 1";
|
||||||
|
}
|
||||||
$sql.= " ORDER BY p.datec DESC ";
|
$sql.= " ORDER BY p.datec DESC ";
|
||||||
$sql.= $db->plimit($max,0);
|
$sql.= $db->plimit($max,0);
|
||||||
$result = $db->query($sql) ;
|
$result = $db->query($sql) ;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user