14 if (!defined(
'IN_PEEL')) {
30 if (
vb(
$GLOBALS[
'site_parameters'][
'act_on_top']) ==
'1') {
31 $requete =
"SELECT p.*, SUM(pca.quantite) AS quantite, c.nom_" .
$_SESSION[
'session_langue'] .
" AS categorie
32 FROM peel_commandes_articles pca
33 INNER JOIN peel_commandes pc ON pca.commande_id = pc.id AND " .
get_filter_site_cond(
'commandes',
'pc') .
"
34 INNER JOIN peel_statut_paiement sp ON sp.id=pc.id_statut_paiement AND " .
get_filter_site_cond(
'statut_paiement',
'sp') .
"
35 INNER JOIN peel_produits p ON pca.produit_id = p.id AND " .
get_filter_site_cond(
'produits',
'p') .
"
36 INNER JOIN peel_categories c ON pca.categorie_id = c.id AND " .
get_filter_site_cond(
'categories',
'c') .
"
37 WHERE " .
get_filter_site_cond(
'commandes_articles',
'pca',
true) .
" AND p.nom_".(!empty(
$GLOBALS[
'site_parameters'][
'product_name_forced_lang'])?
$GLOBALS[
'site_parameters'][
'product_name_forced_lang']:
$_SESSION[
'session_langue']).
" != '' AND p.etat='1' AND sp.technical_code IN ('being_checked','completed')
38 GROUP BY pca.produit_id
39 ORDER BY quantite DESC
40 LIMIT 0, " . intval(
vn(
$GLOBALS[
'site_parameters'][
'nb_on_top']));
42 $requete =
"SELECT p.*, c.id AS categorie_id, c.nom_" .
$_SESSION[
'session_langue'] .
" AS categorie
44 INNER JOIN peel_produits_categories pc ON pc.produit_id=p.id
45 INNER JOIN peel_categories c ON c.id=pc.categorie_id AND " .
get_filter_site_cond(
'categories',
'c') .
"
46 WHERE p.nom_".(!empty(
$GLOBALS[
'site_parameters'][
'product_name_forced_lang'])?
$GLOBALS[
'site_parameters'][
'product_name_forced_lang']:
$_SESSION[
'session_langue']).
" != '' AND p.etat='1' AND p.on_top='1' AND " .
get_filter_site_cond(
'produits',
'p') .
"
49 LIMIT 0, " . intval(
vn(
$GLOBALS[
'site_parameters'][
'nb_on_top']));
51 $qid =
query($requete);
54 $tpl =
$GLOBALS[
'tplEngine']->createTemplate(
'modules/best_seller_produit_colonne.tpl');
55 $tpl_products = array();
58 if ((!
a_priv(
"admin_product") && !
a_priv(
"reve")) && $prod[
'on_reseller'] == 1) {
63 if (empty(
$GLOBALS[
'site_parameters'][
'module_best_sellers_return_result_as_link'])) {
64 $this_product_in_container_html = get_product_in_container_html(
$product_object,
$GLOBALS[
'site_parameters'][
'only_show_products_with_picture_in_containers']);
68 if (!empty($this_product_in_container_html)) {
69 $tpl_products[] = array(
'html' => $this_product_in_container_html,
75 $tpl->assign(
'module_best_sellers_return_result_as_link', !empty(
$GLOBALS[
'site_parameters'][
'module_best_sellers_return_result_as_link']));
76 $tpl->assign(
'nb_col_sm', $nb_col_sm);
77 $tpl->assign(
'nb_col_xs', 1);
78 $tpl->assign(
'nb_col_md', $nb_col_md);
79 $tpl->assign(
'products', $tpl_products);
is_user_tva_intracom_for_no_vat($user_id=null)
is_user_tva_intracom_for_no_vat()
if(!empty($_GET['id'])) if(isset($_POST['form_name'], $_POST['form_subject'], $_POST['form_text'], $_POST['form_lang'])&&empty($_GET['id'])) if(empty($_GET['id'])) $tpl
if(!defined('IN_PEEL')) $GLOBALS['page_types_array']
if(empty($_GET['id'])) if(!empty($GLOBALS['site_parameters']['allow_multiple_product_url_with_category'])) $product_object
if(!defined('IN_PEEL')) affiche_best_seller_produit_colonne($return_mode=false, $location=null, $nb_col_sm=3, $nb_col_md=4)
Affiche la liste des catégories qui sont spéciales.
get_filter_site_cond($table_technical_code, $table_alias=null, $use_strict_rights_if_in_admin=false, $specific_site_id=null, $exclude_public_items=false, $admin_force_multisite_if_allowed=false)
Retourne la condition SQL permettant de filtrer les données pour une table.
query($query, $die_if_error=false, $database_object=null, $silent_if_error=false, $security_sql_filter=true)
The query() function is meant to be called anywhere you want to make a query.
num_rows($query_result)
num_rows()
fetch_assoc($query_result)
fetch_assoc()
a_priv($requested_priv, $demo_allowed=false, $site_configuration_modification=false, $user_id=null)
Renvoie true si l'utilisateur de la session a le privilège $requested_priv ou un droit supérieur Des ...
check_if_module_active($module_name, $specific_file_name=null)
Renvoie si un module est présent et activé ou non - Peut être appelé avant ou après le chargement d'u...
if(defined('IN_PEEL_ADMIN')||IN_INSTALLATION) $_SESSION['session_langue']