phil83

Utilisateur open source
  • Compteur de contenus

    118
  • Inscrit(e) le

  • Dernière visite


Tout ce qui a été posté par phil83

  1. phil83 a ajouté un message dans un sujet  email de comfirmation de commande   

    bonjour,

    ses pareil sur tous les paiements sa fait pareil !!!

    j'ai bien le mail de l'admin mais pas la comfirmation client !!

    je sais plus quoi faire


    merci pour l'aide
    • 0
  2. phil83 a ajouté un message dans un sujet  email de comfirmation de commande   

    :)
    • 0
  3. phil83 a ajouté un message dans un sujet  email de comfirmation de commande   

    ma version 3.9
    acheté en juillet 2007
    • 0
  4. phil83 a ajouté un message dans un sujet  email de comfirmation de commande   

    re-bonjour

    j'ai pourtant la fonctions dans :lib/fonctions/fonctions.php => function email_commande


    mail($com->email,$email_subject,$email_object,"FROM:$support");

    merci
    • 0
  5. phil83 a ajouté un message dans un sujet  email de comfirmation de commande   

    :( :)
    • 0
  6. phil83 a ajouté un message dans un sujet  email de comfirmation de commande   

    bonjour,

    voici la fonctions qui se trouve dans "fonction.php":


    function email_commande(&$commandeid) { global $wwwroot; global $site; global $support; global $langfile; $result = mysql_query("SELECT * FROM peel_commandes WHERE id ='".$commandeid."'"); $com = mysql_fetch_object($result); $timestamp = $com->o_timestamp; $montant = $com->montant; $goto = "/factures/facture_html.php?mode=proforma&id=$commandeid&timestamp=".urlencode($timestamp).""; $urlcommande = $wwwroot.$goto; # Mail d'information envoyé à l'administrateur - ENVOYER EN LANGUE FRANCAISE UNIQUEMENT mail( $support, "Nouvelle commande sur votre site web $site", "Une commande portant le numéro $commandeid vient d'être enregistrée sur le site $site.", "FROM:$support"); $email_subject = EMAIL_ORDER_CONFIRMATION; $email_object = EMAIL_ORDER_MESSAGE."\n\r"; $email_object .= "\n\r"; $email_object .= EMAIL_ORDER_DATE." : ".return_date_fr($timestamp)."\n\r"; $email_object .= "\n\r"; $email_object .= EMAIL_ORDER_NUMBER." : ".$commandeid."\n\r"; $email_object .= "\n\r"; $email_object .= EMAIL_ORDER_AMOUNT." : ".fprix($montant)." EUR TTC\n\r"; $email_object .= "\n\r"; if ($com->paiement != CB) { $email_object .= EMAIL_ORDER_PROFORMA." : ".$urlcommande."\n\r"; $email_object .= "\n\r"; } $email_object .= EMAIL_THANKS."\n\r"; mail($com->email,$email_subject,$email_object,"FROM:$support"); }

    je vois que la condition "CB" :) :(

    manque peut etre les autres conditions du style : espece,cheque,.... ?

    pour les modifications que j'ai fait plus haut, je remets comme à l'origine? (modif qui touche "fin_commande.php" )

    merci
    • 0
  7. phil83 a ajouté un message dans un sujet  email de comfirmation de commande   

    bonjour,
    bon j'ai sa comme fichier "fin_commande.php" :


    <? include("../configuration.inc.php"); necessite_identification(); /* Test pour empêcher d'arriver ici par hasard ou en tapant l'url */ $caddie_est_vide = $_SESSION['caddie']->compte_elements() == 0; $commande = charge_commande(); if ($caddie_est_vide || ! $commande) { header("Location: $wwwroot"); die; } /* Création de la commande dans la base, autorise alors le paiement * et informe le client que la commande est ok */ $commandeid = cree_commande($commande); $DOC_TITLE = "[PEEL.FR]"; $modele_a_montrer = "affichage_fin_succes()"; /* Le caddie est réinitialisé pour ne pas laisser le client passer une deuxième commande en soumettant une deuxième fois le formulaire */ $_SESSION['caddie']->init(); vide_commandeinfo(); unset ($_SESSION['wantsurl']); include("$repertoire_modele/haut.php"); eval($modele_a_montrer.";"); include("$repertoire_modele/bas.php");?> j'ai rajouter se qui a été dit ici : http://forum.peel.fr/index.php?showtopic=1...t=0&start=0 et sa donne sa : <? include("../configuration.inc.php"); necessite_identification(); /* Test pour empêcher d'arriver ici par hasard ou en tapant l'url */ $caddie_est_vide = $_SESSION['caddie']->compte_elements() == 0; $commande = charge_commande(); if ($caddie_est_vide || ! $commande) { header("Location: $wwwroot"); die; } /* Création de la commande dans la base, autorise alors le paiement * et informe le client que la commande est ok */ $commandeid = cree_commande($commande); $DOC_TITLE = "[PEEL.FR]"; $modele_a_montrer = "affichage_fin_succes()"; /* Le caddie est réinitialisé pour ne pas laisser le client passer une deuxième commande en soumettant une deuxième fois le formulaire */ $_SESSION['caddie']->init(); vide_commandeinfo(); unset ($_SESSION['wantsurl']); include("$repertoire_modele/haut.php"); eval($modele_a_montrer.";"); include("$repertoire_modele/bas.php"); /****************************************************************************** * FONCTIONS *****************************************************************************/ function affichage_fin_succes() { global $commandeid; global $wwwroot; global $paypal; global $site; global $support; $result = mysql_query("SELECT * FROM peel_commandes WHERE id ='".$commandeid."'"); $com = mysql_fetch_object($result); $message = "La commande $commandeid vient d'être enregistrée sur le site $site"; $message .= "\n\r"; $message .= "Email client : ".$com->email; $message .= "\n\r"; $message .= "Référence commande : ".$com->id; $message .= "\n\r"; $message .= "Montant de la commande : ".fprix($com->montant)." EUR"; $message .= "\n\r"; $message .= "Date de la commande : ".return_date_fr($com->o_timestamp); $message .= "\n\r"; $message .= "Paiement : ".$com->paiement; $message .= "\n\r"; $message .= "Merci de consulter l'interface d'administration de votre site."; mail($support,"[$site] Enregistrement de la commande $commandeid",$message,"FROM:$support"); ?> <font class="entete"><?echo STEP3 ?></font> <p></p> <div class="normal"> <?php echo MSG_THANKS; switch ($com->paiement) { case html_entity_decode(CHECK) : email_commande($commandeid); ?> <p> - <?echo PRINT_PROFORMA?></p> <p> - <?echo SEND_CHECK ?> : <?php print_societe(); echo "</p>"; break; case html_entity_decode(TRANSFER) : email_commande($commandeid); echo nl2br(SEND_TRANSFER); print_rib(); break; case html_entity_decode(PAYPAL) : ?> <div align="center"> Pour régler par carte bancaire, cliquez ici :<br /> <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <INPUT TYPE="hidden" NAME="cmd" VALUE="_ext-enter"> <INPUT TYPE="hidden" NAME="redirect_cmd" VALUE="_xclick"> <input type="hidden" name="business" value="<?=$paypal?>"> <input type="hidden" name="item_name" value="<?=$site?> COMMANDE <?=$commandeid?>"> <input type="hidden" name="item_number" value="<?=$commandeid?>"> <input type="hidden" name="amount" value="<?echo number_format($com->montant,2);?>"> <input type="hidden" name="page_style" value="Primary"> <input type="hidden" name="no_shipping" value="1"> <input type="hidden" name="return" value="<?=$wwwroot?>/modules/paypal/ok.php?id=<?=$commandeid?>"> <input type="hidden" name="cancel_return" value="<?=$wwwroot?>/modules/paypal/nok.php?id=<?=$commandeid?>"> <input type="hidden" name="no_note" value="1"> <input type="hidden" name="currency_code" value="EUR"> <input type="hidden" name="lc" value="FR"> <input TYPE="hidden" NAME="email" VALUE="<?=$com->email?>"> <input type="image" src="https://www.paypal.com/fr_FR/i/btn/x-click-but23.gif" border="0" name="submit" alt="Effectuez vos paiements via PayPal : une solution rapide, gratuite et sécurisée !"> </form> <br> <img src="<?=$wwwroot?>/images/logo-xclickBox.gif" width="152" height="29" alt="" border="0"> </div> <? break; } ?> <table class=normal width="100%" border="0" cellspacing="0" cellpadding="4" bgcolor="#ffffcc"> <tr><td class="label"><?echo ORDER_RESUME ?> :</td></tr> <tr> <td class="label"><?echo EMAIL ?> :</td> <td class="normal"><?=$com->email?></td> </tr> <tr> <td class="label"><?echo REFERENCE ?> :</td> <td class="normal"><?=$commandeid?></td> </tr> <tr> <td class="label"><?echo ORDER_AMOUNT ?> :</td> <td class="normal"><?=fprix($com->montant)?> €</td> </tr> <tr> <td class="label"><?echo ORDER_DATE ?> :</td> <td class="normal"><?=return_date_fr($com->o_timestamp)?></td> </tr> <tr> <td class="label"><?echo PAYEMENT ?> :</td> <td class="normal"><?=$com->paiement?></td> </tr> <tr> <td class="label"><?echo PROFORMA ?> :</td> <td class="normal"><a href="java script:OpenWin2('<?=$wwwroot?>/factures/facture_html.php?mode=proforma&id=<?=$commandeid?>&timestamp=<?=urlencode($com->o_timestamp)?>',550,450,'bdc');" class="normal"> <?echo PRINT_PROFORMA?></a>.</td> </tr> </table> <?php } ?> mais sa ne marche pas et ses meme pire puisque j'ai une erreur sa me dit : "Fatal error: Cannot redeclare affichage_fin_succes() (previously declared in /home/coeurdasie/domains/coeurdasie.fr/public_html/achat/fin_commande.php:46) in /home/coeurdasie/domains/coeurdasie.fr/public_html/modeles/default/template.php on line 1760" et ses vrai que la fonction se répéte: extrait fichier "template.php" function affichage_fin_succes() { global $commandeid; global $wwwroot; global $paypal; global $site; global $support; send_mail_order_admin($commandeid); $result = mysql_query("SELECT * FROM peel_commandes WHERE id ='".$commandeid."'"); $com = mysql_fetch_object($result); echo "<div class=\"entete\"><img src=\"$wwwroot/images/fleche.gif\" > ".STEP3."</div>"; ?> <div class="normal"> <?php echo MSG_THANKS; switch ($com->paiement) { case html_entity_decode(CHECK) : email_commande($commandeid); ?> <p> - <?echo PRINT_PROFORMA?></p> <p> - <?echo SEND_CHECK ?> : <?php print_societe(); echo "</p>"; break; case html_entity_decode(TRANSFER) : email_commande($commandeid); echo nl2br(SEND_TRANSFER); print_rib(); break; case html_entity_decode(PAYPAL) : ?> <div align="center"> Pour régler par carte bancaire, cliquez ici :<br /> <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <INPUT TYPE="hidden" NAME="cmd" VALUE="_ext-enter"> <INPUT TYPE="hidden" NAME="redirect_cmd" VALUE="_xclick"> <input type="hidden" name="business" value="<?=$paypal?>"> <input type="hidden" name="item_name" value="<?=$site?> COMMANDE <?=$commandeid?>"> <input type="hidden" name="item_number" value="<?=$commandeid?>"> <input type="hidden" name="amount" value="<?echo number_format($com->montant,2);?>"> <input type="hidden" name="page_style" value="Primary"> <input type="hidden" name="no_shipping" value="1"> <input type="hidden" name="return" value="<?=$wwwroot?>/modules/paypal/ok.php?id=<?=$commandeid?>"> <input type="hidden" name="cancel_return" value="<?=$wwwroot?>/modules/paypal/nok.php?id=<?=$commandeid?>"> <input type="hidden" name="no_note" value="1"> <input type="hidden" name="currency_code" value="<?php echo $_SESSION['devise']['code']?>"> <input type="hidden" name="lc" value="FR"> <input TYPE="hidden" NAME="email" VALUE="<?=$com->email?>"> <input type="image" src="https://www.paypal.com/fr_FR/i/btn/x-click-but23.gif" border="0" name="submit" alt="Effectuez vos paiements via PayPal : une solution rapide, gratuite et sécurisée !"> </form> <br> <img src="<?=$wwwroot?>/images/logo-xclickBox.gif" width="152" height="29" alt="" border="0"> </div> <? break; } echo "<div class=\"entete\">".ORDER_RESUME."</div>"; echo EMAIL." : ".$com->email."<br />"; echo REFERENCE." : ".$commandeid."<br />"; echo ORDER_AMOUNT." : ".fprix($com->montant)." ".$com->devise."<br />"; echo ORDER_DATE." : ".return_date_fr($com->o_timestamp)."<br />"; echo PAYEMENT." : ".$com->paiement ."<br />"; echo PROFORMA ?> : <a href="java script:OpenWin2('<?=$wwwroot?>/factures/facture_html.php?mode=proforma&id=<?=$commandeid?>&timestamp=<?=urlencode($com->o_timestamp)?>',550,450,'bdc');" class="normal"> <?php echo PRINT_PROFORMA?></a>. <?php }

    alors je sais plus, :)

    merci encore..
    • 0
  8. phil83 a ajouté un message dans un sujet  email de comfirmation de commande   

    bonjour,

    toujours pareil, j'ai bien le mail de l'administrateur mais le client na pas de mail de comfirmation

    :) :(

    merci
    • 0
  9. phil83 a ajouté un message dans un sujet  email de comfirmation de commande   

    :)
    • 0
  10. phil83 a ajouté un sujet dans Module PEEL Premium pour PEEL SHOPPING   

    email de comfirmation de commande
    Bonjour,

    Quand on passe une commande,
    L’administrateur reçoit bien l'email
    Mais pas le client

    Voici l'email de l'Admin.:

    La commande 15 vient d'�tre enregistr�e sur le site COEUR D ASIE

    Email client : xxxxxx@xxxxx.fr

    R�f�rence commande : 15

    Montant de la commande : 78,21 EUR

    Date de la commande : Samedi 27 octobre 2007

    Paiement : Contre remboursement

    Merci de consulter l'interface d'administration de votre site.

    Fin du email.

    J’ai regardé dans la fonction "cree_commande" de fonction.php
    Mais je vois pas :)

    Merci
    • 53 réponses
    • 14 627 vues
  11. phil83 a ajouté un message dans un sujet  problème commande   

    bonjour,

    nikel , merci willy, merci paulanna

    le problème était dans le fichiers "fonction.php"

    dans

    function cree_commande(&$commande)

    j'ai enlevé les champs

    encore merci a vous deux !!! :) :( ;)
    • 0
  12. phil83 a ajouté un message dans un sujet  problème commande   

    ?
    • 0
  13. phil83 a ajouté un message dans un sujet  problème commande (suite)   

    merci
    • 0
  14. phil83 a ajouté un message dans un sujet  problème commande (suite)   

    bonjour
    bon ben si quelqu'un peux me dire ou je peux joindre
    le webmaster du forum sa serais bien !!!

    parce que je ne peux toujours pas lire mes réponses a mon post : "problème commande" :)

    merci
    • 0
  15. phil83 a ajouté un sujet dans Module PEEL Premium pour PEEL SHOPPING   

    problème commande (suite)
    bonjour,
    je n'arrive plus a lire mes réponse sur mon sujet "problème commande" :)

    j'ai une ereur qui s'affiche au bout de 15 seconde environ

    erreur:

    Fatal error: Maximum execution time of 30 seconds exceeded in /home/admin/domains/peel.fr/public_html/forum/sources/classes/bbcode/class_bbcode_core.php on line 542


    si quelqu'un peut m'aider

    merci
    • 4 réponses
    • 3 025 vues
  16. phil83 a ajouté un message dans un sujet  problème commande   

    re-bonjour,

    nikel,j'ai en faite viré les champs que j'avais ajouter dans la fonction "place"

    extrait du code de "caddie.php":

    function place(
    $i,
    $produitid,
    $qte,
    $couleur,
    $taille,
    $couleurId,
    $tailleId,
    $prix_cat,
    $prix_cat_ht,
    $prix,
    $prix_ht,
    $total_prix,
    $total_prix_ht,
    $tva_percent,
    $tva,
    $poids,
    //$longueur_prod,
    //$largeur_prod,
    //$profondeur_prod,
    //$poids_prod,
    //$matiere_prod,
    //$couleur_prod,
    $points,
    $remise_produit_percent,
    $remise_produit,
    $etat_stock,
    $delivery_stock,
    $option,
    $email_check,
    $ecotaxe_ttc,
    $ecotaxe_ht) {

    if (isset($i)) {

    $this->articles[$i] = (int) $produitid;
    $this->quantite[$i] = $qte;
    $this->couleur[$i] = $couleur;
    $this->taille[$i] = $taille;
    $this->couleurId[$i] = $couleurId;
    $this->tailleId[$i] = $tailleId;
    $this->prix_cat[$i] = $prix_cat ;
    $this->prix_cat_ht[$i] = $prix_cat_ht ;
    $this->prix[$i] = $prix ;
    $this->prix_ht[$i] = $prix_ht ;
    $this->total_prix[$i] = $total_prix ;
    $this->total_prix_ht[$i] = $total_prix_ht ;
    $this->tva_percent[$i] = $tva_percent ;
    $this->tva[$i] = $tva;
    $this->poids[$i] = $poids;
    //$this->longueur_prod[$i] = $longueur_prod;
    //$this->largeur_prod[$i] = $largeur_prod;
    //$this->profondeur_prod[$i] = $profondeur_prod;
    //$this->poids_prod[$i] = $poids_prod;
    //$this->matiere_prod[$i] = $matiere_prod;
    //$this->couleur_prod[$i] = $couleur_prod;
    $this->points[$i] = $points;
    $this->remise_produit_percent[$i] = $remise_produit_percent;
    $this->remise_produit[$i] = $remise_produit ;
    $this->etat_stock[$i] = $etat_stock;
    $this->delivery_stock[$i] = $delivery_stock;
    $this->option[$i] = $option;
    $this->email_check[$i] = $email_check;
    $this->ecotaxe_ttc[] = $ecotaxe_ttc ;
    $this->ecotaxe_ht[] = $ecotaxe_ht ;

    }

    ksort($this->articles);
    ksort($this->quantite);
    ksort($this->couleur);
    ksort($this->taille);
    ksort($this->couleurId);
    ksort($this->tailleId);
    ksort($this->prix);
    ksort($this->prix_ht);
    ksort($this->total_prix);
    ksort($this->total_prix_ht);
    ksort($this->prix_cat);
    ksort($this->prix_cat_ht);
    ksort($this->tva_percent);
    ksort($this->tva);
    ksort($this->poids);
    //ksort($this->longueur_prod);
    //ksort($this->largeur_prod);
    //ksort($this->profondeur_prod);
    //ksort($this->poids_prod);
    //ksort($this->matiere_prod);
    //ksort($this->couleur_prod);
    ksort($this->points);
    ksort($this->remise_produit_percent);
    ksort($this->remise_produit);
    ksort($this->etat_stock);
    ksort($this->delivery_stock);
    ksort($this->option);
    ksort($this->email_check);
    ksort($this->ecotaxe_ttc);
    ksort($this->ecotaxe_ht);

    }
    ...............
    fin du code

    mais quand je valide ma commande j'ai un nouveau message d'erreur suivant :

    Une erreur de connexion à la base s est produite 775.
    Unknown column 'longueur_prod' in 'field list'

    j'ai ouvert le fichier "fin_commande.php" , je vois que on fait appel a une fonction "cree_commande"
    j'ai ouvert le fichier"fonctions.php" j'ai bien les champs déclarer

    les champs sont la , je comprend pas

    merci
    • 0
  17. phil83 a ajouté un message dans un sujet  problème commande   

    re-bonjour,

    nikel,j'ai en faite viré les champs que j'avais ajouter dans la fonction "place"

    extrait du code de "caddie.php":

    function place(
    $i,
    $produitid,
    $qte,
    $couleur,
    $taille,
    $couleurId,
    $tailleId,
    $prix_cat,
    $prix_cat_ht,
    $prix,
    $prix_ht,
    $total_prix,
    $total_prix_ht,
    $tva_percent,
    $tva,
    $poids,
    //$longueur_prod,
    //$largeur_prod,
    //$profondeur_prod,
    //$poids_prod,
    //$matiere_prod,
    //$couleur_prod,
    $points,
    $remise_produit_percent,
    $remise_produit,
    $etat_stock,
    $delivery_stock,
    $option,
    $email_check,
    $ecotaxe_ttc,
    $ecotaxe_ht) {

    if (isset($i)) {

    $this->articles[$i] = (int) $produitid;
    $this->quantite[$i] = $qte;
    $this->couleur[$i] = $couleur;
    $this->taille[$i] = $taille;
    $this->couleurId[$i] = $couleurId;
    $this->tailleId[$i] = $tailleId;
    $this->prix_cat[$i] = $prix_cat ;
    $this->prix_cat_ht[$i] = $prix_cat_ht ;
    $this->prix[$i] = $prix ;
    $this->prix_ht[$i] = $prix_ht ;
    $this->total_prix[$i] = $total_prix ;
    $this->total_prix_ht[$i] = $total_prix_ht ;
    $this->tva_percent[$i] = $tva_percent ;
    $this->tva[$i] = $tva;
    $this->poids[$i] = $poids;
    //$this->longueur_prod[$i] = $longueur_prod;
    //$this->largeur_prod[$i] = $largeur_prod;
    //$this->profondeur_prod[$i] = $profondeur_prod;
    //$this->poids_prod[$i] = $poids_prod;
    //$this->matiere_prod[$i] = $matiere_prod;
    //$this->couleur_prod[$i] = $couleur_prod;
    $this->points[$i] = $points;
    $this->remise_produit_percent[$i] = $remise_produit_percent;
    $this->remise_produit[$i] = $remise_produit ;
    $this->etat_stock[$i] = $etat_stock;
    $this->delivery_stock[$i] = $delivery_stock;
    $this->option[$i] = $option;
    $this->email_check[$i] = $email_check;
    $this->ecotaxe_ttc[] = $ecotaxe_ttc ;
    $this->ecotaxe_ht[] = $ecotaxe_ht ;

    }

    ksort($this->articles);
    ksort($this->quantite);
    ksort($this->couleur);
    ksort($this->taille);
    ksort($this->couleurId);
    ksort($this->tailleId);
    ksort($this->prix);
    ksort($this->prix_ht);
    ksort($this->total_prix);
    ksort($this->total_prix_ht);
    ksort($this->prix_cat);
    ksort($this->prix_cat_ht);
    ksort($this->tva_percent);
    ksort($this->tva);
    ksort($this->poids);
    //ksort($this->longueur_prod);
    //ksort($this->largeur_prod);
    //ksort($this->profondeur_prod);
    //ksort($this->poids_prod);
    //ksort($this->matiere_prod);
    //ksort($this->couleur_prod);
    ksort($this->points);
    ksort($this->remise_produit_percent);
    ksort($this->remise_produit);
    ksort($this->etat_stock);
    ksort($this->delivery_stock);
    ksort($this->option);
    ksort($this->email_check);
    ksort($this->ecotaxe_ttc);
    ksort($this->ecotaxe_ht);

    }
    ...............
    fin du code

    mais quand je valide ma commande j'ai un nouveau message d'erreur suivant :

    Une erreur de connexion à la base s est produite 775.
    Unknown column 'longueur_prod' in 'field list'

    j'ai ouvert le fichier "fin_commande.php" , je vois que on fait appel a une fonction "cree_commande"
    j'ai ouvert le fichier"fonctions.php" j'ai bien les champs déclarer

    fonction "cree_commande":

    function cree_commande(&$commande) {
    // Enregistre la commande dans la base

    global $normal;
    global $express;
    global $site;
    global $support;
    global $wwwroot;
    global $seuil;
    global $affiliate_rate;

    $remise = 0;

    $tab_pays1 = mysql_fetch_array(mysql_query("SELECT pays_".$_SESSION['langue']." FROM peel_pays WHERE id = '".$commande['pays1']."'"));

    // Constuit les infos du client en une chaîne
    // Addresse de facturation
    $client_info1 =
    $commande['client1']."\n"
    .$commande['adresse1']."\n"
    .$commande['code_postal1']."\n"
    .$commande['ville1']."\n"
    .$tab_pays1['pays_'.$_SESSION['langue'].'']."\n"
    .$commande['contact1']."\n"
    .$commande['email1']."\n";


    $coord1 = explode(" ", $commande['client1']);


    if (empty($commande['adresse2']) || empty($commande['code_postal2']) || empty($commande['ville2'])) {
    // Addresse de livraison
    $client_info2 =
    $commande['client1']."\n"
    .$commande['adresse1']."\n"
    .$commande['code_postal1']."\n"
    .$commande['ville1']."\n"
    .$_SESSION['caddie']->pays."\n"
    .$commande['contact1']."\n"
    .$commande['email1']."\n";

    } else {

    // Addresse de livraison
    $client_info2 =
    $commande['client2']."\n"
    .$commande['adresse2']."\n"
    .$commande['code_postal2']."\n"
    .$commande['ville2']."\n"
    .$_SESSION['caddie']->pays."\n"
    .$commande['contact2']."\n"
    .$commande['email2']."\n";

    }

    $coord1 = explode(" ", $commande['client1']);

    $coord2 = explode(" ", $commande['client2']);

    /* Le reversement affilié est calculé sur le total ht des produits */
    if (isset($_SESSION['affilie'])) {

    $affilie = 1;
    $statut_affilie = 0;
    $montant_affilie = $_SESSION['caddie']->total_produit_ht * $affiliate_rate/100;
    $id_affilie = intval($_SESSION['affilie']);

    } else {

    $affilie = 0;
    $montant_affilie = 0;
    $statut_affilie = 0;
    $id_affilie = 0;

    }


    $sql = "
    INSERT INTO peel_commandes (
    email
    , id_utilisateur
    , o_timestamp
    , a_timestamp

    , statut
    , statut_details

    , client_info1
    , client_info2
    , commentaires

    , montant
    , montant_ht
    , total_tva
    , tva_transport
    , total_produit_avant_promo
    , total_produit_avant_promo_ht

    , total_produit

    , type
    , zone
    , zone_tva
    , pays
    , transport
    , cout_transport
    , cout_transport_ht

    , lang
    , points
    , points_etat
    , poids
    , longueur_prod
    , largeur_prod
    , profondeur_prod
    , poids_prod
    , matiere_prod
    , couleur_prod

    , affilie
    , montant_affilie
    , statut_affilie
    , id_affilie

    , remise_produit
    , remise_produit_ht

    , remise_client
    , remise_client_ht
    , remise_client_percent

    , remise_groupe
    , remise_groupe_ht
    , remise_groupe_percent



    , remise_code
    , remise_code_ht
    , remise_code_percent
    , code_promo

    , code_cheque_cadeau
    , remise_cheque
    , remise_cheque_ht

    , code_bon
    , remise_bon
    , remise_bon_ht

    , avoir

    , paiement
    , tarif_paiement

    , prenom_bill
    , nom_bill
    , adresse_bill
    , zip_bill
    , ville_bill
    , pays_bill
    , email_bill
    , telephone_bill
    , prenom_ship
    , nom_ship
    , adresse_ship
    , zip_ship
    , ville_ship
    , pays_ship
    , email_ship
    , telephone_ship

    , id_parrain
    , parrain

    , total_ecotaxe_ttc
    , total_ecotaxe_ht
    , devise

    ) VALUES (
    '{$_SESSION['utilisateur']['email']}'
    ,'".intval($_SESSION['utilisateur']['id_utilisateur'])."'
    ,now()
    ,now()
    ,0
    ,'commande initialisée'
    ,'".htmlspecialchars($client_info1, ENT_QUOTES)."'
    ,'".htmlspecialchars($client_info2, ENT_QUOTES)."'
    ,'".htmlspecialchars($commande['commentaires'], ENT_QUOTES)."'
    ,'".$_SESSION['caddie']->total."'
    ,'".$_SESSION['caddie']->total_ht."'
    ,'".$_SESSION['caddie']->total_tva."'
    ,'".$_SESSION['caddie']->tva_transport."'
    ,'".$_SESSION['caddie']->total_produit_avant_promo."'
    ,'".$_SESSION['caddie']->total_produit_avant_promo_ht."'
    ,'".$_SESSION['caddie']->total_produit."'
    ,'".htmlspecialchars($_SESSION['caddie']->type,ENT_QUOTES)."'
    ,'".htmlspecialchars($_SESSION['caddie']->zone,ENT_QUOTES)."'
    ,'".intval($_SESSION['caddie']->zoneTva)."'
    ,'".htmlspecialchars($_SESSION['caddie']->pays,ENT_QUOTES)."'
    ,'".htmlspecialchars($_SESSION['caddie']->zone,ENT_QUOTES)." - ".htmlspecialchars($_SESSION['caddie']->type,ENT_QUOTES)."'
    ,'".$_SESSION['caddie']->cout_transport."'
    ,'".$_SESSION['caddie']->cout_transport_ht."'
    ,'".$_SESSION['langue']."'
    ,'".$_SESSION['caddie']->total_points."'
    ,'0'
    ,'".$_SESSION['caddie']->total_poids."'
    ,'".$_SESSION['caddie']->longueur_prod."'
    ,'".$_SESSION['caddie']->largeur_prod."'
    ,'".$_SESSION['caddie']->profondeur_prod."'
    ,'".$_SESSION['caddie']->poids_prod."'
    ,'".$_SESSION['caddie']->matiere_prod."'
    ,'".$_SESSION['caddie']->couleur_prod."'
    ,'".$affilie."'
    ,'".$montant_affilie."'
    ,'".$statut_affilie."'
    ,'".$id_affilie."'

    ,'".$_SESSION['caddie']->total_remise_produit."'
    ,'".$_SESSION['caddie']->total_remise_produit_ht."'
    ,'".$_SESSION['caddie']->total_remise_client."'
    ,'".$_SESSION['caddie']->total_remise_client_ht."'
    ,'".$_SESSION['caddie']->remise_client_percent."'

    ,'".$_SESSION['caddie']->total_remise_groupe."'
    ,'".$_SESSION['caddie']->total_remise_groupe_ht."'
    ,'".$_SESSION['caddie']->remise_groupe_percent."'

    ,'".$_SESSION['caddie']->total_remise_code."'
    ,'".$_SESSION['caddie']->total_remise_code_ht."'
    ,'".$_SESSION['caddie']->remise_code_percent."'
    ,'".htmlspecialchars($_SESSION['caddie']->code_promo,ENT_QUOTES)."'

    ,'".htmlspecialchars($_SESSION['caddie']->code_cheque,ENT_QUOTES)."'
    ,'".$_SESSION['caddie']->total_remise_cheque."'
    ,'".$_SESSION['caddie']->total_remise_cheque_ht."'

    ,'".htmlspecialchars($_SESSION['caddie']->code_bon,ENT_QUOTES)."'
    ,'".$_SESSION['caddie']->total_remise_bon."'
    ,'".$_SESSION['caddie']->total_remise_bon_ht."'

    ,'".$_SESSION['caddie']->avoir."'

    ,'".htmlspecialchars($_SESSION['caddie']->paiement,ENT_QUOTES)."'
    ,'".$_SESSION['caddie']->tarif_paiement."'
    , '".htmlspecialchars(vb($coord1[0]),ENT_QUOTES)."'
    , '".htmlspecialchars(vb($coord1[1]),ENT_QUOTES)."'
    , '".htmlspecialchars($commande['adresse1'],ENT_QUOTES)."'
    , '".htmlspecialchars($commande['code_postal1'])."'
    , '".htmlspecialchars($commande['ville1'],ENT_QUOTES)."'
    , '".htmlspecialchars($tab_pays1['pays_'.$_SESSION['langue'].''],ENT_QUOTES)."'
    , '".htmlspecialchars($commande['email1'])."'
    , '".htmlspecialchars($commande['contact1'])."'
    , '".htmlspecialchars(vb($coord2[0]),ENT_QUOTES)."'
    , '".htmlspecialchars(vb($coord2[1]),ENT_QUOTES)."'
    , '".htmlspecialchars($commande['adresse2'],ENT_QUOTES)."'
    , '".htmlspecialchars($commande['code_postal2'])."'
    , '".htmlspecialchars($commande['ville2'],ENT_QUOTES)."'
    , '".htmlspecialchars($_SESSION['caddie']->pays,ENT_QUOTES)."'
    , '".htmlspecialchars($commande['email2'])."'
    , '".htmlspecialchars($commande['contact2'])."'

    ,'".vn($_SESSION['utilisateur']['id_parrain'])."'
    ,'".vb($_SESSION['utilisateur']['type'])."'

    ,'".$_SESSION['caddie']->total_ecotaxe_ttc."'
    ,'".$_SESSION['caddie']->total_ecotaxe_ht."'

    ,'".$_SESSION['devise']['symbole']."'
    )";


    $qid = mysql_query($sql) or DIE('Une erreur de connexion à la base s est produite ' . __LINE__ . '.<p>' . MYSQL_ERROR());

    $commandeid = mysql_insert_id();

    mysql_query("UPDATE peel_utilisateurs SET avoir = avoir - '".vn($_SESSION['caddie']->avoir)."' WHERE id_utilisateur = '".intval($_SESSION['utilisateur']['id_utilisateur'])."'");


    if (isset($_SESSION['affilie'])) {

    mysql_query("INSERT INTO peel_utilisateurs_commandes (utilisateur_id, commande_id) VALUES ('".$_SESSION['affilie']."', '".$commandeid."')");

    }


    if (!empty($_SESSION['caddie']->code_cheque)) {

    mysql_query("UPDATE peel_cheques_cadeaux SET a_timestamp = now(), etat = '0' WHERE code = '".$_SESSION['caddie']->code_cheque."'");

    }


    /* ajout des articles à la table commandes_articles */
    foreach ($_SESSION['caddie']->articles as $i => $produitid) {

    $qid = mysql_query("SELECT * FROM peel_produits WHERE id= '$produitid'");

    if ($qid) {

    if (mysql_num_rows($qid) > 0) {

    $article=mysql_fetch_array($qid);

    if ($article['on_stock'] == 1) {

    $c = mysql_fetch_array(mysql_query("SELECT id FROM peel_couleurs WHERE nom_".$_SESSION['langue']." = '".$_SESSION['caddie']->couleur[$i]."'"));

    $t = mysql_fetch_array(mysql_query("SELECT id FROM peel_tailles WHERE nom_".$_SESSION['langue']." = '".$_SESSION['caddie']->taille[$i]."'"));

    $s = mysql_fetch_array(mysql_query("SELECT stock FROM peel_stocks WHERE produit_id = '".$article['id']."' AND couleur_id = '".vn($c['id'])."' AND taille_id = '".vn($t['id'])."'"));

    $stock = $s['stock'] - $_SESSION['caddie']->quantite[$i];

    if ($stock >= 0) { $stock_restant = $stock; } else { $stock_restant = 0; }

    if ($stock < 0) {

    $stock_to_order = $_SESSION['caddie']->quantite[$i] - $s['stock'] ; /* Calcul le stock restant à commander */

    mysql_query("UPDATE peel_commandes SET statut = '9' WHERE id = '".$commandeid."'"); /* Passage de la commande en stand by */

    } else {

    $stock_to_order = 0;

    }

    mysql_query("UPDATE peel_stocks SET stock = ".$stock_restant." WHERE produit_id = '".$article['id']."' AND couleur_id = '".vn($c['id'])."' AND taille_id = '".vn($t['id'])."'");

    $sqlStockTemp = "SELECT stock, qte FROM peel_stocks_temp WHERE produit_id = '".$article['id']."' AND couleur_id = '".vn($c['id'])."' AND taille_id = '".vn($t['id'])."'";

    $resStockTemp = mysql_query($sqlStockTemp);

    $StockTemp = mysql_fetch_array($resStockTemp);

    if ($StockTemp['qte'] == $_SESSION['caddie']->quantite[$i]) {

    mysql_query("DELETE FROM peel_stocks_temp WHERE produit_id = '".$article['id']."' AND couleur_id = '".vn($c['id'])."' AND taille_id = '".vn($t['id'])."'");

    } else {

    mysql_query("UPDATE peel_stocks_temp SET stock = ".$stock_restant.", qte = qte - ".$_SESSION['caddie']->quantite[$i].", o_timestamp = now() WHERE produit_id = '".$article['id']."' AND couleur_id = '".vn($c['id'])."' AND taille_id = '".vn($t['id'])."'");


    }


    if ($s['stock'] <= $seuil) {

    mail("$support","[$site] Notification d'alerte STOCK","Seuil d'alerte atteint pour le produit ".html_entity_decode($article['nom_'.$_SESSION['langue'].''])."\n\r Couleur : ".$_SESSION['caddie']->couleur[$i]."\n\r Taille : ".$_SESSION['caddie']->taille[$i]."\n\r Stock restant : ".$s['stock']."\n\r","FROM:$support");

    }

    }


    $statut_envoi = ($article['on_download'] == 1) ? "En attente" : "";

    $ecotaxe_ttc = $_SESSION['caddie']->ecotaxe_ttc[$i] * $_SESSION['caddie']->quantite[$i];

    $ecotaxe_ht = $_SESSION['caddie']->ecotaxe_ht[$i] * $_SESSION['caddie']->quantite[$i];

    $total_prix_ttc = $ecotaxe_ttc + $_SESSION['caddie']->total_prix[$i];

    $total_prix_ht = $ecotaxe_ht + $_SESSION['caddie']->total_prix_ht[$i];


    $requete = "INSERT INTO peel_commandes_articles (
    commande_id
    , produit_id
    , nom_produit
    , prix_cat
    , prix_cat_ht
    , prix
    , prix_ht
    , total_prix
    , total_prix_ht
    , quantite
    , promotion
    , remise_produit
    , tva
    , tva_percent
    , couleur
    , taille
    , option_prix
    , delivery_stock
    , order_stock
    , points
    , poids
    , longueur_prod
    , largeur_prod
    , profondeur_prod
    , poids_prod
    , matiere_prod
    , couleur_prod
    , email_check
    , on_download
    , statut_envoi
    , nb_envoi
    , nb_download
    , ecotaxe_ttc
    , ecotaxe_ht
    ) VALUES (
    '$commandeid'
    ,'".$article['id']."'
    ,'".htmlspecialchars($article['nom_'.$_SESSION['langue'].''], ENT_QUOTES)."'
    ,'".$_SESSION['caddie']->prix_cat[$i]."'
    ,'".$_SESSION['caddie']->prix_cat_ht[$i]."'
    ,'".$_SESSION['caddie']->prix[$i]."'
    ,'".$_SESSION['caddie']->prix_ht[$i]."'
    ,'".$total_prix_ttc."'
    ,'".$total_prix_ht."'
    ,'".$_SESSION['caddie']->quantite[$i]."'
    ,'".$_SESSION['caddie']->remise_produit_percent[$i]."'
    ,'".$_SESSION['caddie']->remise_produit[$i]."'
    ,'".$_SESSION['caddie']->tva[$i]."'
    ,'".$_SESSION['caddie']->tva_percent[$i]."'
    ,'".htmlspecialchars($_SESSION['caddie']->couleur[$i])."'
    ,'".htmlspecialchars($_SESSION['caddie']->taille[$i])."'
    ,'".htmlspecialchars($_SESSION['caddie']->option[$i])."'
    ,'".htmlspecialchars($_SESSION['caddie']->delivery_stock[$i])."'
    ,'".intval(vn($stock_to_order))."'
    ,'".htmlspecialchars($_SESSION['caddie']->points[$i])."'
    ,'".htmlspecialchars($_SESSION['caddie']->poids[$i])."'
    ,'".htmlspecialchars($_SESSION['caddie']->longueur_prod[$i])."'
    ,'".htmlspecialchars($_SESSION['caddie']->largeur_prod[$i])."'
    ,'".htmlspecialchars($_SESSION['caddie']->profondeur_prod[$i])."'
    ,'".htmlspecialchars($_SESSION['caddie']->poids_prod[$i])."'
    ,'".htmlspecialchars($_SESSION['caddie']->matiere_prod[$i])."'
    ,'".htmlspecialchars($_SESSION['caddie']->couleur_prod[$i])."'
    ,'".htmlspecialchars($_SESSION['caddie']->email_check[$i])."'
    ,'".intval($article['on_download'])."'
    ,'".$statut_envoi."'
    ,'0'
    ,'0'
    ,'".$ecotaxe_ttc."'
    ,'".$ecotaxe_ht."'
    )" ;

    mysql_query($requete) or DIE('Une erreur de connexion à la base s est produite ' . __LINE__ . '.<p>' . MYSQL_ERROR());

    if (!empty($_SESSION['caddie']->email_check[$i])) {

    $code = strtoupper(MDP());

    $email_client = $_SESSION['utilisateur']['email'];

    $email_ami = $_SESSION['caddie']->email_check[$i];

    /* Mode production : mettre l'état à 0 et passer les fonctions mails dans la liste des chèques cadeaux */


    mysql_query("INSERT INTO peel_cheques_cadeaux (
    id_utilisateur,
    email_acheteur,
    email_ami,
    nom_produit,
    code,
    remise_cheque,
    o_timestamp,
    seuil,
    etat
    ) VALUES (
    '".intval($_SESSION['utilisateur']['id_utilisateur'])."',
    '$email_client',
    '$email_ami',
    '".htmlspecialchars($article['nom_'.$_SESSION['langue'].''], ENT_QUOTES)."',
    '".$code."',
    '".$_SESSION['caddie']->prix[$i]."',
    now(),
    '".$_SESSION['caddie']->prix[$i]."',
    '1')")
    or DIE('Une erreur de connexion à la base s est produite ' . __LINE__ . '.<p>' . MYSQL_ERROR());


    $message = "Bonjour,\n\r";
    $message .= "Votre ami ".$_SESSION['utilisateur']['prenom']." ".$_SESSION['utilisateur']['nom_famille']." a souhaité vous offrir un chèque cadeau sur le site $site.\n\r";
    $message .= "Pour en bénéficier, connectez vous simplement au site $wwwroot et utilisez votre code $code.\n\rVous bénéficierez alors d'un avoir de ".$_SESSION['caddie']->prix[$i]." EURO TTC sur votre commande.\n\r";
    $message .= "A bientôt sur $site.";

    mail($email_ami,"[$site] ".$_SESSION['utilisateur']['email']." vous offre un chèque cadeau",$message,"FROM:$email_client");
    mail($email_client ,"[$site - copie du message envoyé à ".$_SESSION['caddie']->email_check[$i]."] ".$_SESSION['utilisateur']['email']." vous offre un chèque cadeau",$message,"FROM:$support");

    $message_support = "Bonjour,\n\rLe code chèque cadeau $code vient d'être créé sur $site.\n\r Merci de le valider à réception du règlement.";
    mail($support ,"[$site] Création d'un chèque cadeau à valider",$message_support,"FROM:$support");

    }


    }
    }
    }


    /* Annule la remise en % du client, supprimer ces lignes si vous souhaitez que les remises client soient permanentes */
    mysql_query("UPDATE peel_utilisateurs SET remise_percent = '0', avoir = '0' WHERE id_utilisateur = '".$_SESSION['utilisateur']['id_utilisateur']."'");

    $_SESSION['utilisateur']['remise_percent'] = 0;
    $_SESSION['utilisateur']['avoir'] = 0;
    $_SESSION['utilisateur']['id_parrain'] = 0;
    $_SESSION['utilisateur']['type'] = ''; #- Suppression du statut filleul

    return $commandeid;

    }
    fin de la fontion.

    les champs sont la , je comprend pas

    merci
    • 0
  18. phil83 a ajouté un message dans un sujet  problème commande   

    re-bonjour,

    nikel,j'ai en faite viré les champs que j'avais ajouter dans la fonction "place"

    extrait du code de "caddie.php":

    function place(
    $i,
    $produitid,
    $qte,
    $couleur,
    $taille,
    $couleurId,
    $tailleId,
    $prix_cat,
    $prix_cat_ht,
    $prix,
    $prix_ht,
    $total_prix,
    $total_prix_ht,
    $tva_percent,
    $tva,
    $poids,
    //$longueur_prod,
    //$largeur_prod,
    //$profondeur_prod,
    //$poids_prod,
    //$matiere_prod,
    //$couleur_prod,
    $points,
    $remise_produit_percent,
    $remise_produit,
    $etat_stock,
    $delivery_stock,
    $option,
    $email_check,
    $ecotaxe_ttc,
    $ecotaxe_ht) {

    if (isset($i)) {

    $this->articles[$i] = (int) $produitid;
    $this->quantite[$i] = $qte;
    $this->couleur[$i] = $couleur;
    $this->taille[$i] = $taille;
    $this->couleurId[$i] = $couleurId;
    $this->tailleId[$i] = $tailleId;
    $this->prix_cat[$i] = $prix_cat ;
    $this->prix_cat_ht[$i] = $prix_cat_ht ;
    $this->prix[$i] = $prix ;
    $this->prix_ht[$i] = $prix_ht ;
    $this->total_prix[$i] = $total_prix ;
    $this->total_prix_ht[$i] = $total_prix_ht ;
    $this->tva_percent[$i] = $tva_percent ;
    $this->tva[$i] = $tva;
    $this->poids[$i] = $poids;
    //$this->longueur_prod[$i] = $longueur_prod;
    //$this->largeur_prod[$i] = $largeur_prod;
    //$this->profondeur_prod[$i] = $profondeur_prod;
    //$this->poids_prod[$i] = $poids_prod;
    //$this->matiere_prod[$i] = $matiere_prod;
    //$this->couleur_prod[$i] = $couleur_prod;
    $this->points[$i] = $points;
    $this->remise_produit_percent[$i] = $remise_produit_percent;
    $this->remise_produit[$i] = $remise_produit ;
    $this->etat_stock[$i] = $etat_stock;
    $this->delivery_stock[$i] = $delivery_stock;
    $this->option[$i] = $option;
    $this->email_check[$i] = $email_check;
    $this->ecotaxe_ttc[] = $ecotaxe_ttc ;
    $this->ecotaxe_ht[] = $ecotaxe_ht ;

    }

    ksort($this->articles);
    ksort($this->quantite);
    ksort($this->couleur);
    ksort($this->taille);
    ksort($this->couleurId);
    ksort($this->tailleId);
    ksort($this->prix);
    ksort($this->prix_ht);
    ksort($this->total_prix);
    ksort($this->total_prix_ht);
    ksort($this->prix_cat);
    ksort($this->prix_cat_ht);
    ksort($this->tva_percent);
    ksort($this->tva);
    ksort($this->poids);
    //ksort($this->longueur_prod);
    //ksort($this->largeur_prod);
    //ksort($this->profondeur_prod);
    //ksort($this->poids_prod);
    //ksort($this->matiere_prod);
    //ksort($this->couleur_prod);
    ksort($this->points);
    ksort($this->remise_produit_percent);
    ksort($this->remise_produit);
    ksort($this->etat_stock);
    ksort($this->delivery_stock);
    ksort($this->option);
    ksort($this->email_check);
    ksort($this->ecotaxe_ttc);
    ksort($this->ecotaxe_ht);

    }
    ...............
    fin du code

    mais quand je valide ma commande j'ai un nouveau message d'erreur suivant :

    Une erreur de connexion à la base s est produite 775.
    Unknown column 'longueur_prod' in 'field list'

    j'ai ouvert le fichier "fin_commande.php" , je vois que on fait appel a une fonction "cree_commande"
    j'ai ouvert le fichier"fonctions.php" j'ai bien les champs déclarer

    fonction "cree_commande":

    function cree_commande(&$commande) {
    // Enregistre la commande dans la base

    global $normal;
    global $express;
    global $site;
    global $support;
    global $wwwroot;
    global $seuil;
    global $affiliate_rate;

    $remise = 0;

    $tab_pays1 = mysql_fetch_array(mysql_query("SELECT pays_".$_SESSION['langue']." FROM peel_pays WHERE id = '".$commande['pays1']."'"));

    // Constuit les infos du client en une chaîne
    // Addresse de facturation
    $client_info1 =
    $commande['client1']."\n"
    .$commande['adresse1']."\n"
    .$commande['code_postal1']."\n"
    .$commande['ville1']."\n"
    .$tab_pays1['pays_'.$_SESSION['langue'].'']."\n"
    .$commande['contact1']."\n"
    .$commande['email1']."\n";


    $coord1 = explode(" ", $commande['client1']);


    if (empty($commande['adresse2']) || empty($commande['code_postal2']) || empty($commande['ville2'])) {
    // Addresse de livraison
    $client_info2 =
    $commande['client1']."\n"
    .$commande['adresse1']."\n"
    .$commande['code_postal1']."\n"
    .$commande['ville1']."\n"
    .$_SESSION['caddie']->pays."\n"
    .$commande['contact1']."\n"
    .$commande['email1']."\n";

    } else {

    // Addresse de livraison
    $client_info2 =
    $commande['client2']."\n"
    .$commande['adresse2']."\n"
    .$commande['code_postal2']."\n"
    .$commande['ville2']."\n"
    .$_SESSION['caddie']->pays."\n"
    .$commande['contact2']."\n"
    .$commande['email2']."\n";

    }

    $coord1 = explode(" ", $commande['client1']);

    $coord2 = explode(" ", $commande['client2']);

    /* Le reversement affilié est calculé sur le total ht des produits */
    if (isset($_SESSION['affilie'])) {

    $affilie = 1;
    $statut_affilie = 0;
    $montant_affilie = $_SESSION['caddie']->total_produit_ht * $affiliate_rate/100;
    $id_affilie = intval($_SESSION['affilie']);

    } else {

    $affilie = 0;
    $montant_affilie = 0;
    $statut_affilie = 0;
    $id_affilie = 0;

    }


    $sql = "
    INSERT INTO peel_commandes (
    email
    , id_utilisateur
    , o_timestamp
    , a_timestamp

    , statut
    , statut_details

    , client_info1
    , client_info2
    , commentaires

    , montant
    , montant_ht
    , total_tva
    , tva_transport
    , total_produit_avant_promo
    , total_produit_avant_promo_ht

    , total_produit

    , type
    , zone
    , zone_tva
    , pays
    , transport
    , cout_transport
    , cout_transport_ht

    , lang
    , points
    , points_etat
    , poids
    , longueur_prod
    , largeur_prod
    , profondeur_prod
    , poids_prod
    , matiere_prod
    , couleur_prod

    , affilie
    , montant_affilie
    , statut_affilie
    , id_affilie

    , remise_produit
    , remise_produit_ht

    , remise_client
    , remise_client_ht
    , remise_client_percent

    , remise_groupe
    , remise_groupe_ht
    , remise_groupe_percent



    , remise_code
    , remise_code_ht
    , remise_code_percent
    , code_promo

    , code_cheque_cadeau
    , remise_cheque
    , remise_cheque_ht

    , code_bon
    , remise_bon
    , remise_bon_ht

    , avoir

    , paiement
    , tarif_paiement

    , prenom_bill
    , nom_bill
    , adresse_bill
    , zip_bill
    , ville_bill
    , pays_bill
    , email_bill
    , telephone_bill
    , prenom_ship
    , nom_ship
    , adresse_ship
    , zip_ship
    , ville_ship
    , pays_ship
    , email_ship
    , telephone_ship

    , id_parrain
    , parrain

    , total_ecotaxe_ttc
    , total_ecotaxe_ht
    , devise

    ) VALUES (
    '{$_SESSION['utilisateur']['email']}'
    ,'".intval($_SESSION['utilisateur']['id_utilisateur'])."'
    ,now()
    ,now()
    ,0
    ,'commande initialisée'
    ,'".htmlspecialchars($client_info1, ENT_QUOTES)."'
    ,'".htmlspecialchars($client_info2, ENT_QUOTES)."'
    ,'".htmlspecialchars($commande['commentaires'], ENT_QUOTES)."'
    ,'".$_SESSION['caddie']->total."'
    ,'".$_SESSION['caddie']->total_ht."'
    ,'".$_SESSION['caddie']->total_tva."'
    ,'".$_SESSION['caddie']->tva_transport."'
    ,'".$_SESSION['caddie']->total_produit_avant_promo."'
    ,'".$_SESSION['caddie']->total_produit_avant_promo_ht."'
    ,'".$_SESSION['caddie']->total_produit."'
    ,'".htmlspecialchars($_SESSION['caddie']->type,ENT_QUOTES)."'
    ,'".htmlspecialchars($_SESSION['caddie']->zone,ENT_QUOTES)."'
    ,'".intval($_SESSION['caddie']->zoneTva)."'
    ,'".htmlspecialchars($_SESSION['caddie']->pays,ENT_QUOTES)."'
    ,'".htmlspecialchars($_SESSION['caddie']->zone,ENT_QUOTES)." - ".htmlspecialchars($_SESSION['caddie']->type,ENT_QUOTES)."'
    ,'".$_SESSION['caddie']->cout_transport."'
    ,'".$_SESSION['caddie']->cout_transport_ht."'
    ,'".$_SESSION['langue']."'
    ,'".$_SESSION['caddie']->total_points."'
    ,'0'
    ,'".$_SESSION['caddie']->total_poids."'
    ,'".$_SESSION['caddie']->longueur_prod."'
    ,'".$_SESSION['caddie']->largeur_prod."'
    ,'".$_SESSION['caddie']->profondeur_prod."'
    ,'".$_SESSION['caddie']->poids_prod."'
    ,'".$_SESSION['caddie']->matiere_prod."'
    ,'".$_SESSION['caddie']->couleur_prod."'
    ,'".$affilie."'
    ,'".$montant_affilie."'
    ,'".$statut_affilie."'
    ,'".$id_affilie."'

    ,'".$_SESSION['caddie']->total_remise_produit."'
    ,'".$_SESSION['caddie']->total_remise_produit_ht."'
    ,'".$_SESSION['caddie']->total_remise_client."'
    ,'".$_SESSION['caddie']->total_remise_client_ht."'
    ,'".$_SESSION['caddie']->remise_client_percent."'

    ,'".$_SESSION['caddie']->total_remise_groupe."'
    ,'".$_SESSION['caddie']->total_remise_groupe_ht."'
    ,'".$_SESSION['caddie']->remise_groupe_percent."'

    ,'".$_SESSION['caddie']->total_remise_code."'
    ,'".$_SESSION['caddie']->total_remise_code_ht."'
    ,'".$_SESSION['caddie']->remise_code_percent."'
    ,'".htmlspecialchars($_SESSION['caddie']->code_promo,ENT_QUOTES)."'

    ,'".htmlspecialchars($_SESSION['caddie']->code_cheque,ENT_QUOTES)."'
    ,'".$_SESSION['caddie']->total_remise_cheque."'
    ,'".$_SESSION['caddie']->total_remise_cheque_ht."'

    ,'".htmlspecialchars($_SESSION['caddie']->code_bon,ENT_QUOTES)."'
    ,'".$_SESSION['caddie']->total_remise_bon."'
    ,'".$_SESSION['caddie']->total_remise_bon_ht."'

    ,'".$_SESSION['caddie']->avoir."'

    ,'".htmlspecialchars($_SESSION['caddie']->paiement,ENT_QUOTES)."'
    ,'".$_SESSION['caddie']->tarif_paiement."'
    , '".htmlspecialchars(vb($coord1[0]),ENT_QUOTES)."'
    , '".htmlspecialchars(vb($coord1[1]),ENT_QUOTES)."'
    , '".htmlspecialchars($commande['adresse1'],ENT_QUOTES)."'
    , '".htmlspecialchars($commande['code_postal1'])."'
    , '".htmlspecialchars($commande['ville1'],ENT_QUOTES)."'
    , '".htmlspecialchars($tab_pays1['pays_'.$_SESSION['langue'].''],ENT_QUOTES)."'
    , '".htmlspecialchars($commande['email1'])."'
    , '".htmlspecialchars($commande['contact1'])."'
    , '".htmlspecialchars(vb($coord2[0]),ENT_QUOTES)."'
    , '".htmlspecialchars(vb($coord2[1]),ENT_QUOTES)."'
    , '".htmlspecialchars($commande['adresse2'],ENT_QUOTES)."'
    , '".htmlspecialchars($commande['code_postal2'])."'
    , '".htmlspecialchars($commande['ville2'],ENT_QUOTES)."'
    , '".htmlspecialchars($_SESSION['caddie']->pays,ENT_QUOTES)."'
    , '".htmlspecialchars($commande['email2'])."'
    , '".htmlspecialchars($commande['contact2'])."'

    ,'".vn($_SESSION['utilisateur']['id_parrain'])."'
    ,'".vb($_SESSION['utilisateur']['type'])."'

    ,'".$_SESSION['caddie']->total_ecotaxe_ttc."'
    ,'".$_SESSION['caddie']->total_ecotaxe_ht."'

    ,'".$_SESSION['devise']['symbole']."'
    )";


    $qid = mysql_query($sql) or DIE('Une erreur de connexion à la base s est produite ' . __LINE__ . '.<p>' . MYSQL_ERROR());

    $commandeid = mysql_insert_id();

    mysql_query("UPDATE peel_utilisateurs SET avoir = avoir - '".vn($_SESSION['caddie']->avoir)."' WHERE id_utilisateur = '".intval($_SESSION['utilisateur']['id_utilisateur'])."'");


    if (isset($_SESSION['affilie'])) {

    mysql_query("INSERT INTO peel_utilisateurs_commandes (utilisateur_id, commande_id) VALUES ('".$_SESSION['affilie']."', '".$commandeid."')");

    }


    if (!empty($_SESSION['caddie']->code_cheque)) {

    mysql_query("UPDATE peel_cheques_cadeaux SET a_timestamp = now(), etat = '0' WHERE code = '".$_SESSION['caddie']->code_cheque."'");

    }


    /* ajout des articles à la table commandes_articles */
    foreach ($_SESSION['caddie']->articles as $i => $produitid) {

    $qid = mysql_query("SELECT * FROM peel_produits WHERE id= '$produitid'");

    if ($qid) {

    if (mysql_num_rows($qid) > 0) {

    $article=mysql_fetch_array($qid);

    if ($article['on_stock'] == 1) {

    $c = mysql_fetch_array(mysql_query("SELECT id FROM peel_couleurs WHERE nom_".$_SESSION['langue']." = '".$_SESSION['caddie']->couleur[$i]."'"));

    $t = mysql_fetch_array(mysql_query("SELECT id FROM peel_tailles WHERE nom_".$_SESSION['langue']." = '".$_SESSION['caddie']->taille[$i]."'"));

    $s = mysql_fetch_array(mysql_query("SELECT stock FROM peel_stocks WHERE produit_id = '".$article['id']."' AND couleur_id = '".vn($c['id'])."' AND taille_id = '".vn($t['id'])."'"));

    $stock = $s['stock'] - $_SESSION['caddie']->quantite[$i];

    if ($stock >= 0) { $stock_restant = $stock; } else { $stock_restant = 0; }

    if ($stock < 0) {

    $stock_to_order = $_SESSION['caddie']->quantite[$i] - $s['stock'] ; /* Calcul le stock restant à commander */

    mysql_query("UPDATE peel_commandes SET statut = '9' WHERE id = '".$commandeid."'"); /* Passage de la commande en stand by */

    } else {

    $stock_to_order = 0;

    }

    mysql_query("UPDATE peel_stocks SET stock = ".$stock_restant." WHERE produit_id = '".$article['id']."' AND couleur_id = '".vn($c['id'])."' AND taille_id = '".vn($t['id'])."'");

    $sqlStockTemp = "SELECT stock, qte FROM peel_stocks_temp WHERE produit_id = '".$article['id']."' AND couleur_id = '".vn($c['id'])."' AND taille_id = '".vn($t['id'])."'";

    $resStockTemp = mysql_query($sqlStockTemp);

    $StockTemp = mysql_fetch_array($resStockTemp);

    if ($StockTemp['qte'] == $_SESSION['caddie']->quantite[$i]) {

    mysql_query("DELETE FROM peel_stocks_temp WHERE produit_id = '".$article['id']."' AND couleur_id = '".vn($c['id'])."' AND taille_id = '".vn($t['id'])."'");

    } else {

    mysql_query("UPDATE peel_stocks_temp SET stock = ".$stock_restant.", qte = qte - ".$_SESSION['caddie']->quantite[$i].", o_timestamp = now() WHERE produit_id = '".$article['id']."' AND couleur_id = '".vn($c['id'])."' AND taille_id = '".vn($t['id'])."'");


    }


    if ($s['stock'] <= $seuil) {

    mail("$support","[$site] Notification d'alerte STOCK","Seuil d'alerte atteint pour le produit ".html_entity_decode($article['nom_'.$_SESSION['langue'].''])."\n\r Couleur : ".$_SESSION['caddie']->couleur[$i]."\n\r Taille : ".$_SESSION['caddie']->taille[$i]."\n\r Stock restant : ".$s['stock']."\n\r","FROM:$support");

    }

    }


    $statut_envoi = ($article['on_download'] == 1) ? "En attente" : "";

    $ecotaxe_ttc = $_SESSION['caddie']->ecotaxe_ttc[$i] * $_SESSION['caddie']->quantite[$i];

    $ecotaxe_ht = $_SESSION['caddie']->ecotaxe_ht[$i] * $_SESSION['caddie']->quantite[$i];

    $total_prix_ttc = $ecotaxe_ttc + $_SESSION['caddie']->total_prix[$i];

    $total_prix_ht = $ecotaxe_ht + $_SESSION['caddie']->total_prix_ht[$i];


    $requete = "INSERT INTO peel_commandes_articles (
    commande_id
    , produit_id
    , nom_produit
    , prix_cat
    , prix_cat_ht
    , prix
    , prix_ht
    , total_prix
    , total_prix_ht
    , quantite
    , promotion
    , remise_produit
    , tva
    , tva_percent
    , couleur
    , taille
    , option_prix
    , delivery_stock
    , order_stock
    , points
    , poids
    , longueur_prod
    , largeur_prod
    , profondeur_prod
    , poids_prod
    , matiere_prod
    , couleur_prod
    , email_check
    , on_download
    , statut_envoi
    , nb_envoi
    , nb_download
    , ecotaxe_ttc
    , ecotaxe_ht
    ) VALUES (
    '$commandeid'
    ,'".$article['id']."'
    ,'".htmlspecialchars($article['nom_'.$_SESSION['langue'].''], ENT_QUOTES)."'
    ,'".$_SESSION['caddie']->prix_cat[$i]."'
    ,'".$_SESSION['caddie']->prix_cat_ht[$i]."'
    ,'".$_SESSION['caddie']->prix[$i]."'
    ,'".$_SESSION['caddie']->prix_ht[$i]."'
    ,'".$total_prix_ttc."'
    ,'".$total_prix_ht."'
    ,'".$_SESSION['caddie']->quantite[$i]."'
    ,'".$_SESSION['caddie']->remise_produit_percent[$i]."'
    ,'".$_SESSION['caddie']->remise_produit[$i]."'
    ,'".$_SESSION['caddie']->tva[$i]."'
    ,'".$_SESSION['caddie']->tva_percent[$i]."'
    ,'".htmlspecialchars($_SESSION['caddie']->couleur[$i])."'
    ,'".htmlspecialchars($_SESSION['caddie']->taille[$i])."'
    ,'".htmlspecialchars($_SESSION['caddie']->option[$i])."'
    ,'".htmlspecialchars($_SESSION['caddie']->delivery_stock[$i])."'
    ,'".intval(vn($stock_to_order))."'
    ,'".htmlspecialchars($_SESSION['caddie']->points[$i])."'
    ,'".htmlspecialchars($_SESSION['caddie']->poids[$i])."'
    ,'".htmlspecialchars($_SESSION['caddie']->longueur_prod[$i])."'
    ,'".htmlspecialchars($_SESSION['caddie']->largeur_prod[$i])."'
    ,'".htmlspecialchars($_SESSION['caddie']->profondeur_prod[$i])."'
    ,'".htmlspecialchars($_SESSION['caddie']->poids_prod[$i])."'
    ,'".htmlspecialchars($_SESSION['caddie']->matiere_prod[$i])."'
    ,'".htmlspecialchars($_SESSION['caddie']->couleur_prod[$i])."'
    ,'".htmlspecialchars($_SESSION['caddie']->email_check[$i])."'
    ,'".intval($article['on_download'])."'
    ,'".$statut_envoi."'
    ,'0'
    ,'0'
    ,'".$ecotaxe_ttc."'
    ,'".$ecotaxe_ht."'
    )" ;

    mysql_query($requete) or DIE('Une erreur de connexion à la base s est produite ' . __LINE__ . '.<p>' . MYSQL_ERROR());

    if (!empty($_SESSION['caddie']->email_check[$i])) {

    $code = strtoupper(MDP());

    $email_client = $_SESSION['utilisateur']['email'];

    $email_ami = $_SESSION['caddie']->email_check[$i];

    /* Mode production : mettre l'état à 0 et passer les fonctions mails dans la liste des chèques cadeaux */


    mysql_query("INSERT INTO peel_cheques_cadeaux (
    id_utilisateur,
    email_acheteur,
    email_ami,
    nom_produit,
    code,
    remise_cheque,
    o_timestamp,
    seuil,
    etat
    ) VALUES (
    '".intval($_SESSION['utilisateur']['id_utilisateur'])."',
    '$email_client',
    '$email_ami',
    '".htmlspecialchars($article['nom_'.$_SESSION['langue'].''], ENT_QUOTES)."',
    '".$code."',
    '".$_SESSION['caddie']->prix[$i]."',
    now(),
    '".$_SESSION['caddie']->prix[$i]."',
    '1')")
    or DIE('Une erreur de connexion à la base s est produite ' . __LINE__ . '.<p>' . MYSQL_ERROR());


    $message = "Bonjour,\n\r";
    $message .= "Votre ami ".$_SESSION['utilisateur']['prenom']." ".$_SESSION['utilisateur']['nom_famille']." a souhaité vous offrir un chèque cadeau sur le site $site.\n\r";
    $message .= "Pour en bénéficier, connectez vous simplement au site $wwwroot et utilisez votre code $code.\n\rVous bénéficierez alors d'un avoir de ".$_SESSION['caddie']->prix[$i]." EURO TTC sur votre commande.\n\r";
    $message .= "A bientôt sur $site.";

    mail($email_ami,"[$site] ".$_SESSION['utilisateur']['email']." vous offre un chèque cadeau",$message,"FROM:$email_client");
    mail($email_client ,"[$site - copie du message envoyé à ".$_SESSION['caddie']->email_check[$i]."] ".$_SESSION['utilisateur']['email']." vous offre un chèque cadeau",$message,"FROM:$support");

    $message_support = "Bonjour,\n\rLe code chèque cadeau $code vient d'être créé sur $site.\n\r Merci de le valider à réception du règlement.";
    mail($support ,"[$site] Création d'un chèque cadeau à valider",$message_support,"FROM:$support");

    }


    }
    }
    }


    /* Annule la remise en % du client, supprimer ces lignes si vous souhaitez que les remises client soient permanentes */
    mysql_query("UPDATE peel_utilisateurs SET remise_percent = '0', avoir = '0' WHERE id_utilisateur = '".$_SESSION['utilisateur']['id_utilisateur']."'");

    $_SESSION['utilisateur']['remise_percent'] = 0;
    $_SESSION['utilisateur']['avoir'] = 0;
    $_SESSION['utilisateur']['id_parrain'] = 0;
    $_SESSION['utilisateur']['type'] = ''; #- Suppression du statut filleul

    return $commandeid;

    }
    fin de la fontion.

    les champs sont la , je comprend pas

    merci
    • 0
  19. phil83 a ajouté un message dans un sujet  problème commande   

    re-bonjour

    "est ce que tes champs supplémentaires sont de le même nature que le nom du produit ?"

    non, les champs :

    longueur_prod
    largeur_prod
    profondeur_prod

    attend une reponse numerique !

    alors que :

    matiere_prod
    couleur_prod

    attend une reponse alphanumerique!


    par contre j'ai pas compris se que tu me dit willy!! :)
    merci
    • 0
  20. phil83 a ajouté un message dans un sujet  problème commande   

    :)
    • 0
  21. phil83 a ajouté un message dans un sujet  problème commande   

    Bonjour,
    J’ai rajouté la ou tu ma dit, ses bon :)

    Maintenant j'ai comme un décalage on dirait :(

    Je pense que les champs ajoutés on décalé quelque chose

    J’ai le message d’erreur suivant :

    Warning: Missing argument 26 for place() in /home/coeurdasie/domains/coeurdasie.fr/public_html/lib/class/caddie.php on line 374

    Warning: Missing argument 27 for place() in /home/coeurdasie/domains/coeurdasie.fr/public_html/lib/class/caddie.php on line 375

    Warning: Missing argument 28 for place() in /home/coeurdasie/domains/coeurdasie.fr/public_html/lib/class/caddie.php on line 376

    Warning: Missing argument 29 for place() in /home/coeurdasie/domains/coeurdasie.fr/public_html/lib/class/caddie.php on line 377

    Warning: Missing argument 30 for place() in /home/coeurdasie/domains/coeurdasie.fr/public_html/lib/class/caddie.php on line 378

    Warning: Missing argument 31 for place() in /home/coeurdasie/domains/coeurdasie.fr/public_html/lib/class/caddie.php on line 379

    Mais pourtant les champs ont été ajoutés dans "caddie.php», voila a quoi sa correspond les ligne 374 à 379:
    estrait code "caddie.php" :

    348 function place(
    349 $i,
    350 $produitid,
    351 $qte,
    352 $couleur,
    353 $taille,
    354 $couleurId,
    355 $tailleId,
    356 $prix_cat,
    357 $prix_cat_ht,
    358 $prix,
    359 $prix_ht,
    360 $total_prix,
    361 $total_prix_ht,
    362 $tva_percent,
    363 $tva,
    364 $poids,
    365 $longueur_prod,
    366 $largeur_prod,
    367 $profondeur_prod,
    368 $poids_prod,
    369 $matiere_prod,
    370 $couleur_prod,
    371 $points,
    372 $remise_produit_percent,
    373 $remise_produit,
    374 $etat_stock,
    375 $delivery_stock,
    376 $option,
    377 $email_check,
    378 $ecotaxe_ttc,
    379 $ecotaxe_ht) {
    380
    381 if (isset($i)) {
    382
    $this->articles[$i] = (int) $produitid;
    $this->quantite[$i] = $qte;
    $this->couleur[$i] = $couleur;
    $this->taille[$i] = $taille;
    $this->couleurId[$i] = $couleurId;
    $this->tailleId[$i] = $tailleId;
    $this->prix_cat[$i] = $prix_cat ;
    $this->prix_cat_ht[$i] = $prix_cat_ht ;
    $this->prix[$i] = $prix ;
    $this->prix_ht[$i] = $prix_ht ;
    $this->total_prix[$i] = $total_prix ;
    $this->total_prix_ht[$i] = $total_prix_ht ;
    $this->tva_percent[$i] = $tva_percent ;
    $this->tva[$i] = $tva;
    $this->poids[$i] = $poids;
    $this->longueur_prod[$i] = $longueur_prod;
    $this->largeur_prod[$i] = $largeur_prod;
    $this->profondeur_prod[$i] = $profondeur_prod;
    $this->poids_prod[$i] = $poids_prod;
    $this->matiere_prod[$i] = $matiere_prod;
    $this->couleur_prod[$i] = $couleur_prod;
    $this->points[$i] = $points;
    $this->remise_produit_percent[$i] = $remise_produit_percent;
    $this->remise_produit[$i] = $remise_produit ;
    $this->etat_stock[$i] = $etat_stock;
    $this->delivery_stock[$i] = $delivery_stock;
    $this->option[$i] = $option;
    $this->email_check[$i] = $email_check;
    $this->ecotaxe_ttc[] = $ecotaxe_ttc ;
    $this->ecotaxe_ht[] = $ecotaxe_ht ;

    }

    .....
    fin du code

    Merci
    • 0
  22. phil83 a ajouté un message dans un sujet  problème commande   

    re-bonsoir,
    j'ai rajouté les champs aussi dans caddie_ajout.php

    fichiers :

    <?

    include("../configuration.inc.php");

    if (!isset($_COOKIE['PHPSESSID'])) {

    header("Location: $wwwroot/cookie.php");

    } else {

    $quantite = intval($_POST['qte']);

    $id = intval($_POST['id']);

    $email_check = vb($_POST['email_check'.vb($_GET['prodid']).'']);

    $resProd = mysql_query("SELECT nom_".$_SESSION['langue']." as nom, prix, prix_revendeur, tva, promotion, on_stock, etat_stock, delai_stock, points, poids, on_check, id_ecotaxe FROM peel_produits WHERE id = '".intval($id)."'")
    or DIE('Une erreur de connexion à la base s est produite ' . __LINE__ . '.<p>' . MYSQL_ERROR());

    $prod = mysql_fetch_array($resProd);

    if ($prod['on_check'] == 0 || $prod['on_check'] == 1 && $email_check != '') {

    $on_stock = vb($prod['on_stock']);

    $delivery_stock = vb($prod['delai_stock']);

    $poids = vn($prod['poids']);

    $points = vn($prod['points']);

    $etat_stock = vn($prod['etat_stock']);

    switch ($on_stock) {

    case "1" :

    $criteres = explode("|", vb($_POST['critere']));

    $cId = vn($criteres[0]);

    $sId = vn($criteres[1]);

    if (!empty($cId) || !empty($sId)) {

    $stock_post = intval(vb($criteres[2]));

    } else {

    $stock_post = intval(vn($_POST['stock']));

    }

    break;

    case "0" :

    $stock_post = ""; #- Initialisation de la variable à blanc pour les produits sans gestion de stock.

    $cId = vn($_POST['couleur']);

    $sId = vn($_POST['taille']);

    break;

    }

    $delivery_stock = vb($prod['delivery_stock']);

    $remise_produit_percent = $prod['promotion'];

    $tva_percent = !empty($_SESSION['caddie']->zoneTva) ? $prod['tva'] : "0";


    # Récupère le nom de la couleur
    $sqlColor = "SELECT nom_".$_SESSION['langue']." as nom FROM peel_couleurs WHERE id = '".vb($cId)."'";

    $resColor = mysql_query($sqlColor);

    if ($resColor) {

    if (mysql_num_rows($resColor) > 0) {

    $Color = mysql_fetch_array($resColor);

    $couleur = $Color['nom'];

    } else {

    $couleur = "";

    }

    }


    # Récupère le prix et la taille
    $sqlSize = "SELECT nom_".$_SESSION['langue']." as nom, prix, prix_revendeur FROM peel_tailles WHERE id = '".vn($sId)."'";

    $resSize = mysql_query($sqlSize);

    $option = 0;

    if ($resSize) {

    if (mysql_num_rows($resSize) > 0) {

    $Size = mysql_fetch_array($resSize);

    if ($Size['prix'] != 0) {

    (isset($_SESSION['utilisateur']['priv']) && $_SESSION['utilisateur']['priv'] == "reve") ? $option = $Size['prix_revendeur'] : $option = $Size['prix'] ;

    }

    $taille = $Size['nom'];

    } else {

    $taille = "";


    }

    }

    /* Choix entre prix revendeur et prix public */
    $prix_prod_revendeur = $prod['prix_revendeur'];

    $prix_prod = $prod['prix'];

    if ($module_lot == 1) { /* Si le module de gestion des prix / quantité est actif */

    $sqlQte = "SELECT quantite, prix, prix_revendeur FROM peel_quantites WHERE produit_id = '$id' ORDER BY quantite";

    $resQte = mysql_query($sqlQte) or die('Une erreur de connexion à la base s est produite ' . __LINE__ . '.<p>' . mysql_error());

    if (mysql_num_rows($resQte) > 0) { /* Si il existe des remises / quantité dans la base */

    while ($Qte = mysql_fetch_array($resQte)) {

    if ($quantite >= $Qte['quantite']) {

    $prix_prod = $Qte['prix'];

    $prix_prod_revendeur = $Qte['prix_revendeur'];

    }

    }

    }

    }

    (isset($_SESSION['utilisateur']['priv']) && $_SESSION['utilisateur']['priv'] == "reve") ? $prix_cat_ht = ($prix_prod_revendeur + vn($option)) / (1+$prod['tva']/100) : $prix_cat_ht = ($prix_prod + vn($option)) / (1+$prod['tva']/100);

    $prix_cat = $prix_cat_ht * (1 + $tva_percent/100);

    /****************************************************************************/
    /* Calcul des promotions en valeur (calculées sur le prix HT) */
    /***************************************************************************/

    $remise_produit_percent = vn($prod['promotion']);

    $remise_produit = $prix_cat_ht * $remise_produit_percent/100;

    $prix_ht = $prix_cat_ht - $remise_produit;

    $prix = $prix_ht * (1+$tva_percent/100);

    $total_prix = $prix * $quantite;

    $total_prix_ht = $prix_ht * $quantite;

    $tva = $total_prix - $total_prix_ht;

    if ($on_stock == 1) {

    $stock = $stock_post - $quantite;

    if ($stock < 0) {

    $stock = 0;

    $quantite = $stock_post;

    }

    $sql = "SELECT stock FROM peel_stocks_temp WHERE produit_id = '".intval($_REQUEST['id'])."' AND couleur_id = '".$cId."' AND taille_id = '".$sId."'";

    $res = mysql_query($sql);

    if (mysql_num_rows($res) == 0) {

    @mysql_query("INSERT INTO peel_stocks_temp (produit_id, couleur_id, taille_id, stock, qte, o_timestamp) VALUES ('".$_REQUEST['id']."', '".$cId."', '".$sId."', '".$stock."', '".$quantite."', now())")
    or DIE('Une erreur de connexion à la base s est produite ' . __LINE__ . '.<p>' . MYSQL_ERROR());

    } else {

    @mysql_query("UPDATE peel_stocks_temp SET stock = '".$stock."', qte = qte + ".$quantite.", o_timestamp = now() WHERE produit_id = '".$_REQUEST['id']."' AND couleur_id = '".$cId."' AND taille_id = '".$sId."'")
    or DIE('Une erreur de connexion à la base s est produite ' . __LINE__ . '.<p>' . MYSQL_ERROR());

    }

    }

    /*****************************/
    /* Récupération de l'écotaxe */
    /*****************************/
    $ecotaxe_ht = $ecotaxe_ttc = 0;

    $reseco = mysql_query("SELECT prix_ht, prix_ttc FROM peel_ecotaxes WHERE id = '".intval($prod['id_ecotaxe'])."'");

    if (mysql_num_rows($reseco) > 0) {

    $eco = mysql_fetch_object($reseco);

    $ecotaxe_ht = $eco->prix_ht ;

    $ecotaxe_ttc = $eco->prix_ttc ;

    }

    if (!in_array($_REQUEST['id'], $_SESSION['caddie']->articles) || $prod['on_check'] == 1 ) { #- Si le produit n'est pas dans le caddie ou est un cheque cadeau

    $_SESSION['caddie']->ajout(
    $id,
    $quantite,
    $couleur,
    $taille,
    $cId,
    $sId,
    $prix_cat,
    $prix_cat_ht,
    $prix,
    $prix_ht,
    $total_prix,
    $total_prix_ht,
    $tva_percent,
    $tva,
    $poids,
    $longueur_prod,
    $largeur_prod,
    $profondeur_prod,
    $poids_prod,
    $matiere_prod,
    $couleur_prod,
    $points,
    $remise_produit_percent,
    $remise_produit,
    $etat_stock,
    $delivery_stock,
    $option,
    $email_check,
    $ecotaxe_ttc,
    $ecotaxe_ht
    );

    } else { #- Si le produit est dans le caddie

    $array_ligne = array_keys($_SESSION['caddie']->articles, $_REQUEST['id']);

    $ligne = $array_ligne[0];

    if ($_SESSION['caddie']->couleur[$ligne] == vb($cId) && $_SESSION['caddie']->taille[$ligne] == vb($sId) ) {

    $quantite = $_SESSION['caddie']->quantite[$ligne] + $quantite;

    $total_prix = $prix * $quantite;

    $total_prix_ht = $prix_ht * $quantite;

    $tva = $total_prix - $total_prix_ht;

    $_SESSION['caddie']->modif(
    $ligne,
    $id,
    $quantite,
    $couleur,
    $taille,
    $cId,
    $sId,
    $prix_cat,
    $prix_cat_ht,
    $prix,
    $prix_ht,
    $total_prix,
    $total_prix_ht,
    $tva_percent,
    $tva,
    $poids,
    $longueur_prod,
    $largeur_prod,
    $profondeur_prod,
    $poids_prod,
    $matiere_prod,
    $couleur_prod,
    $points,
    $remise_produit_percent,
    $remise_produit,
    $etat_stock,
    $delivery_stock,
    $option,
    $email_check,
    $ecotaxe_ttc,
    $ecotaxe_ht
    );

    } else {

    $_SESSION['caddie']->ajout(
    $id,
    $quantite,
    $couleur,
    $taille,
    $cId,
    $sId,
    $prix_cat,
    $prix_cat_ht,
    $prix,
    $prix_ht,
    $total_prix,
    $total_prix_ht,
    $tva_percent,
    $tva,
    $poids,
    $longueur_prod,
    $largeur_prod,
    $profondeur_prod,
    $poids_prod,
    $matiere_prod,
    $couleur_prod,
    $points,
    $remise_produit_percent,
    $remise_produit,
    $etat_stock,
    $delivery_stock,
    $option,
    $email_check,
    $ecotaxe_ttc,
    $ecotaxe_ht
    );


    }

    }

    $_SESSION['caddie']->nettoie();

    $_SESSION['caddie']->recalc_total();

    }

    if (! empty($_SERVER['HTTP_REFERER'])) {

    header("Location: ".$_SERVER['HTTP_REFERER']."");

    } else {

    header("Location: $wwwroot/index.php");

    }

    }
    ?>

    ......... fin du fichiers

    j'ai du oublier a un endroit , mais je vois pas !!! :)
    merci
    • 0
  23. phil83 a ajouté un message dans un sujet  problème commande   

    bonsoir,

    les variables sont déclaré et initialisé (je pense :) )

    extrait code de "caddie.php" :



    .........
    ?
    class Caddie {

    /* Déclaration des tableaux */
    var $articles; /* Tableau des articles */
    var $quantite; /* Tableau des quantités */
    var $poids; /* Tableau des poids */
    var $longueur_prod;
    var $largeur_prod;
    var $profondeur_prod;
    var $poids_prod;
    var $matiere_prod;
    var $couleur_prod;
    var $couleur; /* Tableau des couleurs */
    var $taille; /* Tableau des tailles */
    var $couleurId; /* Tableau des couleurs */
    var $tailleId; /* Tableau des tailles */
    var $prix_cat; /* Tableau des prix catalogue TTC*/
    var $prix_cat_ht; /* Tableau des prix catalogue HT*/
    var $prix; /* Tableau des prix unitaire TTC*/
    var $prix_ht; /* Tableau des prix unitaire HT*/
    var $total_prix; /* Net produit vendu TTC prix x qte*/
    var $total_prix_ht; /* Net produit vendu HT prix_ht x qte */

    ..........

    function init() {

    /* Initialise le caddie */

    $this->articles = array();
    $this->quantite = array();
    $this->couleur = array();
    $this->taille = array();
    $this->couleurId = array();
    $this->tailleId = array();
    $this->prix = array();
    $this->prix_ht = array();
    $this->total_prix = array();
    $this->total_prix_ht = array();
    $this->prix_cat = array();
    $this->prix_cat_ht = array();
    $this->tva_percent = array();
    $this->tva = array();
    $this->poids = array();
    $this->longueur_prod = array();
    $this->largeur_prod = array();
    $this->profondeur_prod = array();
    $this->poids_prod = array();
    $this->matiere_prod = array();
    $this->couleur_prod = array();
    $this->points = array();
    $this->remise_produit_percent = array();
    $this->remise_produit = array();
    $this->etat_stock = array();
    ............

    function ajout(
    &$produitid,
    $qte,
    $couleur,
    $taille,
    $couleurId,
    $tailleId,
    $prix_cat,
    $prix_cat_ht,
    $prix,
    $prix_ht,
    $total_prix,
    $total_prix_ht,
    $tva_percent,
    $tva,
    $poids,
    $longueur_prod,
    $largeur_prod,
    $profondeur_prod,
    $poids_prod,
    $matiere_prod,
    $couleur_prod,
    $points,
    $remise_produit_percent,
    $remise_produit,
    $etat_stock,
    $delivery_stock,
    $option,
    $email_check,
    $ecotaxe_ttc,
    $ecotaxe_ht
    ) {

    $this->articles[] = $produitid;
    $this->quantite[] = $qte;
    $this->couleur[] = $couleur;
    $this->taille[] = $taille;
    $this->couleurId[] = $couleurId;
    $this->tailleId[] = $tailleId;
    $this->prix_cat[] = $prix_cat ;
    $this->prix_cat_ht[] = $prix_cat_ht ;
    $this->prix[] = $prix ;
    $this->prix_ht[] = $prix_ht ;
    $this->total_prix[] = $total_prix ;
    $this->total_prix_ht[] = $total_prix_ht ;
    $this->tva_percent[] = $tva_percent;
    $this->tva[] = $tva;
    $this->poids[] = $poids;
    $this->longueur_prod[] = $longueur_prod;
    $this->largeur_prod[] = $largeur_prod;
    $this->profondeur_prod[] = $profondeur_prod;
    $this->poids_prod[] = $poids_prod;
    $this->matiere_prod[] = $matiere_prod;
    $this->couleur_prod[] = $couleur_prod;
    $this->points[] = $points;
    $this->remise_produit_percent[] = $remise_produit_percent;
    $this->remise_produit[] = $remise_produit ;
    $this->etat_stock[] = $etat_stock;
    $this->delivery_stock[] = $delivery_stock;
    $this->option[] = $option;
    $this->email_check[] = $email_check;
    $this->ecotaxe_ttc[] = $ecotaxe_ttc ;
    $this->ecotaxe_ht[] = $ecotaxe_ht ;
    }
    .....................................

    function modif(
    $i,
    $produitid,
    $qte,
    $couleur,
    $taille,
    $couleurId,
    $tailleId,
    $prix_cat,
    $prix_cat_ht,
    $prix,
    $prix_ht,
    $total_prix,
    $total_prix_ht,
    $tva_percent,
    $tva,
    $poids,
    $longueur_prod,
    $largeur_prod,
    $profondeur_prod,
    $poids_prod,
    $matiere_prod,
    $couleur_prod,
    $points,
    $remise_produit_percent,
    $remise_produit,
    $etat_stock,
    $delivery_stock,
    $option,
    $email_check,
    $ecotaxe_ttc,
    $ecotaxe_ht

    ) {

    /* Met la quantité la couleur et la taille spécifiées du produit spécifié dans le caddie */

    if (isset($i)) {

    $this->articles[$i] = (int) $produitid;
    $this->quantite[$i] = $qte;
    $this->couleur[$i] = $couleur;
    $this->taille[$i] = $taille;
    $this->couleurId[$i] = $couleurId;
    $this->tailleId[$i] = $tailleId;
    $this->prix_cat[$i] = $prix_cat ;
    $this->prix_cat_ht[$i] = $prix_cat_ht ;
    $this->prix[$i] = $prix ;
    $this->prix_ht[$i] = $prix_ht ;
    $this->total_prix[$i] = $total_prix ;
    $this->total_prix_ht[$i] = $total_prix_ht ;
    $this->tva_percent[$i] = $tva_percent;
    $this->tva[$i] = $tva;
    $this->poids[$i] = $poids;
    $this->longueur_prod[$i] = $longueur_prod;
    $this->largeur_prod[$i] = $largeur_prod;
    $this->profondeur_prod[$i] = $profondeur_prod;
    $this->poids_prod[$i] = $poids_prod;
    $this->matiere_prod[$i] = $matiere_prod;
    $this->couleur_prod[$i] = $couleur_prod;
    $this->points[$i] = $points;
    $this->remise_produit_percent[$i] = $remise_produit_percent;
    $this->remise_produit[$i] = $remise_produit ;
    $this->etat_stock[$i] = $etat_stock;
    $this->delivery_stock[$i] = $delivery_stock;
    $this->option[$i] = $option;
    $this->email_check[$i] = $email_check;
    $this->ecotaxe_ttc[] = $ecotaxe_ttc ;
    $this->ecotaxe_ht[] = $ecotaxe_ht ;
    }

    ksort($this->articles);
    ksort($this->quantite);
    ksort($this->couleur);
    ksort($this->taille);
    ksort($this->couleurId);
    ksort($this->tailleId);
    ksort($this->prix);
    ksort($this->prix_ht);
    ksort($this->total_prix);
    ksort($this->total_prix_ht);
    ksort($this->prix_cat);
    ksort($this->prix_cat_ht);
    ksort($this->tva_percent);
    ksort($this->tva);
    ksort($this->poids);
    ksort($this->longueur_prod);
    ksort($this->largeur_prod);
    ksort($this->profondeur_prod);
    ksort($this->poids_prod);
    ksort($this->matiere_prod);
    ksort($this->couleur_prod);
    ksort($this->points);
    ksort($this->remise_produit_percent);
    ksort($this->remise_produit);
    ksort($this->etat_stock);
    ksort($this->delivery_stock);
    ksort($this->option);
    ksort($this->email_check);
    ksort($this->ecotaxe_ttc);
    ksort($this->ecotaxe_ht);

    }




    function place(
    $i,
    $produitid,
    $qte,
    $couleur,
    $taille,
    $couleurId,
    $tailleId,
    $prix_cat,
    $prix_cat_ht,
    $prix,
    $prix_ht,
    $total_prix,
    $total_prix_ht,
    $tva_percent,
    $tva,
    $poids,
    $longueur_prod,
    $largeur_prod,
    $profondeur_prod,
    $poids_prod,
    $matiere_prod,
    $couleur_prod,
    $points,
    $remise_produit_percent,
    $remise_produit,
    $etat_stock,
    $delivery_stock,
    $option,
    $email_check,
    $ecotaxe_ttc,
    $ecotaxe_ht) {

    if (isset($i)) {

    $this->articles[$i] = (int) $produitid;
    $this->quantite[$i] = $qte;
    $this->couleur[$i] = $couleur;
    $this->taille[$i] = $taille;
    $this->couleurId[$i] = $couleurId;
    $this->tailleId[$i] = $tailleId;
    $this->prix_cat[$i] = $prix_cat ;
    $this->prix_cat_ht[$i] = $prix_cat_ht ;
    $this->prix[$i] = $prix ;
    $this->prix_ht[$i] = $prix_ht ;
    $this->total_prix[$i] = $total_prix ;
    $this->total_prix_ht[$i] = $total_prix_ht ;
    $this->tva_percent[$i] = $tva_percent ;
    $this->tva[$i] = $tva;
    $this->poids[$i] = $poids;
    $this->longueur_prod[$i] = $longueur_prod;
    $this->largeur_prod[$i] = $largeur_prod;
    $this->profondeur_prod[$i] = $profondeur_prod;
    $this->poids_prod[$i] = $poids_prod;
    $this->matiere_prod[$i] = $matiere_prod;
    $this->couleur_prod[$i] = $couleur_prod;
    $this->points[$i] = $points;
    $this->remise_produit_percent[$i] = $remise_produit_percent;
    $this->remise_produit[$i] = $remise_produit ;
    $this->etat_stock[$i] = $etat_stock;
    $this->delivery_stock[$i] = $delivery_stock;
    $this->option[$i] = $option;
    $this->email_check[$i] = $email_check;
    $this->ecotaxe_ttc[] = $ecotaxe_ttc ;
    $this->ecotaxe_ht[] = $ecotaxe_ht ;

    }

    ksort($this->articles);
    ksort($this->quantite);
    ksort($this->couleur);
    ksort($this->taille);
    ksort($this->couleurId);
    ksort($this->tailleId);
    ksort($this->prix);
    ksort($this->prix_ht);
    ksort($this->total_prix);
    ksort($this->total_prix_ht);
    ksort($this->prix_cat);
    ksort($this->prix_cat_ht);
    ksort($this->tva_percent);
    ksort($this->tva);
    ksort($this->poids);
    ksort($this->longueur_prod);
    ksort($this->largeur_prod);
    ksort($this->profondeur_prod);
    ksort($this->poids_prod);
    ksort($this->matiere_prod);
    ksort($this->couleur_prod);
    ksort($this->points);
    ksort($this->remise_produit_percent);
    ksort($this->remise_produit);
    ksort($this->etat_stock);
    ksort($this->delivery_stock);
    ksort($this->option);
    ksort($this->email_check);
    ksort($this->ecotaxe_ttc);
    ksort($this->ecotaxe_ht);

    }

    ......................
    function enleve(&$numero_ligne) {

    /* Enlève un produit du caddie */
    if (isset($numero_ligne)) {
    unset(

    $this->articles[$numero_ligne],
    $this->quantite[$numero_ligne],
    $this->couleur[$numero_ligne],
    $this->taille[$numero_ligne],
    $this->couleurId[$numero_ligne],
    $this->tailleId[$numero_ligne],
    $this->prix[$numero_ligne],
    $this->prix_ht[$numero_ligne],
    $this->total_prix[$numero_ligne],
    $this->total_prix_ht[$numero_ligne],
    $this->prix_cat[$numero_ligne],
    $this->prix_cat_ht[$numero_ligne],
    $this->tva[$numero_ligne],
    $this->tva_percent[$numero_ligne],
    $this->poids[$numero_ligne],
    $this->longueur_prod[$numero_ligne],
    $this->largeur_prod[$numero_ligne],
    $this->profondeur_prod[$numero_ligne],
    $this->poids_prod[$numero_ligne],
    $this->matiere_prod[$numero_ligne],
    $this->couleur_prod[$numero_ligne],
    $this->points[$numero_ligne],
    $this->remise_produit_percent[$numero_ligne],
    $this->remise_produit[$numero_ligne],
    $this->etat_stock[$numero_ligne],
    $this->delivery_stock[$numero_ligne],
    $this->option[$numero_ligne],
    $this->email_check[$numero_ligne],
    $this->ecotaxe_ttc[$numero_ligne],
    $this->ecotaxe_ht[$numero_ligne]);

    }


    $this->articles = array_values ($this->articles);
    $this->quantite = array_values ($this->quantite);
    $this->couleur = array_values ($this->couleur);
    $this->taille = array_values ($this->taille);
    $this->couleurId = array_values ($this->couleurId);
    $this->tailleId = array_values ($this->tailleId);
    $this->prix = array_values ($this->prix);
    $this->prix_ht = array_values ($this->prix_ht);
    $this->total_prix = array_values ($this->total_prix);
    $this->total_prix_ht = array_values ($this->total_prix_ht);
    $this->prix_cat = array_values ($this->prix_cat);
    $this->prix_cat_ht = array_values ($this->prix_cat_ht);
    $this->tva = array_values ($this->tva);
    $this->tva_percent = array_values ($this->tva_percent);
    $this->poids = array_values ($this->poids);
    $this->longueur_prod = array_values ($this->longueur_prod);
    $this->largeur_prod = array_values ($this->largeur_prod);
    $this->profondeur_prod = array_values ($this->profondeur_prod);
    $this->poids_prod = array_values ($this->poids_prod);
    $this->matiere_prod = array_values ($this->matiere_prod);
    $this->couleur_prod = array_values ($this->couleur_prod);
    $this->points = array_values ($this->points);
    $this->remise_produit_percent = array_values ($this->remise_produit_percent);
    $this->remise_produit = array_values ($this->remise_produit);
    $this->etat_stock = array_values ($this->etat_stock);
    $this->delivery_stock = array_values ($this->delivery_stock);
    $this->option = array_values ($this->option);
    $this->email_check = array_values ($this->email_check);
    $this->ecotaxe_ttc = array_values ($this->ecotaxe_ttc);
    $this->ecotaxe_ht = array_values ($this->ecotaxe_ht);

    }

    .......................
    function nettoie() {
    /* Cette fonction nettoie le caddie, en enlevant tous les produits non valides
    * c'est à dire ceux dont l'identifiant n'est pas numérique ou dont la quantité est < 1 */

    foreach ($this->quantite as $i => $qte) {
    if ($qte < 0) { /* Attention ici normalement on nettoie si la quantité commandée est < à 1 */
    unset($this->articles[$i]);
    unset($this->quantite[$i]);
    unset($this->couleur[$i]);
    unset($this->taille[$i]);
    unset($this->couleurId[$i]);
    unset($this->tailleId[$i]);
    unset($this->prix[$i]);
    unset($this->prix_ht[$i]);
    unset($this->total_prix[$i]);
    unset($this->total_prix_ht[$i]);
    unset($this->prix_cat[$i]);
    unset($this->prix_cat_ht[$i]);
    unset($this->tva_percent[$i]);
    unset($this->tva[$i]);
    unset($this->poids[$i]);
    unset($this->longueur_prod[$i]);
    unset($this->largeur_prod[$i]);
    unset($this->profondeur_prod[$i]);
    unset($this->poids_prod[$i]);
    unset($this->matiere_prod[$i]);
    unset($this->couleur_prod[$i]);
    unset($this->points[$i]);
    unset($this->remise_produit_percent[$i]);
    unset($this->remise_produit[$i]);
    unset($this->etat_stock[$i]);
    unset($this->delivery_stock[$i]);
    unset($this->option[$i]);
    unset($this->email_check[$i]);
    unset($this->ecotaxe_ttc[$i]);
    unset($this->ecotaxe_ht[$i]);
    }
    }
    }

    .......................

    fin extrait code.

    merci
    • 0
  24. phil83 a ajouté un message dans un sujet  problème commande   

    ? <_< :(
    • 0
  25. phil83 a ajouté un message dans un sujet  problème commande   

    bonsoir,
    je viens de rajouté les 6 champs dans lib/class/caddie.php et aussi dans achat/caddie_ajout.php

    et maintenant j' ai ses erreur la:

    Notice: Undefined variable: longueur_prod in /home/coeurdasie/domains/coeurdasie.fr/public_html/achat/caddie_ajout.php on line 293

    Notice: Undefined variable: largeur_prod in /home/coeurdasie/domains/coeurdasie.fr/public_html/achat/caddie_ajout.php on line 294

    Notice: Undefined variable: profondeur_prod in /home/coeurdasie/domains/coeurdasie.fr/public_html/achat/caddie_ajout.php on line 295

    Notice: Undefined variable: poids_prod in /home/coeurdasie/domains/coeurdasie.fr/public_html/achat/caddie_ajout.php on line 296

    Notice: Undefined variable: matiere_prod in /home/coeurdasie/domains/coeurdasie.fr/public_html/achat/caddie_ajout.php on line 297

    Notice: Undefined variable: couleur_prod in /home/coeurdasie/domains/coeurdasie.fr/public_html/achat/caddie_ajout.php on line 298

    Warning: Cannot modify header information - headers already sent by (output started at /home/coeurdasie/domains/coeurdasie.fr/public_html/achat/caddie_ajout.php:293) in /home/coeurdasie/domains/coeurdasie.fr/public_html/achat/caddie_ajout.php on line 358

    on va pas s'en sortir <_<
    merci
    • 0

Twitter Advisto ecommerce

Facebook PEEL Shopping