Last change
on this file since 45640 was
45640,
checked in by rastapopoulos@…, 10 years ago
|
Une API générique pour obtenir le prix d'un objet SPIP. Les fonctions s'appliquent donc sur n'importe quel objet suivant le principe objet/id_objet.
Les deux fonctions principales permettent d'obtenir soit le prix HT, soit le prix TTC. Deux balises #PRIX_HT et #PRIX leurs sont associées.
Par défaut "prix_ht" va chercher un champ SQL "prix_ht" ou sinon un champ "prix" ou sinon une fonction "prix_{objet}_ht_dist()".
La fonction "prix", elle, va d'abord chercher le prix HT et l'envoie à une fonction "prix_{objet}_dist()". Sinon elle retourne le prix HT évidemment.
Les deux fonctions ont chacune un pipeline associé du même nom.
|
File size:
167 bytes
|
Line | |
---|
1 | <?php |
---|
2 | |
---|
3 | // Sécurité |
---|
4 | if (!defined('_ECRIRE_INC_VERSION')) return; |
---|
5 | |
---|
6 | $GLOBALS[$GLOBALS['idx_lang']] = array( |
---|
7 | 'prix_ht' => '@prix@ HT', |
---|
8 | 'prix_ttc' => '@prix@ TTC' |
---|
9 | ); |
---|
10 | |
---|
11 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.