PEEL Shopping
Open source ecommerce : PEEL Shopping
produits_achetes.php
Go to the documentation of this file.
1 <?php
2 // This file should be in UTF8 without BOM - Accents examples: éèê
3 // +----------------------------------------------------------------------+
4 // | Copyright (c) 2004-2015 Advisto SAS, service PEEL - contact@peel.fr |
5 // +----------------------------------------------------------------------+
6 // | This file is part of PEEL Shopping 8.0.0, which is subject to an |
7 // | opensource GPL license: you are allowed to customize the code |
8 // | for your own needs, but must keep your changes under GPL |
9 // | More information: https://www.peel.fr/lire/licence-gpl-70.html |
10 // +----------------------------------------------------------------------+
11 // | Author: Advisto SAS, RCS 479 205 452, France, https://www.peel.fr/ |
12 // +----------------------------------------------------------------------+
13 // $Id: produits_achetes.php 46935 2015-09-18 08:49:48Z gboussin $
14 define('IN_PEEL_ADMIN', true);
15 include("../configuration.inc.php");
17 necessite_priv("admin_sales,admin_webmastering");
18 
19 
20 $GLOBALS['DOC_TITLE'] = $GLOBALS['STR_ADMIN_PRODUITS_ACHETES_TITLE'];
21 include($GLOBALS['repertoire_modele'] . "/admin_haut.php");
22 
23 if (isset($_GET['id'])) {
25 } else {
27 }
28 
29 include($GLOBALS['repertoire_modele'] . "/admin_bas.php");
30 
41 function affiche_best_sell_products($limit = 500)
42 {
43  include("../lib/class/ProductsBought.php");
44  $tpl = $GLOBALS['tplEngine']->createTemplate('admin_best_sell_products.tpl');
45  $tpl_prods = array();
46  $i = 0;
47  foreach (ProductsBought::find_all() as $produit) {
48  $req = query("SELECT COUNT(*) as nombre
49  FROM peel_pensebete
50  WHERE id_produit='" . intval($produit->produit_id) . "'");
51  $pense_bete_nb = fetch_object($req);
52  if (!isset($pense_bete_nb->nombre)) {
53  $pense_bete_nb->nombre = 0;
54  }
55  $tpl_prods[] = array('tr_rollover' => tr_rollover($i, true),
56  'lien' => $produit->lien,
57  'nombre' => $pense_bete_nb->nombre,
58  'quantite_totale' => $produit->quantite_totale,
59  'prix' => fprix($produit->montant_total, true, $GLOBALS['site_parameters']['code'], false)
60  );
61  $i++;
62  }
63  $tpl->assign('prods', $tpl_prods);
64  $tpl->assign('STR_ADMIN_PRODUITS_ACHETES_MOST_WANTED', $GLOBALS['STR_ADMIN_PRODUITS_ACHETES_MOST_WANTED']);
65  $tpl->assign('STR_PRODUCT', $GLOBALS['STR_PRODUCT']);
66  $tpl->assign('STR_ADMIN_PRODUITS_ACHETES_COUNT_IN_PREFERED', $GLOBALS['STR_ADMIN_PRODUITS_ACHETES_COUNT_IN_PREFERED']);
67  $tpl->assign('STR_QUANTITY', $GLOBALS['STR_QUANTITY']);
68  $tpl->assign('STR_AMOUNT', $GLOBALS['STR_AMOUNT']);
69  echo $tpl->fetch();
70 }
71 
find_all($limit=500)
ProductsBought::find_all()
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
necessite_priv($priv, $demo_allowed=true, $configuration_modification=false)
Cette fonction vérifie si l'utilisateur a les privilèges de $priv.
Definition: fonctions.php:1575
affiche_best_sell_products($limit=500)
FONCTIONS.
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.
Definition: database.php:158
necessite_identification()
Si l'utilisateur n'est pas connecté à un compte, on affiche une page d'identification et arrête le sc...
Definition: fonctions.php:1596
fetch_object($query_result)
fetch_object()
Definition: database.php:302
affiche_liste_clients_par_produit($id, $array_output_mode=false)
affiche_liste_clients_par_produit()
$req
Definition: ipn.php:30
fprix($price, $display_currency=false, $currency_code_or_default=null, $convertion_needed_into_currency=true, $currency_rate=null, $display_iso_currency_code=false, $format=true, $force_format_separator=null, $add_rdfa_properties=false, $round_even_if_no_format=false)
fprix formatte le prix donné en le convertissant si nécessaire au préalable et en ajoutant éventuelle...
Definition: fonctions.php:242
$GLOBALS['DOC_TITLE']

This documentation for Open ecommerce PEEL Shopping and PEEL.fr has been generated by Doxygen on Thu Oct 15 2015 14:29:24 - Peel ecommerce is a product of Agence web Advisto SAS. All rights reserved.