PEEL Shopping
Open source ecommerce : PEEL Shopping
Public Member Functions | Data Fields
Caddie Class Reference

Public Member Functions

 Caddie ($percent_remise_user)
 Caddie::Caddie() More...
 
 init ($load_from_caddie_cookie_if_available=false, $erase_caddie_cookie=true)
 Initialise le caddie. More...
 
 affiche_erreur_caddie ()
 affiche_erreur_caddie() More...
 
 add_product (&$product_object, $added_quantity_wished, $email_check, $listcadeaux_owner=null, $custom_product_reference=null)
 On ajoute un nouveau produit dans le panier. More...
 
 change_lines_data (&$line_infos)
 Caddie::change_lines_data() More...
 
 change_line_data ($numero_ligne, $product_id, $quantity_wished, $couleur_id, $taille_id, $email_check, $liste_attribut, $listcadeaux_owner=null, $do_update_line=true)
 On met à jour une ligne de produit, en connaissant déjà son numéro. More...
 
 get_available_point_for_current_line ($this_line)
 Caddie::get_available_point_for_current_line() More...
 
 update_line ($numero_ligne, $max_available_gift_points)
 On recalcule les informations d'une ligne. More...
 
 delete_line ($numero_ligne)
 Enlève un produit du caddie. More...
 
 update_code_promo ($new_code_promo=null)
 Appeler cette fonction avec $new_code_promo="CODE" pour l'appliquer, $new_code_promo="" pour supprimer le code promo, ou avec $new_code_promo=null pour vérifier si code promo toujours bien applicable. More...
 
 count_products ($cat_id=null)
 Renvoie le nombre d'articles dans le caddie (toujours positif) More...
 
 set_paiement ($payment_technical_code)
 Traitement du moyen de paiement. More...
 
 set_zone ($zoneId)
 Définition de la zone d'expédition. More...
 
 set_type ($typeId)
 Définition du type de port. More...
 
 update ($percent_remise_user=null)
 Cette méthode doit toujours être appelée après la modification (ou un ensemble de modifications) du caddie, avant son affichage Elle gère notamment la ventilation des codes promos en valeur, et l'application des codes promos en pourcentage. More...
 
 _recalc_line_totals ()
 Recalcul des totaux en appliquant correctement les ventilations des codes promos. More...
 
 save_in_database (&$order_infos)
 Enregistre la commande dans la base. More...
 

Data Fields

 $giftlist_owners = array()
 
 $articles = array()
 
 $quantite = array()
 
 $poids = array()
 
 $points = array()
 
 $couleurId = array()
 
 $tailleId = array()
 
 $prix = array()
 
 $prix_ht = array()
 
 $prix_cat = array()
 
 $prix_cat_ht = array()
 
 $prix_avant_code_promo = array()
 
 $prix_ht_avant_code_promo = array()
 
 $total_prix = array()
 
 $total_prix_ht = array()
 
 $tva_percent = array()
 
 $tva = array()
 
 $percent_remise_produit = array()
 
 $remise = array()
 
 $remise_ht = array()
 
 $etat_stock = array()
 
 $delai_stock = array()
 
 $option = array()
 
 $option_ht = array()
 
 $email_check = array()
 
 $ecotaxe_ttc = array()
 
 $ecotaxe_ht = array()
 
 $attribut = array()
 
 $id_attribut = array()
 
 $total_prix_attribut = array()
 
 $reference = array()
 
 $total
 
 $total_ht
 
 $total_quantite
 
 $total_produit
 
 $total_produit_related_to_code_promo
 
 $total_ecotaxe_ttc_related_to_code_promo
 
 $total_produit_avant_code_promo
 
 $total_produit_ht
 
 $tva_total_produit
 
 $total_tva
 
 $total_poids
 
 $total_points
 
 $cout_transport
 
 $cout_transport_ht
 
 $tva_cout_transport
 
 $total_remise
 
 $total_remise_ht
 
 $tva_total_remise
 
 $total_option
 
 $total_option_ht
 
 $tva_total_option
 
 $code_promo
 
 $percent_remise_user
 
 $percent_code_promo
 
 $valeur_code_promo
 
 $total_reduction_code_promo
 
 $total_reduction_percent_code_promo
 
 $code_infos
 
 $avoir
 
 $avoir_user
 
 $pays
 
 $zone
 
 $zoneId
 
 $zoneTva
 
 $zoneFranco
 
 $zone_technical_code
 
 $type
 
 $typeId
 
 $apply_vat
 
 $payment_technical_code
 
 $tarif_paiement
 
 $tarif_paiement_ht
 
 $tva_tarif_paiement
 
 $total_ecotaxe_ttc
 
 $total_ecotaxe_ht
 
 $tva_total_ecotaxe
 
 $message_caddie
 
 $delivery_orderid
 
 $commande_id
 
 $commande_hash
 
 $conditionnement
 
 $pallet_count
 
 $global_percent_pallet_filled
 

Detailed Description

Definition at line 26 of file Caddie.php.

Member Function Documentation

_recalc_line_totals ( )

Recalcul des totaux en appliquant correctement les ventilations des codes promos.

Returns

Definition at line 1163 of file Caddie.php.

add_product ( $product_object,
  $added_quantity_wished,
  $email_check,
  $listcadeaux_owner = null,
  $custom_product_reference = null 
)

On ajoute un nouveau produit dans le panier.

Parameters
class$product_object
integer$quantite
string$email_check
string$listcadeaux_owner
string$custom_product_reference
Returns
Added quantity

Definition at line 322 of file Caddie.php.

affiche_erreur_caddie ( )

affiche_erreur_caddie()

Returns

Definition at line 298 of file Caddie.php.

Caddie (   $percent_remise_user)

Caddie::Caddie()

Parameters
mixed$percent_remise_user

Definition at line 179 of file Caddie.php.

change_line_data (   $numero_ligne,
  $product_id,
  $quantity_wished,
  $couleur_id,
  $taille_id,
  $email_check,
  $liste_attribut,
  $listcadeaux_owner = null,
  $do_update_line = true 
)

On met à jour une ligne de produit, en connaissant déjà son numéro.

Parameters
mixed$numero_ligne
mixed$product_id
mixed$quantity_wishedcontient la quantité global souhaitée pour la ligne. Si le module de stock est actif, c'est reservation_stock_temp qui fixera la quantité de la ligne.
mixed$couleur_id
mixed$taille_id
mixed$email_check
mixed$liste_attribut
mixed$listcadeaux_owner
mixed$do_update_line
Returns

Definition at line 405 of file Caddie.php.

change_lines_data ( $line_infos)

Caddie::change_lines_data()

Parameters
array$line_infosArray with all fields data
Returns

Definition at line 377 of file Caddie.php.

count_products (   $cat_id = null)

Renvoie le nombre d'articles dans le caddie (toujours positif)

We apply abs() for each item count in order to protect the calculation from eventual negative quantity values

Returns

Definition at line 771 of file Caddie.php.

delete_line (   $numero_ligne)

Enlève un produit du caddie.

Parameters
mixed$numero_ligne
Returns

Definition at line 597 of file Caddie.php.

get_available_point_for_current_line (   $this_line)

Caddie::get_available_point_for_current_line()

Parameters
integer$this_line
Returns

Definition at line 455 of file Caddie.php.

init (   $load_from_caddie_cookie_if_available = false,
  $erase_caddie_cookie = true 
)

Initialise le caddie.

Parameters
mixed$load_from_caddie_cookie_if_availableCharge les informations de caddie à partir du cookie si disponible
mixed$erase_caddie_cookieEfface les informations de caddie à partir du cookie si disponible
Returns

Definition at line 193 of file Caddie.php.

save_in_database ( $order_infos)

Enregistre la commande dans la base.

Parameters
mixed$order_infosThis array has all user infos related to the order
Returns

Definition at line 1222 of file Caddie.php.

set_paiement (   $payment_technical_code)

Traitement du moyen de paiement.

Parameters
integer$payment_technical_code
Returns

Definition at line 798 of file Caddie.php.

set_type (   $typeId)

Définition du type de port.

Parameters
integer$typeId
Returns

Definition at line 847 of file Caddie.php.

set_zone (   $zoneId)

Définition de la zone d'expédition.

Parameters
mixed$zoneId
Returns

Definition at line 820 of file Caddie.php.

update (   $percent_remise_user = null)

Cette méthode doit toujours être appelée après la modification (ou un ensemble de modifications) du caddie, avant son affichage Elle gère notamment la ventilation des codes promos en valeur, et l'application des codes promos en pourcentage.

Parameters
mixed$percent_remise_user
Returns

Definition at line 868 of file Caddie.php.

update_code_promo (   $new_code_promo = null)

Appeler cette fonction avec $new_code_promo="CODE" pour l'appliquer, $new_code_promo="" pour supprimer le code promo, ou avec $new_code_promo=null pour vérifier si code promo toujours bien applicable.

Parameters
mixed$new_code_promo
Returns

Definition at line 652 of file Caddie.php.

update_line (   $numero_ligne,
  $max_available_gift_points 
)

On recalcule les informations d'une ligne.

Parameters
integer$numero_ligne
integer$max_available_gift_points
Returns

Definition at line 478 of file Caddie.php.

Field Documentation

$apply_vat

Definition at line 145 of file Caddie.php.

$articles = array()

Definition at line 32 of file Caddie.php.

$attribut = array()

Definition at line 84 of file Caddie.php.

$avoir

Definition at line 134 of file Caddie.php.

$avoir_user

Definition at line 135 of file Caddie.php.

$code_infos

Definition at line 131 of file Caddie.php.

$code_promo

Definition at line 123 of file Caddie.php.

$commande_hash

Definition at line 166 of file Caddie.php.

$commande_id

Definition at line 165 of file Caddie.php.

$conditionnement

Definition at line 169 of file Caddie.php.

$couleurId = array()

Definition at line 40 of file Caddie.php.

$cout_transport

Definition at line 110 of file Caddie.php.

$cout_transport_ht

Definition at line 111 of file Caddie.php.

$delai_stock = array()

Definition at line 72 of file Caddie.php.

$delivery_orderid

Definition at line 162 of file Caddie.php.

$ecotaxe_ht = array()

Definition at line 82 of file Caddie.php.

$ecotaxe_ttc = array()

Definition at line 80 of file Caddie.php.

$email_check = array()

Definition at line 78 of file Caddie.php.

$etat_stock = array()

Definition at line 70 of file Caddie.php.

$giftlist_owners = array()

Definition at line 30 of file Caddie.php.

$global_percent_pallet_filled

Definition at line 171 of file Caddie.php.

$id_attribut = array()

Definition at line 85 of file Caddie.php.

$message_caddie

Definition at line 159 of file Caddie.php.

$option = array()

Definition at line 74 of file Caddie.php.

$option_ht = array()

Definition at line 76 of file Caddie.php.

$pallet_count

Definition at line 170 of file Caddie.php.

$payment_technical_code

Definition at line 147 of file Caddie.php.

$pays

Definition at line 137 of file Caddie.php.

$percent_code_promo

Definition at line 126 of file Caddie.php.

$percent_remise_produit = array()

Definition at line 64 of file Caddie.php.

$percent_remise_user

Definition at line 125 of file Caddie.php.

$poids = array()

Definition at line 36 of file Caddie.php.

$points = array()

Definition at line 38 of file Caddie.php.

$prix = array()

Definition at line 44 of file Caddie.php.

$prix_avant_code_promo = array()

Definition at line 52 of file Caddie.php.

$prix_cat = array()

Definition at line 48 of file Caddie.php.

$prix_cat_ht = array()

Definition at line 50 of file Caddie.php.

$prix_ht = array()

Definition at line 46 of file Caddie.php.

$prix_ht_avant_code_promo = array()

Definition at line 54 of file Caddie.php.

$quantite = array()

Definition at line 34 of file Caddie.php.

$reference = array()

Definition at line 88 of file Caddie.php.

$remise = array()

Definition at line 66 of file Caddie.php.

$remise_ht = array()

Definition at line 68 of file Caddie.php.

$tailleId = array()

Definition at line 42 of file Caddie.php.

$tarif_paiement

Definition at line 149 of file Caddie.php.

$tarif_paiement_ht

Definition at line 151 of file Caddie.php.

$total

Definition at line 92 of file Caddie.php.

$total_ecotaxe_ht

Definition at line 156 of file Caddie.php.

$total_ecotaxe_ttc

Definition at line 155 of file Caddie.php.

$total_ecotaxe_ttc_related_to_code_promo

Definition at line 99 of file Caddie.php.

$total_ht

Definition at line 94 of file Caddie.php.

$total_option

Definition at line 118 of file Caddie.php.

$total_option_ht

Definition at line 119 of file Caddie.php.

$total_poids

Definition at line 106 of file Caddie.php.

$total_points

Definition at line 108 of file Caddie.php.

$total_prix = array()

Definition at line 56 of file Caddie.php.

$total_prix_attribut = array()

Definition at line 86 of file Caddie.php.

$total_prix_ht = array()

Definition at line 58 of file Caddie.php.

$total_produit

Definition at line 97 of file Caddie.php.

$total_produit_avant_code_promo

Definition at line 100 of file Caddie.php.

$total_produit_ht

Definition at line 102 of file Caddie.php.

$total_produit_related_to_code_promo

Definition at line 98 of file Caddie.php.

$total_quantite

Definition at line 95 of file Caddie.php.

$total_reduction_code_promo

Definition at line 128 of file Caddie.php.

$total_reduction_percent_code_promo

Definition at line 129 of file Caddie.php.

$total_remise

Definition at line 114 of file Caddie.php.

$total_remise_ht

Definition at line 115 of file Caddie.php.

$total_tva

Definition at line 104 of file Caddie.php.

$tva = array()

Definition at line 62 of file Caddie.php.

$tva_cout_transport

Definition at line 112 of file Caddie.php.

$tva_percent = array()

Definition at line 60 of file Caddie.php.

$tva_tarif_paiement

Definition at line 153 of file Caddie.php.

$tva_total_ecotaxe

Definition at line 157 of file Caddie.php.

$tva_total_option

Definition at line 120 of file Caddie.php.

$tva_total_produit

Definition at line 103 of file Caddie.php.

$tva_total_remise

Definition at line 116 of file Caddie.php.

$type

Definition at line 143 of file Caddie.php.

$typeId

Definition at line 144 of file Caddie.php.

$valeur_code_promo

Definition at line 127 of file Caddie.php.

$zone

Definition at line 138 of file Caddie.php.

$zone_technical_code

Definition at line 142 of file Caddie.php.

$zoneFranco

Definition at line 141 of file Caddie.php.

$zoneId

Definition at line 139 of file Caddie.php.

$zoneTva

Definition at line 140 of file Caddie.php.


The documentation for this class was generated from the following file:

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