PEEL Shopping
Open source ecommerce : PEEL Shopping
fonctions.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: fonctions.php 46935 2015-09-18 08:49:48Z gboussin $
14 /* Fonctions de nom_attributs.php */
15 
16 if (!defined('IN_PEEL')) {
17  die();
18 }
19 
27  $result['menu_items']['products_attributes'][$GLOBALS['wwwroot_in_admin'] . '/modules/attributs/administrer/nom_attributs.php'] = $GLOBALS["STR_ADMIN_MENU_PRODUCTS_ATTRIBUTES"];
28  $result['menu_items']['products_attributes'][$GLOBALS['wwwroot_in_admin'] . '/modules/attributs/administrer/attributs.php'] = $GLOBALS["STR_ADMIN_MENU_PRODUCTS_OPTIONS"];
29  return $result;
30 }
31 
39  $result = array();
40  $sql_n = "SELECT *
41  FROM peel_nom_attributs
42  WHERE " . get_filter_site_cond('nom_attributs') . "
43  ORDER BY id";
44  $nom_attrib = query($sql_n);
45  while ($this_attribut = fetch_assoc($nom_attrib)) {
46  // On prépare des informations qui seront utilisées pour chaque ligne par la suite
47  $GLOBALS['attribut_infos_array'][$this_attribut['id']] = $this_attribut;
48  $result['product_field_names'][] = $this_attribut['nom_' . $_SESSION['session_langue']] . '#' . $this_attribut['id'];
49  }
50  return $result;
51 }
52 
60  $result = array();
61  // Récupération des valeurs pour les attributs
62  $query_produits_attributs = query("SELECT ppa.nom_attribut_id, pa.id, pa.descriptif_" . $_SESSION['session_langue'] . " AS descriptif
63  FROM peel_produits_attributs ppa
64  LEFT JOIN peel_attributs pa ON pa.id=ppa.attribut_id AND pa.id_nom_attribut=ppa.nom_attribut_id AND " . get_filter_site_cond('attributs', 'pa')."
65  WHERE produit_id='" . intval($params['id']) . "'");
66  while ($this_attribut = fetch_assoc($query_produits_attributs)) {
67  if (!empty($attribut_infos_array[$this_attribut['nom_attribut_id']])) {
68  if ($attribut_infos_array[$this_attribut['nom_attribut_id']]['upload'] == 1) {
69  // L'attribut concerné est un champ d'upload => on exporte cette info, sans notion d'id d'attribut car il n'y en a pas
70  $this_value = '0#__upload';
71  } elseif ($attribut_infos_array[$this_attribut['nom_attribut_id']]['texte_libre'] == 1) {
72  // L'attribut concerné est un champ de texte libre => on exporte cette info, sans notion d'id d'attribut car il n'y en a pas
73  $this_value = '0#__texte_libre';
74  } else {
75  $this_value = $this_attribut['id'] . '#' . $this_attribut['descriptif'];
76  }
77  $result[$GLOBALS['attribut_infos_array'][$this_attribut['nom_attribut_id']]['nom_' . $_SESSION['session_langue']] . '#' . $this_attribut['nom_attribut_id']][] = $this_value;
78  }
79  }
80  return $result;
81 }
82 
90 {
91  /* Valeurs par défaut */
92  if(empty($frm)) {
93  $frm = array();
94  $frm['texte_libre'] = 0;
95  $frm['upload'] = 0;
96  $frm['mandatory'] = 0;
97  $frm['technical_code'] = "";
98  $frm['show_description'] = 1;
99  if (empty($frm['type_affichage_attribut'])) {
100  // On préremplit par une référence à la configuration générale du site
101  // NB : On ne préremplit pas par la valeur par défaut utilisée sur le site pour permettre changement général plus facile si on n'a pas de spécificité par produit
102  $frm['type_affichage_attribut'] = 3;
103  }
104  foreach ($GLOBALS['admin_lang_codes'] as $lng) {
105  $frm['nom_' . $lng] = "";
106  }
107  }
108  $frm['nouveau_mode'] = "insere";
109  $frm['id'] = "";
110  $frm['titre_bouton'] = $GLOBALS["STR_SUBMIT"];
112 }
113 
122 {
123  if(empty($frm)){
124  // Pas de données venant de validation de formulaire, donc on charge le contenu de la base de données
125  /* Charge les informations du produit */
126  $qid = query("SELECT *
127  FROM peel_nom_attributs
128  WHERE id = " . intval($id) . " AND " . get_filter_site_cond('nom_attributs', null, true) . "");
129  $frm = fetch_assoc($qid);
130  }
131  $frm['id'] = $id;
132  $frm["nouveau_mode"] = "maj";
133  $frm["titre_bouton"] = $GLOBALS['STR_ADMIN_FORM_SAVE_CHANGES'];
134 
136 }
137 
145 {
146  $tpl = $GLOBALS['tplEngine']->createTemplate('modules/attributsAdmin_formulaire_nom.tpl');
147  $tpl->assign('action', get_current_url(false) . '?start=0');
148  $tpl->assign('mode', $frm["nouveau_mode"]);
149  $tpl->assign('id', intval($frm['id']));
150  $tpl->assign('etat', vb($frm['etat']));
151  $tpl->assign('texte_libre', vb($frm['texte_libre']));
152  $tpl->assign('upload', vb($frm['upload']));
153  $tpl->assign('titre_bouton', vb($frm["titre_bouton"]));
154  $tpl->assign('type_affichage_attribut', vn($frm["type_affichage_attribut"]));
155  $tpl->assign('technical_code', vb($frm["technical_code"]));
156  $tpl->assign('show_description', vb($frm["show_description"]));
157  $tpl->assign('mandatory', vn($frm["mandatory"]));
158  $tpl_langs = array();
159  foreach ($GLOBALS['admin_lang_codes'] as $lng) {
160  $tpl_langs[] = array('code' => $lng,
161  'value' => $frm['nom_' . $lng]
162  );
163  }
164  $tpl->assign('langs', $tpl_langs);
165  $tpl->assign('site_id_select_options', get_site_id_select_options(vb($frm['site_id'])));
166  $tpl->assign('STR_ADMIN_WEBSITE', $GLOBALS['STR_ADMIN_WEBSITE']);
167  $tpl->assign('STR_ADMIN_ACTIVATED', $GLOBALS['STR_ADMIN_ACTIVATED']);
168  $tpl->assign('STR_ADMIN_DEACTIVATED', $GLOBALS['STR_ADMIN_DEACTIVATED']);
169  $tpl->assign('STR_BEFORE_TWO_POINTS', $GLOBALS['STR_BEFORE_TWO_POINTS']);
170  $tpl->assign('STR_MODULE_ATTRIBUTS_ADMIN_UPDATE_TITLE', $GLOBALS['STR_MODULE_ATTRIBUTS_ADMIN_UPDATE_TITLE']);
171  $tpl->assign('STR_STATUS', $GLOBALS['STR_STATUS']);
172  $tpl->assign('STR_YES', $GLOBALS['STR_YES']);
173  $tpl->assign('STR_NO', $GLOBALS['STR_NO']);
174  $tpl->assign('STR_ADMIN_MANDATORY', $GLOBALS['STR_ADMIN_MANDATORY']);
175  $tpl->assign('STR_ADMIN_LANGUAGES_SECTION_HEADER', $GLOBALS['STR_ADMIN_LANGUAGES_SECTION_HEADER']);
176  $tpl->assign('STR_ADMIN_NAME', $GLOBALS['STR_ADMIN_NAME']);
177  $tpl->assign('STR_MODULE_ATTRIBUTS_ADMIN_PARAMETERS', $GLOBALS['STR_MODULE_ATTRIBUTS_ADMIN_PARAMETERS']);
178  $tpl->assign('STR_ADMIN_TECHNICAL_CODE', $GLOBALS['STR_ADMIN_TECHNICAL_CODE']);
179  $tpl->assign('STR_MODULE_ATTRIBUTS_ADMIN_OPTIONS_LIST_ATTRIBUTE', $GLOBALS['STR_MODULE_ATTRIBUTS_ADMIN_OPTIONS_LIST_ATTRIBUTE']);
180  $tpl->assign('STR_MODULE_ATTRIBUTS_ADMIN_FREE_TEXT_ATTRIBUTE', $GLOBALS['STR_MODULE_ATTRIBUTS_ADMIN_FREE_TEXT_ATTRIBUTE']);
181  $tpl->assign('STR_MODULE_ATTRIBUTS_ADMIN_UPLOAD_ATTRIBUTE', $GLOBALS['STR_MODULE_ATTRIBUTS_ADMIN_UPLOAD_ATTRIBUTE']);
182  $tpl->assign('STR_ADMIN_ATTRIBUT_STYLE_LINK', $GLOBALS['STR_ADMIN_ATTRIBUT_STYLE_LINK']);
183  $tpl->assign('STR_ADMIN_LANGUAGES_SECTION_HEADER', $GLOBALS['STR_ADMIN_LANGUAGES_SECTION_HEADER']);
184  $tpl->assign('STR_MODULE_ATTRIBUTS_ADMIN_DISPLAY_MODE', $GLOBALS['STR_MODULE_ATTRIBUTS_ADMIN_DISPLAY_MODE']);
185  $tpl->assign('STR_MODULE_ATTRIBUTS_ADMIN_SELECT_MENU', $GLOBALS['STR_MODULE_ATTRIBUTS_ADMIN_SELECT_MENU']);
186  $tpl->assign('STR_MODULE_ATTRIBUTS_ADMIN_RADIO_BUTTONS', $GLOBALS['STR_MODULE_ATTRIBUTS_ADMIN_RADIO_BUTTONS']);
187  $tpl->assign('STR_MODULE_ATTRIBUTS_ADMIN_CHECKBOX', $GLOBALS['STR_MODULE_ATTRIBUTS_ADMIN_CHECKBOX']);
188  $tpl->assign('STR_MODULE_ATTRIBUTS_ADMIN_DEFAULT_DISPLAY_MODE', $GLOBALS['STR_MODULE_ATTRIBUTS_ADMIN_DEFAULT_DISPLAY_MODE']);
189  echo $tpl->fetch();
190 }
191 
199 {
200  $qid = query("SELECT nom_" . $_SESSION['session_langue'] . "
201  FROM peel_nom_attributs
202  WHERE id = " . intval($id) . " AND " . get_filter_site_cond('nom_attributs', null, true));
203  $col = fetch_assoc($qid);
204  query("DELETE FROM peel_produits_attributs WHERE nom_attribut_id = '" . intval($id) . "'");
205  query("DELETE FROM peel_nom_attributs WHERE id='" . intval($id) . "' AND " . get_filter_site_cond('nom_attributs', null, true));
206  echo $GLOBALS['tplEngine']->createTemplate('global_success.tpl', array('message' => sprintf($GLOBALS['STR_MODULE_ATTRIBUTS_ADMIN_MSG_DELETED_OK'], String::html_entity_decode_if_needed($col['nom_' . $_SESSION['session_langue']]))))->fetch();
207 }
208 
216 {
217  $frm['texte_libre'] = 0;
218  $frm['upload'] = 0;
219 
220  if (vn($frm['attribut_type']) == 1) {
221  $frm['texte_libre'] = 1;
222  } elseif (vn($frm['attribut_type']) == 2) {
223  $frm['upload'] = 1;
224  }
225  $sql = "INSERT INTO peel_nom_attributs (
226  etat
227  , site_id
228  , mandatory
229  ";
230  foreach ($GLOBALS['admin_lang_codes'] as $lng) {
231  $sql .= ", nom_" . $lng;
232  }
233  $sql .= ", texte_libre, upload, technical_code, type_affichage_attribut, show_description
234  ) VALUES ('" . intval($frm['etat']) . "'
236  , '" . intval($frm['mandatory']) . "'";
237  foreach ($GLOBALS['admin_lang_codes'] as $lng) {
238  $sql .= ", '" . nohtml_real_escape_string($frm['nom_' . $lng]) . "'";
239  }
240  $sql .= ", '" . intval($frm['texte_libre']) . "', '" . intval($frm['upload']) . "', '" . nohtml_real_escape_string($frm['technical_code']) . "', '" . nohtml_real_escape_string($frm['type_affichage_attribut']) . "', '" . nohtml_real_escape_string($frm['show_description']) . "')";
241 
242  query($sql);
243 }
244 
253 {
254  $frm['texte_libre'] = 0;
255  $frm['upload'] = 0;
256 
257  if (vn($frm['attribut_type']) == 1) {
258  $frm['texte_libre'] = 1;
259  } elseif (vn($frm['attribut_type']) == 2) {
260  $frm['upload'] = 1;
261  }
262  $sql = "UPDATE peel_nom_attributs
263  SET etat='" . intval($frm['etat']) . "'";
264  foreach ($GLOBALS['admin_lang_codes'] as $lng) {
265  $sql .= ", nom_" . nohtml_real_escape_string($lng) . "='" . nohtml_real_escape_string($frm['nom_' . $lng]) . "'";
266  }
267  $sql .= ", site_id = '" . nohtml_real_escape_string(get_site_id_sql_set_value($frm['site_id'])) . "'
268  , mandatory = '" . intval($frm['mandatory']) . "'
269  , texte_libre ='" . intval($frm['texte_libre']) . "'
270  , upload ='" . intval(vn($frm['upload'])) . "'
271  , technical_code ='" . nohtml_real_escape_string($frm['technical_code']) . "'
272  , type_affichage_attribut ='" . nohtml_real_escape_string($frm['type_affichage_attribut']) . "'
273  , show_description ='" . nohtml_real_escape_string($frm['show_description']) . "'
274  WHERE id='" . intval($id) . "' AND " . get_filter_site_cond('nom_attributs', null, true);
275  query($sql);
276  // Si le nom de l'attribut est un texte libre alors on retire toutes ces options :
277  if (!empty($frm['texte_libre'])) {
278  $sql = "SELECT DISTINCT produit_id
279  FROM peel_produits_attributs
280  WHERE nom_attribut_id = '" . intval($id) . "'";
281  $resultat = query($sql);
282  $sql = "DELETE FROM peel_attributs WHERE id_nom_attribut = '" . intval($id) . "'";
283  query($sql);
284  $sql = "DELETE FROM peel_produits_attributs WHERE nom_attribut_id = '" . intval($id) . "'";
285  query($sql);
286  while ($produit = fetch_assoc($resultat)) {
287  $sql = query("INSERT INTO peel_produits_attributs (`produit_id`,`nom_attribut_id`,`attribut_id`) VALUES ('" . intval($produit['produit_id']) . "','" . intval($id) . "','0');");
288  }
289  }
290 }
291 
299 {
300  $tpl = $GLOBALS['tplEngine']->createTemplate('modules/attributsAdmin_liste_nom.tpl');
301  $tpl->assign('add_src', $GLOBALS['administrer_url'] . '/images/add.png');
302  $tpl->assign('add_href', get_current_url(false) . '?mode=ajout');
303  $tpl->assign('drop_src', $GLOBALS['administrer_url'] . '/images/b_drop.png');
304  $tpl->assign('edit_src', $GLOBALS['administrer_url'] . '/images/b_edit.png');
305  $result = query("SELECT id, nom_" . $_SESSION['session_langue'] . ", etat, texte_libre, upload, show_description, site_id
306  FROM peel_nom_attributs
307  WHERE " . get_filter_site_cond('nom_attributs', null, true) . "
308  ORDER BY nom_" . $_SESSION['session_langue'] . "");
309  $nr = num_rows($result);
310  $tpl->assign('num_results', $nr);
311  $tpl_results = array();
312  if ($nr != 0) {
313  $i = 0;
314  while ($ligne = fetch_assoc($result)) {
315  $tpl_results[] = array('tr_rollover' => tr_rollover($i, true),
316  'nom' => (!empty($ligne['nom_' . $_SESSION['session_langue']])?$ligne['nom_' . $_SESSION['session_langue']]:'['.$ligne['id'].']'),
317  'drop_href' => get_current_url(false) . '?mode=suppr&id=' . $ligne['id'],
318  'edit_href' => get_current_url(false) . '?mode=modif&id=' . $ligne['id'],
319  'texte_libre' => $ligne['texte_libre'],
320  'texte_libre_href' => $GLOBALS['wwwroot_in_admin'] . '/modules/attributs/administrer/attributs.php?mode=liste&attid=' . $ligne['id'],
321  'upload' => $ligne['upload'],
322  'etat_onclick' => 'change_status("attributs", "' . $ligne['id'] . '", this, "'.$GLOBALS['administrer_url'] . '")',
323  'etat_src' => $GLOBALS['administrer_url'] . '/images/' . (empty($ligne['etat']) ? 'puce-blanche.gif' : 'puce-verte.gif'),
324  'site_name' => get_site_name($ligne['site_id'])
325  );
326  $i++;
327  }
328  }
329  $tpl->assign('results', $tpl_results);
330  $tpl->assign('STR_MODULE_ATTRIBUTS_ADMIN_TITLE', $GLOBALS['STR_MODULE_ATTRIBUTS_ADMIN_TITLE']);
331  $tpl->assign('STR_ADMIN_WEBSITE', $GLOBALS['STR_ADMIN_WEBSITE']);
332  $tpl->assign('STR_MODULE_ATTRIBUTS_ADMIN_EXPLAIN', $GLOBALS['STR_MODULE_ATTRIBUTS_ADMIN_EXPLAIN']);
333  $tpl->assign('STR_MODULE_ATTRIBUTS_ADMIN_CREATE', $GLOBALS['STR_MODULE_ATTRIBUTS_ADMIN_CREATE']);
334  $tpl->assign('STR_MODULE_ATTRIBUTS_ADMIN_NOTHING_FOUND', $GLOBALS['STR_MODULE_ATTRIBUTS_ADMIN_NOTHING_FOUND']);
335  $tpl->assign('STR_ADMIN_ACTION', $GLOBALS['STR_ADMIN_ACTION']);
336  $tpl->assign('STR_ADMIN_NAME', $GLOBALS['STR_ADMIN_NAME']);
337  $tpl->assign('STR_STATUS', $GLOBALS['STR_STATUS']);
338  $tpl->assign('STR_TYPE', $GLOBALS['STR_TYPE']);
339  $tpl->assign('STR_ADMIN_CONFIRM_JAVASCRIPT', $GLOBALS['STR_ADMIN_CONFIRM_JAVASCRIPT']);
340  $tpl->assign('STR_DELETE', $GLOBALS['STR_DELETE']);
341  $tpl->assign('STR_MODULE_ATTRIBUTS_ADMIN_HANDLE_OPTIONS', $GLOBALS['STR_MODULE_ATTRIBUTS_ADMIN_HANDLE_OPTIONS']);
342  $tpl->assign('STR_MODULE_ATTRIBUTS_ADMIN_UPLOAD_FIELD', $GLOBALS['STR_MODULE_ATTRIBUTS_ADMIN_UPLOAD_FIELD']);
343  $tpl->assign('STR_MODULE_ATTRIBUTS_ADMIN_CUSTOM_TEXT', $GLOBALS['STR_MODULE_ATTRIBUTS_ADMIN_CUSTOM_TEXT']);
344  $tpl->assign('STR_MODULE_ATTRIBUTS_ADMIN_UPDATE', $GLOBALS['STR_MODULE_ATTRIBUTS_ADMIN_UPDATE']);
345  $tpl->assign('STR_ADMIN_UPDATE', $GLOBALS['STR_ADMIN_UPDATE']);
346  echo $tpl->fetch();
347 }
348 
356 {
357  if(empty($frm)) {
358  foreach ($GLOBALS['admin_lang_codes'] as $lng) {
359  $frm['descriptif_' . $lng] = "";
360  }
361  $frm["image"] = "";
362  $frm["prix"] = 0;
363  $frm['mandatory'] = 0;
364  $frm['position'] = 0;
365  }
366  $frm['nouveau_mode'] = "insere";
367  $frm["titre_soumet"] = $GLOBALS["STR_MODULE_ATTRIBUTS_ADMIN_CREATE_THIS_OPTION"];
369 }
370 
377 {
378  if(empty($frm)){
379  // Pas de données venant de validation de formulaire, donc on charge le contenu de la base de données
380  $qid = query("SELECT *
381  FROM peel_attributs
382  WHERE id='" . intval($_GET['id']) . "' AND " . get_filter_site_cond('attributs', null, true));
383  $frm = fetch_assoc($qid);
384  }
385  $frm["nouveau_mode"] = "maj";
386  $frm["titre_soumet"] = $GLOBALS['STR_ADMIN_FORM_SAVE_CHANGES'];
387 
389 }
390 
397 {
398  $id = intval($_GET['id']);
399 
400  $qid = query("SELECT descriptif_" . $_SESSION['session_langue'] . " AS descriptif
401  FROM peel_attributs
402  WHERE id='" . intval($id) . "' AND " . get_filter_site_cond('attributs', null, true));
403 
404  if ($bd = fetch_assoc($qid)) {
405  query("DELETE FROM peel_attributs WHERE id='" . intval($id) . "'");
406  query("DELETE FROM peel_produits_attributs WHERE nom_attribut_id='" . intval($id) . "'");
407  $message = $GLOBALS['tplEngine']->createTemplate('global_success.tpl', array('message' => sprintf($GLOBALS["STR_MODULE_ATTRIBUTS_ADMIN_MSG_OPTION_DELETED_OK"], String::html_entity_decode_if_needed($bd['descriptif']))))->fetch();
408  echo $message;
409  }
410 }
411 
420 {
422  $prix_revendeur = get_float_from_user_input($frm['prix_revendeur']);
423  $sql = "INSERT INTO peel_attributs (id_nom_attribut, image, prix, prix_revendeur, position, mandatory, site_id";
424  foreach ($GLOBALS['admin_lang_codes'] as $lng) {
425  $sql .= ", descriptif_" . $lng;
426  }
427  $sql .= ") VALUES ('" . intval($id) . "', '" . nohtml_real_escape_string($frm['image']) . "', '" . nohtml_real_escape_string($prix) . "', '" . nohtml_real_escape_string($prix_revendeur) . "', '" . intval($frm['position']) . "', '" . intval($frm['mandatory']) . "', '" . nohtml_real_escape_string(get_site_id_sql_set_value($frm['site_id'])) . "'";
428  foreach ($GLOBALS['admin_lang_codes'] as $lng) {
429  $sql .= ", '" . nohtml_real_escape_string($frm['descriptif_' . $lng]) . "'";
430  }
431  $sql .= ")";
432  $qid = query($sql);
433 }
434 
443 {
445  $prix_revendeur = get_float_from_user_input($frm['prix_revendeur']);
446  $sql = "UPDATE peel_attributs
447  SET id_nom_attribut = '" . intval($id) . "'
448  , image = '" . nohtml_real_escape_string($frm['image']) . "'
449  , prix = '" . nohtml_real_escape_string($prix) . "'
450  , prix_revendeur = '" . nohtml_real_escape_string($prix_revendeur) . "'
451  , mandatory = '" . intval($frm['mandatory']) . "'
452  , site_id = '" . nohtml_real_escape_string(get_site_id_sql_set_value($frm['site_id'])) . "'
453  , position = '" . intval($frm['position']) . "'";
454  foreach ($GLOBALS['admin_lang_codes'] as $lng) {
455  $sql .= ", descriptif_" . $lng . " = '" . nohtml_real_escape_string($_POST['descriptif_' . $lng]) . "'";
456  }
457  $sql .= " WHERE id = '" . intval($_POST['id']) . "' AND " . get_filter_site_cond('attributs', null, true)."";
458  $qid = query($sql);
459 }
460 
468 {
469  /* Valeurs par défaut */
470  $frm = array();
471  foreach ($GLOBALS['admin_lang_codes'] as $lng) {
472  $frm['nom_' . $lng] = "";
473  }
474  $frm["nouveau_mode"] = "insere";
475  $frm["image"] = "";
476  $frm["titre_soumet"] = $GLOBALS['STR_ADMIN_ADD'];
477  /* Affiche la liste des attributs, en présélectionnant la attributs choisie. */
479 }
480 
487 {
489  $sql = "SELECT id, nom_" . $_SESSION['session_langue'] . " AS nom
490  FROM peel_nom_attributs
491  WHERE id='" . intval(vn($_GET['attid'])) . "' AND texte_libre = 0 AND upload = 0 AND " . get_filter_site_cond('nom_attributs', null, true) . "";
492  $q = query($sql);
493  if ($nom_att = fetch_object($q)) {
494  if (trim($nom_att->nom) == '') {
495  $nom_att->nom = '[' . $nom_att->id . ']';
496  }
497  $tpl = $GLOBALS['tplEngine']->createTemplate('modules/attributsAdmin_liste.tpl');
498  $tpl->assign('nom', $nom_att->nom);
499  $tpl->assign('add_src', $GLOBALS['administrer_url'] . '/images/add.png');
500  $tpl->assign('add_href', get_current_url(false) . '?mode=ajout&attid=' . $_GET['attid']);
501  $sql = "SELECT *
502  FROM peel_attributs
503  WHERE id_nom_attribut = '" . intval($_GET['attid']) . "' AND " . get_filter_site_cond('attributs', null, true)."
504  ORDER BY descriptif_" . $_SESSION['session_langue'];
505  $res = query($sql);
506  $nr = num_rows($res);
507  $tpl->assign('num_results', $nr);
508  $tpl_results = array();
509  if ($nr != 0) {
510  $i = 0;
511  while ($DescAtt = fetch_assoc($res)) {
512  $tpl_results[] = array('tr_rollover' => tr_rollover($i, true),
513  'drop_href' => get_current_url(false) . '?mode=suppr&id=' . $DescAtt['id'] . '&attid=' . $_GET['attid'],
514  'drop_src' => $GLOBALS['administrer_url'] . '/images/b_drop.png',
515  'edit_href' => get_current_url(false) . '?mode=modif&id=' . $DescAtt['id'] . '&attid=' . $_GET['attid'],
516  'descriptif' => $DescAtt['descriptif_' . $_SESSION['session_langue']],
517  'prix' => fprix($DescAtt['prix'], true, $GLOBALS['site_parameters']['code'], false),
518  'img_src' => (!empty($DescAtt['image']) ? $GLOBALS['repertoire_upload'] . '/thumbs/' . thumbs($DescAtt['image'], 100, 100, "fit") : ''),
519  'site_name' => get_site_name($DescAtt['site_id'])
520  );
521  $i++;
522  }
523  }
524  $tpl->assign('results', $tpl_results);
525  $tpl->assign('STR_TTC', $GLOBALS['STR_TTC']);
526  $tpl->assign('STR_ADMIN_WEBSITE', $GLOBALS['STR_ADMIN_WEBSITE']);
527  $tpl->assign('STR_MODULE_ATTRIBUTS_ADMIN_ATTRIBUTE_OPTIONS_LIST', $GLOBALS['STR_MODULE_ATTRIBUTS_ADMIN_ATTRIBUTE_OPTIONS_LIST']);
528  $tpl->assign('STR_MODULE_ATTRIBUTS_ADMIN_ATTRIBUTE_OPTIONS_LIST_EXPLAIN', $GLOBALS['STR_MODULE_ATTRIBUTS_ADMIN_ATTRIBUTE_OPTIONS_LIST_EXPLAIN']);
529  $tpl->assign('STR_MODULE_ATTRIBUTS_ADMIN_CREATE_OPTION', $GLOBALS['STR_MODULE_ATTRIBUTS_ADMIN_CREATE_OPTION']);
530  $tpl->assign('STR_ADMIN_ACTION', $GLOBALS['STR_ADMIN_ACTION']);
531  $tpl->assign('STR_LIST', $GLOBALS['STR_LIST']);
532  $tpl->assign('STR_PRICE', $GLOBALS['STR_PRICE']);
533  $tpl->assign('STR_PHOTO', $GLOBALS['STR_PHOTO']);
534  $tpl->assign('STR_MODULE_ATTRIBUTS_ADMIN_NO_OPTION_DEFINED', $GLOBALS['STR_MODULE_ATTRIBUTS_ADMIN_NO_OPTION_DEFINED']);
535  $tpl->assign('STR_ADMIN_DELETE_WARNING', $GLOBALS['STR_ADMIN_DELETE_WARNING']);
536  $tpl->assign('STR_DELETE', $GLOBALS['STR_DELETE']);
537  $tpl->assign('STR_MODIFY', $GLOBALS['STR_MODIFY']);
538  echo $tpl->fetch();
539  }
540 }
541 
550 {
551  $res = query("SELECT nom_" . $_SESSION['session_langue'] . " AS nom
552  FROM peel_nom_attributs
553  WHERE id = '" . intval($_GET['attid']) . "' AND " . get_filter_site_cond('nom_attributs', null, true) . "");
554  if ($nom_att = fetch_object($res)) {
555  $tpl = $GLOBALS['tplEngine']->createTemplate('modules/attributsAdmin_formulaire.tpl');
556  $tpl->assign('action', get_current_url(false) . '?attid=' . $_GET['attid']);
557  $tpl->assign('mode', $frm["nouveau_mode"]);
558  $tpl->assign('prix_revendeur', vn($prix_revendeur));
559  $tpl->assign('mandatory', vn($frm["mandatory"]));
560  $tpl->assign('id', vn($_GET['id']));
561  $tpl->assign('nom', $nom_att->nom);
562  $tpl_langs = array();
563  foreach ($GLOBALS['admin_lang_codes'] as $lng) {
564  $tpl_langs[] = array('code' => $lng,
565  'descriptif' => vn($frm['descriptif_' . $lng]),
566  'error' => $form_error_object->text('descriptif_' . $lng)
567  );
568  }
569  $tpl->assign('langs', $tpl_langs);
570 
571  if (!empty($frm["image"])) {
572  $tpl->assign('image', get_uploaded_file_infos('image', $frm['image'], get_current_url(false) . '?mode=supprfile&id=' . vb($frm['id']) . '&file=image&attid=' . vb($_GET['attid'])));
573  }
574  $tpl->assign('site_id_select_options', get_site_id_select_options(vb($frm['site_id'])));
575  $tpl->assign('prix', fprix(vn($frm['prix']), false, $GLOBALS['site_parameters']['code'], false));
576  $tpl->assign('prix_revendeur', fprix(vn($frm['prix_revendeur']), false, $GLOBALS['site_parameters']['code'], false));
577  $tpl->assign('symbole', $GLOBALS['site_parameters']['symbole']);
578  $tpl->assign('position', intval($frm['position']));
579  $tpl->assign('titre_soumet', $frm["titre_soumet"]);
580  $tpl->assign('STR_BEFORE_TWO_POINTS', $GLOBALS['STR_BEFORE_TWO_POINTS']);
581  $tpl->assign('STR_ADMIN_WEBSITE', $GLOBALS['STR_ADMIN_WEBSITE']);
582  $tpl->assign('STR_HT', $GLOBALS['STR_HT']);
583  $tpl->assign('STR_TTC', $GLOBALS['STR_TTC']);
584  $tpl->assign('STR_MODULE_ATTRIBUTS_ADMIN_CREATE_OPTION', $GLOBALS['STR_MODULE_ATTRIBUTS_ADMIN_CREATE_OPTION']);
585  $tpl->assign('STR_ADMIN_LANGUAGES_SECTION_HEADER', $GLOBALS['STR_ADMIN_LANGUAGES_SECTION_HEADER']);
586  $tpl->assign('STR_NAME', $GLOBALS['STR_NAME']);
587  $tpl->assign('STR_ADMIN_VARIOUS_INFORMATION_HEADER', $GLOBALS['STR_ADMIN_VARIOUS_INFORMATION_HEADER']);
588  $tpl->assign('STR_IMAGE', $GLOBALS['STR_IMAGE']);
589  $tpl->assign('STR_ADMIN_FILE_NAME', $GLOBALS['STR_ADMIN_FILE_NAME']);
590  $tpl->assign('STR_MODULE_ATTRIBUTS_ADMIN_OVERCOST', $GLOBALS['STR_MODULE_ATTRIBUTS_ADMIN_OVERCOST']);
591  $tpl->assign('STR_ADMIN_DELETE_IMAGE', $GLOBALS['STR_ADMIN_DELETE_IMAGE']);
592  $tpl->assign('STR_MODULE_ATTRIBUTS_ADMIN_OVERCOST_RESELLER', $GLOBALS['STR_MODULE_ATTRIBUTS_ADMIN_OVERCOST_RESELLER']);
593  $tpl->assign('STR_MODULE_ATTRIBUTS_ADMIN_OVERCOST', $GLOBALS['STR_MODULE_ATTRIBUTS_ADMIN_OVERCOST']);
594  $tpl->assign('STR_ADMIN_POSITION', $GLOBALS['STR_ADMIN_POSITION']);
595  $tpl->assign('STR_ADMIN_MANDATORY', $GLOBALS['STR_ADMIN_MANDATORY']);
596  $tpl->assign('STR_YES', $GLOBALS['STR_YES']);
597  $tpl->assign('STR_NO', $GLOBALS['STR_NO']);
598  echo $tpl->fetch();
599  }
600 }
601 
610 function supprime_attribut_image($id, $file)
611 {
612  /* Charge les infos du produit. */
613 
614  switch ($file) {
615  case "image" :
616  $sql = "SELECT image
617  FROM peel_attributs
618  WHERE id = '" . intval($id) . "'";
619  $res = query($sql);
620  $file = fetch_assoc($res);
621  query("UPDATE peel_attributs
622  SET image = ''
623  WHERE id = '" . intval($id) . "'");
624  break;
625  }
626  delete_uploaded_file_and_thumbs($file['image']);
627  echo $GLOBALS['tplEngine']->createTemplate('global_success.tpl', array('message' => sprintf($GLOBALS['STR_ADMIN_RUBRIQUES_MSG_DELETED_OK'], $file['image'])))->fetch();
628 }
629 
636 {
637  $tpl = $GLOBALS['tplEngine']->createTemplate('modules/attributsAdmin_choix_nom.tpl');
638  $sql = "SELECT id, nom_" . $_SESSION['session_langue'] . "
639  FROM peel_nom_attributs
640  WHERE texte_libre = 0 AND upload = 0 AND " . get_filter_site_cond('nom_attributs', null, true) . "
641  ORDER BY nom_" . $_SESSION['session_langue'];
642  $res = query($sql);
643  $tpl_options = array();
644  while ($att = fetch_assoc($res)) {
645  if (trim($att['nom_' . $_SESSION['session_langue']]) == '') {
646  $att['nom_' . $_SESSION['session_langue']] = '[' . $att['id'] . ']';
647  }
648  $tpl_options[] = array('value' => intval($att['id']),
649  'issel' => $att['id'] == vb($_GET['attid']),
650  'name' => $att['nom_' . $_SESSION['session_langue']]
651  );
652  }
653  $tpl->assign('options', $tpl_options);
654  $tpl->assign('wwwroot_in_admin', $GLOBALS['wwwroot_in_admin']);
655  $tpl->assign('STR_CHOOSE', $GLOBALS['STR_CHOOSE']);
656  $tpl->assign('STR_MODULE_ATTRIBUTS_ADMIN_SEARCH_TITLE', $GLOBALS['STR_MODULE_ATTRIBUTS_ADMIN_SEARCH_TITLE']);
657  $tpl->assign('STR_MODULE_ATTRIBUTS_ADMIN_SEARCH_CHOOSE_ATTRIBUTE', $GLOBALS['STR_MODULE_ATTRIBUTS_ADMIN_SEARCH_CHOOSE_ATTRIBUTE']);
658  $tpl->assign('STR_BEFORE_TWO_POINTS', $GLOBALS['STR_BEFORE_TWO_POINTS']);
659  $tpl->assign('STR_MODULE_ATTRIBUTS_ADMIN_SEARCH_UPDATE_LIST', $GLOBALS['STR_MODULE_ATTRIBUTS_ADMIN_SEARCH_UPDATE_LIST']);
660  echo $tpl->fetch();
661 }
662 
663 /* Fonctions de produits_attributs.php */
664 
672 {
673  $product_object = new Product($id, null, false, null, true, !check_if_module_active('micro_entreprise'));
674 
675  $tpl = $GLOBALS['tplEngine']->createTemplate('modules/attributsAdmin_liste_by_id.tpl');
676  $tpl->assign('wwwroot_in_admin', $GLOBALS['wwwroot_in_admin']);
677  $tpl->assign('product_id', $id);
678  $tpl->assign('product_name', $product_object->name);
679  $tpl->assign('product_revenir_href', $GLOBALS['administrer_url'] . '/produits.php?mode=modif&id=' . $id);
680  $tpl->assign('product_liste_revenir_href', $GLOBALS['administrer_url'] . '/produits.php');
681  $tpl->assign('action', get_current_url(false) . '?mode=associe&id=' . $id);
682 
683  $all_attributs_array = get_possible_attributs(null, 'rough', false, false);
684  $product_attributs_array = $product_object->get_possible_attributs('rough', false, 0, false, false, false, false, false, false);
685  $tpl_results = array();
686 
687  if (!empty($all_attributs_array)) {
688  // On affiche la liste des attributs
689  $i = 0;
690  foreach ($all_attributs_array as $this_nom_attribut_id => $this_attribut_values_array) {
691  $tpl_sub_res = array();
692  foreach ($this_attribut_values_array as $this_attribut_id => $this_attribut_infos) {
693  if (!empty($this_attribut_id) || $this_attribut_id === 0) {
694  if(trim(String::strip_tags($this_attribut_infos['descriptif']))=='') {
695  $this_attribut_infos['descriptif'] = '['.$this_attribut_id.'] ';
696  }
697  $tpl_sub_res[] = array('value' => intval($this_attribut_id),
698  'issel' => !empty($product_attributs_array[$this_nom_attribut_id]) && !empty($product_attributs_array[$this_nom_attribut_id][$this_attribut_id]),
699  'desc' => String::strip_tags($this_attribut_infos['descriptif']),
700  'prix' => fprix($this_attribut_infos['prix'], true, $GLOBALS['site_parameters']['code'], false)
701  );
702  }
703  }
704  // NB : $this_attribut_infos est encore défini après la boucle foreach ci-dessus, donc on peut l'utiliser
705  $tpl_results[] = array('tr_rollover' => tr_rollover($i, true),
706  'nom' => $this_attribut_infos['nom'],
707  'id' => $this_nom_attribut_id,
708  'texte_libre' => $this_attribut_infos['texte_libre'],
709  'upload' => $this_attribut_infos['upload'],
710  'issel' => !empty($product_attributs_array[$this_nom_attribut_id]),
711  'sub_res' => $tpl_sub_res
712  );
713  $i++;
714  }
715  }
716  $tpl->assign('results', $tpl_results);
717  $tpl->assign('STR_MODULE_ATTRIBUTS_ADMIN_LIST_TITLE', $GLOBALS["STR_MODULE_ATTRIBUTS_ADMIN_LIST_TITLE"]);
718  $tpl->assign('STR_MODULE_ATTRIBUTS_ADMIN_LIST_BACK_TO_PRODUCT', $GLOBALS["STR_MODULE_ATTRIBUTS_ADMIN_LIST_BACK_TO_PRODUCT"]);
719  $tpl->assign('STR_MODULE_ATTRIBUTS_ADMIN_LIST_BACK_TO_PRODUCTS_LIST', $GLOBALS["STR_MODULE_ATTRIBUTS_ADMIN_LIST_BACK_TO_PRODUCTS_LIST"]);
720  $tpl->assign('STR_MODULE_ATTRIBUTS_ADMIN_LIST_EXPLAIN_SELECT', $GLOBALS["STR_MODULE_ATTRIBUTS_ADMIN_LIST_EXPLAIN_SELECT"]);
721  $tpl->assign('STR_ADMIN_ATTRIBUTE', $GLOBALS["STR_ADMIN_ATTRIBUTE"]);
722  $tpl->assign('STR_MODULE_ATTRIBUTS_ADMIN_LIST_OPTIONS_ASSOCIATED', $GLOBALS["STR_MODULE_ATTRIBUTS_ADMIN_LIST_OPTIONS_ASSOCIATED"]);
723  $tpl->assign('STR_MODULE_ATTRIBUTS_ADMIN_LIST_OPTION_OVERCOST', $GLOBALS["STR_MODULE_ATTRIBUTS_ADMIN_LIST_OPTION_OVERCOST"] );
724  $tpl->assign('STR_MODULE_ATTRIBUTS_ADMIN_LIST_OPTION_ASSOCIATE_ATTRIBUTE', $GLOBALS["STR_MODULE_ATTRIBUTS_ADMIN_LIST_OPTION_ASSOCIATE_ATTRIBUTE"]);
725  $tpl->assign('STR_MODULE_ATTRIBUTS_ADMIN_LIST_OPTION_ADD_UPLOAD', $GLOBALS["STR_MODULE_ATTRIBUTS_ADMIN_LIST_OPTION_ADD_UPLOAD"]);
726  $tpl->assign('STR_MODULE_ATTRIBUTS_ADMIN_LIST_OPTION_FREE_TEXT', $GLOBALS["STR_MODULE_ATTRIBUTS_ADMIN_LIST_OPTION_FREE_TEXT"]);
727  $tpl->assign('STR_MODULE_ATTRIBUTS_ADMIN_LIST_NO_OPTION', $GLOBALS["STR_MODULE_ATTRIBUTS_ADMIN_LIST_NO_OPTION"]);
728  $tpl->assign('STR_MODULE_ATTRIBUTS_ADMIN_LIST_MANAGE_LINK', $GLOBALS["STR_MODULE_ATTRIBUTS_ADMIN_LIST_MANAGE_LINK"]);
729  $tpl->assign('STR_TTC', $GLOBALS['STR_TTC']);
730  echo $tpl->fetch();
731 }
732 
740 {
741  $output_array = array();
742  $q = query('SELECT descriptif_' . word_real_escape_string($lang) . ' as nom
743  FROM peel_attributs
744  WHERE ' . get_filter_site_cond('attributs', null, true));
745  while ($result = fetch_assoc($q)) {
746  $output_array[] = $result['nom'];
747  }
748  return $output_array;
749 }
750 
get_site_name($site_ids, $skip_rights_check=false)
Retourne le nom d'un ou de plusieurs sites à partir de l'id.
Definition: fonctions.php:4763
static strip_tags($string, $allowed_tags=null)
String::strip_tags()
Definition: String.php:548
affiche_liste_nom_attribut($start)
affiche_liste_nom_attribut()
Definition: fonctions.php:298
if(!empty($GLOBALS['site_parameters']['order_specific_field_titles'])) if(check_if_module_active('socolissimo')&&!empty($_REQUEST)&&!empty($_REQUEST['PUDOFOID'])&&!empty($_REQUEST['CEEMAIL'])&&!empty($_REQUEST['SIGNATURE'])&&!empty($_REQUEST['ORDERID'])) elseif(!empty($_POST)) elseif(check_if_module_active('socolissimo')&&!empty($_SESSION['session_commande']['is_socolissimo_order'])) foreach(array('bill'=> 1, 'ship'=> 2) as $address_type=> $session_commande_address_id) $frm['societe1']
$lang
Definition: spellchecker.php:9
insere_nom_attribut($frm)
Ajoute l'attribut dans la table attribut.
Definition: fonctions.php:215
affiche_formulaire_liste_attribut($id, &$frm)
Affiche un formulaire de attributs vide.
Definition: fonctions.php:467
$result
get_current_url($with_get=true, $get_short_url=false, $take_away_get_args_array=null)
get_current_url()
Definition: fonctions.php:1743
maj_attribut($id, $frm)
maj_attribut()
Definition: fonctions.php:442
affiche_formulaire_nom_attribut(&$frm)
affiche_formulaire_nom_attribut()
Definition: fonctions.php:144
get_attributs_names($lang)
Retourne un tableau contenant la liste des noms des attributs disponibles sur le site.
Definition: fonctions.php:739
$tpl_langs
get_site_id_select_options($selected_site_id=null, $selected_site_name=null, $display_first_option=null, $select_current_site_id_by_default=false)
Créer les options pour le select qui liste les noms de sites configurés en back office.
static html_entity_decode_if_needed($string)
String::html_entity_decode_if_needed()
Definition: String.php:533
attributs_hook_export_products_get_line_infos_array(&$params)
Génération d'informations pour l'export de produits.
Definition: fonctions.php:59
word_real_escape_string($value)
Applique real_escape_string dans le cas où on n'insère qu'un seul mot, de moins de 30 caractères...
Definition: database.php:424
insere_attribut($id, $frm)
insere_attribut()
Definition: fonctions.php:419
affiche_formulaire_modif_nom_attribut($id, &$frm)
Affiche le formulaire de modification pour l'attribut sélectionné
Definition: fonctions.php:121
affiche_choix_nom_attribut()
affiche_choix_nom_attribut()
Definition: fonctions.php:635
nohtml_real_escape_string($value, $allowed_tags=null)
Protège les données pour insertion dans MySQL ET supprime les tags HTML pour protéger de toute sorte ...
Definition: database.php:400
affiche_liste_attribut($frm)
affiche_liste_attribut()
Definition: fonctions.php:486
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']
Definition: fonctions.php:19
if(empty($_GET['id'])) if(!empty($GLOBALS['site_parameters']['allow_multiple_product_url_with_category'])) $product_object
$start
Definition: attributs.php:22
get_float_from_user_input($string, $from_currency_rate=1)
Transforme tout nombre formaté en un float au format PHP Exemples : 12 004,34 ou 12,324.50.
Definition: format.php:196
if(!defined('IN_PEEL')) thumbs($source_filename, $width, $height, $method= 'fit', $source_folder=null, $thumb_folder=null, $thumb_rename=true, $return_absolute_path=false)
Charge l'image dont le nom est $source_filename dans le répertoire d'upload, et crée une vignette pou...
Definition: fonctions.php:33
if(isset($_POST['pays_zone'])) elseif(empty($_SESSION['session_caddie']->zoneId)&&!empty($GLOBALS['site_parameters']['default_delivery_zone_id'])) if(isset($_POST['type'])) elseif(empty($_SESSION['session_caddie']->typeId)&&!empty($GLOBALS['site_parameters']['default_delivery_type_id'])) if(!empty($_POST['code_promo'])) if(!empty($_GET['code_promo'])&&$_GET['code_promo']== 'delete') $form_error_object
affiche_formulaire_attribut(&$frm, &$form_error_object)
affiche_formulaire_attribut()
Definition: fonctions.php:549
$tpl_options
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.
Definition: fonctions.php:4643
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
affiche_formulaire_modif_attribut(&$frm, &$form_error_object)
Charge les infos de la attributs.
Definition: fonctions.php:376
supprime_attribut()
supprime_attribut()
Definition: fonctions.php:396
vb(&$var, $default=null)
Variable blanche if $var n'est pas défini, retourne $default, sinon retourne $var.
Definition: format.php:97
get_uploaded_file_infos($field_name, $file, $delete_url, $logo_width=100, $logo_height=100)
Remplit un tableau d'informations pour le template d'upload HTML.
Definition: fonctions.php:3601
if(strlen($date2)== '10') if($type== 'users-by-age'&&a_priv('admin_users', true)) elseif($type== 'forums-count'&&a_priv('admin_content', true)) elseif($type== 'forums-categories'&&a_priv('admin_content', true)) elseif($type== 'users-count'&&a_priv('admin_users', true)) elseif($type== 'product-categories'&&a_priv('admin_products', true)) elseif($type== 'users-by-sex'&&a_priv('admin_users', true)) elseif($type== 'users-by-country'&&a_priv('admin_users', true)) elseif($type== 'sales'&&a_priv('admin_sales', true))
Definition: chart-data.php:160
num_rows($query_result)
num_rows()
Definition: database.php:321
get_possible_attributs($product_id=null, $return_mode= 'rough', $get_attributes_with_multiple_options_only=true, $get_attributes_with_single_options_only=false, $attributs_list=null)
get_possible_attributs()
Definition: fonctions.php:70
delete_uploaded_file_and_thumbs($filename)
delete_uploaded_file_and_thumbs()
Definition: fonctions.php:3417
fetch_object($query_result)
fetch_object()
Definition: database.php:302
if(!defined('IN_PEEL')) attributs_hook_admin_menu_items($params)
Renvoie les éléments de menu affichables.
Definition: fonctions.php:26
fetch_assoc($query_result)
fetch_assoc()
Definition: database.php:283
affiche_formulaire_ajout_nom_attribut(&$frm)
Affiche un formulaire vierge pour ajouter un attribut.
Definition: fonctions.php:89
supprime_nom_attribut($id)
Supprime l'attribut spécifié par $id.
Definition: fonctions.php:198
vn(&$var, $default=0)
Variable nulle if $var n'est pas défini, retourne $default, sinon retourne $var.
Definition: format.php:110
get_site_id_sql_set_value($site_ids)
Retourne la valeur SQL d'un champ INT ou SET suivant que ce soit un entier ou un tableau.
Definition: fonctions.php:4747
supprime_attribut_image($id, $file)
Supprime le produit spécifié par $id.
Definition: fonctions.php:610
affiche_liste_attributs_by_id($id)
affiche_liste_attributs_by_id()
Definition: fonctions.php:671
$id
Definition: articles.php:22
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
attributs_hook_export_products_get_configuration_array(&$params)
Génération d'informations pour l'exportde produits.
Definition: fonctions.php:38
maj_nom_attribut($id, $frm)
Met à jour l'attribut $id avec de nouvelles valeurs.
Definition: fonctions.php:252
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...
affiche_formulaire_ajout_attribut(&$frm, &$form_error_object)
Fonctions d'attributs.php.
Definition: fonctions.php:355
if(defined('IN_PEEL_ADMIN')||IN_INSTALLATION) $_SESSION['session_langue']

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