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 
15 if (!defined('IN_PEEL')) {
16  die();
17 }
18 
25 function ecotaxe_hook_admin_menu_items($params) {
26  $result['menu_items']['manage_payments'][$GLOBALS['administrer_url'] . '/ecotaxes.php'] = $GLOBALS["STR_ADMIN_MENU_MANAGE_EXOTAXE"];
27  return $result;
28 }
29 
36 function ecotaxe_hook_product_init_post(&$params) {
37  if (!empty($product_infos) && isset($product_infos['ecotaxe_ht']) && isset($product_infos['ecotaxe_ttc'])) {
38  $params['this']->ecotaxe_ht = $product_infos['ecotaxe_ht'];
39  $params['this']->ecotaxe_ttc = $product_infos['ecotaxe_ttc'];
40  } else {
41  if (!empty($params['this']->id_ecotaxe)) {
42  $eco = get_ecotax_object($params['this']->id_ecotaxe);
43  }
44  if (!empty($eco)) {
45  $params['this']->ecotaxe_ht = $eco->prix_ht;
46  $params['this']->ecotaxe_ttc = $eco->prix_ttc;
47  }
48  }
49 }
50 
58  static $eco;
59  $cache_id = $id;
60  if (!isset($eco[$cache_id])) {
61  $query = query('SELECT prix_ht, prix_ttc
62  FROM peel_ecotaxes
63  WHERE id = "' . intval($id) . '" AND ' . get_filter_site_cond('ecotaxes'));
64  $eco[$cache_id] = fetch_object($query);
65  }
66  return $eco[$cache_id];
67 }
$product_infos
$result
ecotaxe_hook_product_init_post(&$params)
Chargement des informations produit manquantes si nécessaire.
Definition: fonctions.php:36
get_ecotax_object($id)
get_ecotax_object()
Definition: fonctions.php:57
if(!defined('IN_PEEL')) $GLOBALS['page_types_array']
Definition: fonctions.php:19
if(!defined('IN_PEEL')) ecotaxe_hook_admin_menu_items($params)
Renvoie les éléments de menu affichables.
Definition: fonctions.php:25
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
fetch_object($query_result)
fetch_object()
Definition: database.php:302
$id
Definition: articles.php:22

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