Documentation du code de SPIP et de ses plugins

Commandes

commandes_fonctions.php

Fonctions du plugin Commandes

Tags
plugin

Commandes

copyright

2014

author

Ateliers CYM, Matthieu Marcillaud, Les Développements Durables

licence

GPL 3

Table of Contents

Functions

filtre_commandes_hash_dist()  : string
Un fitre que l'on peut utiliser en argument d'une inclusion si on veut etre sur que l'affichage change quand la commande change <INCLURE{fond=macommande,id_commande,hash=#ID_COMMANDE|commandes_hash} />
commandes_hash()  : mixed
commandes_lister_statuts()  : array<string|int, mixed>|string
Retourne les différents statuts possibles pour une commande ou le nom d'un statut précis
filtre_commande_totalise_taxes_dist()  : array<string|int, mixed>|string
Une fonction pour memoriser les taxes par taux et retourner le tableau de detail en recap
commande_totalise_taxes()  : mixed
filtre_commandes_arrondir_quantite_dist()  : int|float
Filtre pour utiliser la fonction d'arrondi des quantite
commandes_arrondir_quantite()  : mixed
filtre_commandes_afficher_quantite_descriptif_dist()  : string
Afficher la quantite si differente de 1
commandes_afficher_quantite_descriptif()  : mixed
filtre_commandes_afficher_quantite_dist()  : string
Afficher la quantite, en arrondissant eventuellement (par defaut fait juste l'arrondi int natif)
commandes_afficher_quantite()  : mixed
filtre_commandes_afficher_prix_detaille_abbr_dist()  : mixed|string
commandes_afficher_prix_detaille_abbr()  : mixed
filtre_commandes_afficher_reduction_si_dist()  : mixed
commandes_afficher_reduction_si()  : mixed
critere_COMMANDES_encours_visiteur_dist()  : mixed
Critère pour prendre la commande en cours du visiteur, qu'il soit connecté ou non
commandes_id_commande_encours_visiteur()  : int
Retourne le numéro de la commande en cours du visiteur, qu'il soit connecté ou non
generer_commande_infos_client()  : array<string|int, mixed>|mixed
La fonction peut-être appellee par la fonction générique generer_objet_info($id_commande, 'commmande', 'infos_client') dans ce cas $ligne_sql_commande est fournie en second argument mais n'est pas utile ici et $cle vaut 'infos_client'
filtre_generer_commande_infos_client_dist()  : array<string|int, mixed>|mixed
Filtre helper pour utiliser les infos clients dans un squelette

Functions

filtre_commandes_hash_dist()

Un fitre que l'on peut utiliser en argument d'une inclusion si on veut etre sur que l'affichage change quand la commande change <INCLURE{fond=macommande,id_commande,hash=#ID_COMMANDE|commandes_hash} />

filtre_commandes_hash_dist(int $id_commande) : string
Parameters
$id_commande : int
Return values
string

commandes_hash()

commandes_hash(mixed $id_commande) : mixed
Parameters
$id_commande : mixed
Tags
deprecated

v2.4.0

commandes_lister_statuts()

Retourne les différents statuts possibles pour une commande ou le nom d'un statut précis

commandes_lister_statuts([bool|string $statut = false ]) : array<string|int, mixed>|string
Parameters
$statut : bool|string = false
  • vide ou false pour retourner un tableau
  • nom d'un statut précis pour retourner sa chaîne de langue
Tags
filtre
used-by
commandes_upgrade()
Return values
array<string|int, mixed>|string
  • array: tableau associatif des statuts possibles et leurs chaînes de langue
  • string: chaîne de langue d'un statut

filtre_commande_totalise_taxes_dist()

Une fonction pour memoriser les taxes par taux et retourner le tableau de detail en recap

filtre_commande_totalise_taxes_dist([null|float $prix_ht = null ][, null|float $prix_ttc = null ][, null|float $taxe = null ]) : array<string|int, mixed>|string
Parameters
$prix_ht : null|float = null
$prix_ttc : null|float = null
$taxe : null|float = null
Tags
filtre
Return values
array<string|int, mixed>|string

commande_totalise_taxes()

commande_totalise_taxes([mixed $prix_ht = null ][, mixed $prix_ttc = null ]) : mixed
Parameters
$prix_ht : mixed = null
$prix_ttc : mixed = null
Tags
deprecated

v2.4.0

filtre_commandes_arrondir_quantite_dist()

Filtre pour utiliser la fonction d'arrondi des quantite

filtre_commandes_arrondir_quantite_dist(int|float $quantite[, string $objet = '' ][, int $id_objet = 0 ]) : int|float
Parameters
$quantite : int|float
$objet : string = ''
$id_objet : int = 0
Tags
filtre
Return values
int|float

commandes_arrondir_quantite()

commandes_arrondir_quantite(mixed $quantite[, mixed $objet = '' ][, mixed $id_objet = 0 ]) : mixed
Parameters
$quantite : mixed
$objet : mixed = ''
$id_objet : mixed = 0
Tags
deprecated

v2.4.0

filtre_commandes_afficher_quantite_descriptif_dist()

Afficher la quantite si differente de 1

filtre_commandes_afficher_quantite_descriptif_dist(int|float $quantite[, string $objet = '' ][, int $id_objet = 0 ]) : string
Parameters
$quantite : int|float
$objet : string = ''
$id_objet : int = 0
Tags
filtre
Return values
string

commandes_afficher_quantite_descriptif()

commandes_afficher_quantite_descriptif(mixed $quantite[, mixed $objet = '' ][, mixed $id_objet = 0 ]) : mixed
Parameters
$quantite : mixed
$objet : mixed = ''
$id_objet : mixed = 0
Tags
deprecated

v2.4.0

filtre_commandes_afficher_quantite_dist()

Afficher la quantite, en arrondissant eventuellement (par defaut fait juste l'arrondi int natif)

filtre_commandes_afficher_quantite_dist(int|float $quantite[, string $objet = '' ][, int $id_objet = 0 ]) : string
Parameters
$quantite : int|float
$objet : string = ''
$id_objet : int = 0
Tags
filtre
Return values
string

commandes_afficher_quantite()

commandes_afficher_quantite(mixed $quantite[, mixed $objet = '' ][, mixed $id_objet = 0 ]) : mixed
Parameters
$quantite : mixed
$objet : mixed = ''
$id_objet : mixed = 0
Tags
deprecated

v2.4.0

filtre_commandes_afficher_prix_detaille_abbr_dist()

filtre_commandes_afficher_prix_detaille_abbr_dist( $prix_ttc,  $quantite,  $prix_unit_ht,  $reduction,  $taxe) : mixed|string
Parameters
$prix_ttc :
$quantite :
$prix_unit_ht :
$reduction :
$taxe :
Tags
filtre
Return values
mixed|string

commandes_afficher_prix_detaille_abbr()

commandes_afficher_prix_detaille_abbr(mixed $prix_ttc, mixed $quantite, mixed $prix_unit_ht, mixed $reduction, mixed $taxe) : mixed
Parameters
$prix_ttc : mixed
$quantite : mixed
$prix_unit_ht : mixed
$reduction : mixed
$taxe : mixed
Tags
deprecated

v2.4.0

filtre_commandes_afficher_reduction_si_dist()

filtre_commandes_afficher_reduction_si_dist(mixed $reduction) : mixed
Parameters
$reduction : mixed

commandes_afficher_reduction_si()

commandes_afficher_reduction_si(mixed $reduction) : mixed
Parameters
$reduction : mixed
Tags
deprecated

v2.4.0

critere_COMMANDES_encours_visiteur_dist()

Critère pour prendre la commande en cours du visiteur, qu'il soit connecté ou non

critere_COMMANDES_encours_visiteur_dist(string $idb, object &$boucles, object $crit) : mixed
Parameters
$idb : string
$boucles : object
$crit : object
Tags
example

<BOUCLE_commande(COMMANDES) {encours_visiteur}>

uses
commandes_calculer_critere_encours_visiteur()

commandes_id_commande_encours_visiteur()

Retourne le numéro de la commande en cours du visiteur, qu'il soit connecté ou non

commandes_id_commande_encours_visiteur() : int

Soit la commande est en session, soit on prend celle dans la db. Nb : il ne peut en théorie y avoir qu'une seule commande en cours par auteur, dans le cas improbable où il y en aurait plusieurs, on prend la plus récente.

Return values
int

Numéro de la commande ou 0 s'il n'y en a pas

generer_commande_infos_client()

La fonction peut-être appellee par la fonction générique generer_objet_info($id_commande, 'commmande', 'infos_client') dans ce cas $ligne_sql_commande est fournie en second argument mais n'est pas utile ici et $cle vaut 'infos_client'

generer_commande_infos_client(int $id_commande[, mixed $ligne_sql_commande = [] ][, string $cle = '' ]) : array<string|int, mixed>|mixed
Parameters
$id_commande : int
$ligne_sql_commande : mixed = []
$cle : string = ''
Return values
array<string|int, mixed>|mixed

filtre_generer_commande_infos_client_dist()

Filtre helper pour utiliser les infos clients dans un squelette

filtre_generer_commande_infos_client_dist(int $id_commande, string $cle) : array<string|int, mixed>|mixed
Parameters
$id_commande : int
$cle : string
Return values
array<string|int, mixed>|mixed

        
On this page

Search results