Flux d’activité
Flux d’activité de Messages
-
-
Ca ne résoud pas mon problème tout ca ;)
Le client m'a ecrit que maintenant il sait se connecté a son compte (que j'ai crée via le backoffice)
Mais bon rater des ventes a cause du navigateur ca m'hérisse le poil aussi (surtout une commande de 3950€)
Merci
Guillaume
-
excusez moi pourriez vous faire passer ce corrctif au format texte car à partir du forum en copier/coller il existe des erreurs
notamment Page /achat/modeles/caddie ou /modeles/default/caddie.php
merci
-
pruault
Ci dessous les modifications à apporter sur les versions 3.x pour prendre en compte les zones de Tva
Objet /lib/class/caddie.php
Méthode : Recalc_total
function recalc_total() { /* Recalcule le prix total des articles du caddie */ $this->total = 0; $this->total_ht = 0; $this->total_produit_avant_promo = 0; $this->total_produit_avant_promo_ht = 0; $this->total_produit = 0; $this->total_produit_ht = 0; $this->total_tva = 0; $this->total_remise_produit = 0; $this->total_remise_produit_ht = 0; $this->total_remise_client = 0; $this->total_remise_client_ht = 0; $this->total_remise_code = 0; $this->total_remise_code_ht = 0; $this->total_remise_cheque_ht = 0; $this->total_remise_bon_ht = 0; $this->total_poids = 0; $this->total_points = 0; $this->remise_client_percent = vn($_SESSION['utilisateur']['remise_percent']); $this->avoir = vn($_SESSION['utilisateur']['avoir']); $this->ecotaxe_ttc = 0; $this->ecotaxe_ht = 0; $this->ecotaxe_tva = 0; foreach ($this->articles as $i => $produitid) { $qid = mysql_query("SELECT id, poids, points, promotion, id_ecotaxe FROM peel_produits WHERE id= '".intval($produitid)."'"); if ($qid) { if (mysql_num_rows($qid) > 0) { $produit=mysql_fetch_array($qid); $reseco = mysql_query("SELECT prix_ht, prix_ttc FROM peel_ecotaxes WHERE id = '".intval($produit['id_ecotaxe'])."'"); if (mysql_num_rows($reseco) > 0) { $eco = mysql_fetch_object($reseco); $this->ecotaxe_ht += $eco->prix_ht * $this->quantite[$i]; // MODIFICATION ZONE TVA $this->ecotaxe_ttc += ($this->zoneTva == 1) ? $eco->prix_ttc * $this->quantite[$i] : $eco->prix_ht * $this->quantite[$i]; } $this->total_produit += $this->total_prix[$i]; #- Ce total inclut la remise produit, il s'agit du total ttc des produits avant promo et frais de port $this->total_produit_ht += $this->total_prix_ht[$i]; $this->total_tva += $this->tva[$i]; $this->total_remise_produit += $this->remise_produit[$i]; #- A titre indicatif uniquement $this->total_remise_produit_ht += $this->remise_produit[$i] / (1 + $this->tva[$i]); #- A titre indicatif uniquement $this->total_poids += $this->quantite[$i] * $this->poids[$i]; $this->total_points += $this->quantite[$i] * $this->points[$i]; } } } // MODIFICATION ZONE TVA $calcul_tva = ($this->zoneTva == 1) ? 0.196 / 1.196 : 0; $this->ecotaxe_tva = $this->ecotaxe_ttc - $this->ecotaxe_ht; $this->total_tva = $this->ecotaxe_tva + $this->total_tva; $this->total_produit_avant_promo = $this->total_produit + $this->ecotaxe_ttc; $this->total_produit_avant_promo_ht = $this->total_produit_ht + $this->ecotaxe_ht; $this->total_produit = $this->total_produit + $this->ecotaxe_ttc; $this->total_produit_ht = $this->total_produit_ht + $this->ecotaxe_ht; /* On défalque la remise client */ $this->total_remise_client = $this->total_produit * vn($this->remise_client_percent) / 100; $tva_remise_client = $this->total_remise_client * $calcul_tva; $this->total_remise_client_ht = $this->total_remise_client - $tva_remise_client; $this->total_produit = $this->total_produit - $this->total_remise_client; $this->total_tva = $this->total_tva - $tva_remise_client; /* On défalque la remise par code promotionnel */ $this->total_remise_code = $this->total_produit * vn($this->remise_code_percent) /100; $tva_remise_code = $this->total_remise_code * $calcul_tva; $this->total_remise_code_ht = $this->total_remise_code - $tva_remise_code; $this->total_produit = $this->total_produit - $this->total_remise_code; $this->total_tva = $this->total_tva - $tva_remise_code; /* On défalque la remise par chèque cadeau */ $tva_remise_cheque = $this->total_remise_cheque * $calcul_tva; $this->total_remise_cheque_ht = $this->total_remise_cheque - $tva_remise_cheque; $this->total_produit = $this->total_produit - $this->total_remise_cheque; $this->total_tva = $this->total_tva - $tva_remise_cheque; /* On défalque la remise par bon de réduction */ $tva_remise_bon = $this->total_remise_bon * $calcul_tva; $this->total_remise_bon_ht = $this->total_remise_bon - $tva_remise_bon; $this->total_produit = $this->total_produit - $this->total_remise_bon; $this->total_tva = $this->total_tva - $tva_remise_bon; /* On défalque l'avoir client */ $tva_avoir = $this->avoir * $calcul_tva; $this->total_produit = $this->total_produit - $this->avoir; $this->total_tva = $this->total_tva - $tva_avoir; /* On calcul le cout global du caddie */ $this->total_tva = $this->total_tva + $this->tva_transport; $this->total = $this->total_produit + $this->cout_transport + $this->tarif_paiement; $this->total_ht = $this->total - $this->total_tva; } }
Page /achat/caddie_affichage.php Remplacer les lignes 328 & 329 par(isset($_SESSION['utilisateur']['priv']) && $_SESSION['utilisateur']['priv'] == "reve") ? $prix_cat_ht = ($prod['prix_revendeur'] + vn($option)) / (1+$prod['tva']/100) : $prix_cat_ht = ($prod['prix'] + vn($option))/ (1+$prod['tva']/100); $prix_cat = $prix_cat_ht * (1 + $tva_percent/100);
Page /achat/caddie_ajout.php Remplacer les lignes 130 & 131 par(isset($_SESSION['utilisateur']['priv']) && $_SESSION['utilisateur']['priv'] == "reve") ? $prix_cat_ht = ($prod['prix_revendeur'] + vn($option)) / (1+$prod['tva']/100) : $prix_cat_ht = ($prod['prix'] + vn($option))/ (1+$prod['tva']/100); $prix_cat = $prix_cat_ht * (1 + $tva_percent/100);
Page /achat/modeles/caddie ou /modeles/default/caddie.php<? if ($_SESSION['caddie']->compte_elements() == 0) { echo "<div class=\"normal\">".nl2br(EMPTY_CADDIE)."</div>"; return false; } ?> <script language="Javascript"> function frmsubmit(func) { frm = document.entryform; frm.func.value = func; frm.submit(); } </script> <?php echo "<div class=\"entete\"><img src=\"$wwwroot/images/fleche.gif\"> ".CADDIE."</div>" ?> <form name="entryform" method="POST" action="<?=$_SERVER['PHP_SELF']?>"> <input type="hidden" name="func" value=""> <table border="0" cellspacing="5" cellpadding="0" width="100%"> <? echo "<tr><td>"; echo "<div class=\"label_rouge\">"; echo "<blink>"; echo nl2br(stripslashes(vb script:return confirm('Etes-vous sûr de vouloir enlever ce produit du panier ?');" class="normal" href="<?=$_SERVER['PHP_SELF']?>?func=enleve&ligne=<?=$i?>&id=<?=$prod['id']?>"><img src="images/poubelle.gif" width="25" height="25" alt="" border="0"></a></td> <td class="lignecaddie"> <!-- affiche le nom du produit --> <a class="normal" href="achat/produit_details.php?id=<?=$prod['id']?>"><?echo stripslashes($prod['nom_'.$_SESSION['langue'].''])?></a> <?php if (!empty($delivery_stock)) { echo "<br />".DELIVERY_STOCK." : $delivery_stock<br />";} echo (!empty($comment)) ? "<br /><b>".COMMENTS."</b><br /><textarea name=\"comment[]\" class=\"formulaire1\">$comment</textarea>" : "<input type=\"hidden\" name=\"comment[]\" value=\"\" />"; echo (!empty($couleur) > 0) ? "<br /><b>".COLOR."</b> : $couleur<br /> <input type=\"hidden\" name=\"couleur[]\" value=\"$couleur\">" : "<input type=\"hidden\" value=\"\" name=\"couleur[]\">"; echo (!empty($taille) > 0) ? "<br /><b>".SIZE."</b> : $taille<br /> <input type=\"hidden\" name=\"taille[]\" value=\"$taille\">" : "<input type=\"hidden\" value=\"\" name=\"taille[]\">"; echo (!empty($email_check) > 0) ? "<br />".EMAIL_FRIEND." : $email_check<br /> <input type=\"hidden\" name=\"email_check[]\" value=\"$email_check\">" : "<input type=\"hidden\" value=\"\" name=\"email_check[]\">"; echo "</td>"; echo "<td class=\"lignecaddie\" align=\"center\">"; if (!empty($remise_produit)) { echo "<s>".fprix($prix_cat)." €</s> "; } echo fprix($prix)."€"; echo "</td>"; echo "<td class=\"lignecaddie\" align=\"center\">"; echo (!empty($remise_produit)) ? fprix($remise_produit)." € (- $remise_produit_percent %)" : "-"; echo "</td>"; ?> <td class="lignecaddie" align="center"><?=$quantite?><input type="hidden" name="quantite[]" value="<?=$quantite?>" onChange="java script:frmsubmit('recalc');" class="formulaire1"></td> <td class="lignecaddie" align="center"> <?echo fprix($total_prix); ?> € </td> </tr> <? } } } if (!empty($_SESSION['caddie']->ecotaxe_ttc)) { ?> <tr> <td colspan="5" class="normal" align="right">Ecotaxe :</td> <td class="normal" align="right"> <? echo fprix($_SESSION['caddie']->ecotaxe_ttc) ?> € </td> <?php } ?> <tr> <td colspan="5" class="normal" align=right><?echo TOTAL_TTC ?> :</td> <td class="normal" align="right"> <? echo fprix($_SESSION['caddie']->total_produit_avant_promo ) ?> € </td> </tr> <?php #- Si la session client contient une remise en % > 0 if (!empty($_SESSION['caddie']->total_remise_client)) { ?> <tr> <td colspan="5" class="normal" align="right"><?echo REMISE_CLIENT ?> (<? echo $_SESSION['caddie']->remise_client_percent." % "?>):</td> <td class="normal" align="right"> - <? echo fprix($_SESSION['caddie']->total_remise_client) ?> € </td> </tr> <?php } #- Si la session caddie contient un code promotionnel if (!empty($_SESSION['caddie']->total_remise_code) ) { ?> <tr> <td colspan="5" class="normal" align="right"><?echo CODE_PROMO_REMISE." (".$_SESSION['caddie']->remise_code_percent." % ) :";?></td> <td class="normal" align="right"> - <?=fprix($_SESSION['caddie']->total_remise_code) ?> € </td> </tr> <? } #- Si la session caddie contient un chèque cadeau if (!empty($_SESSION['caddie']->total_remise_cheque) ) { ?> <tr> <td colspan="5" class="normal" align="right"><?echo CHEQUE_CADEAU_REMISE." :";?></td> <td class="normal" align="right"> - <?=fprix($_SESSION['caddie']->total_remise_cheque) ?> € </td> </tr> <? } #- Si la session caddie contient un chèque cadeau if (!empty($_SESSION['caddie']->total_remise_bon) ) { ?> <tr> <td colspan="5" class="normal" align="right"><?echo BON_REDUCTION_REMISE." :";?></td> <td class="normal" align="right"> - <?=fprix($_SESSION['caddie']->total_remise_bon) ?> € </td> </tr> <? } #- Si la session caddie contient un chèque cadeau if (!empty($_SESSION['caddie']->avoir) ) { ?> <tr> <td colspan="5" class="normal" align="right"><?echo AVOIR." :";?></td> <td class="normal" align="right"> - <?=fprix($_SESSION['caddie']->avoir) ?> € </td> </tr> <? } ?> <tr> <td colspan="5" class="normal" align=right><?echo SHIPPING_COST?> :</td> <td class="normal" align="right"> <?php echo (!empty($_SESSION['caddie']->cout_transport)) ? $_SESSION['caddie']->cout_transport." €" : "".OFFERED." ".FROM." $seuil_total €"; ?> </td> </tr> <? if ($_SESSION['caddie']->total > 0) { ?> <tr> <td colspan="5" class="normal" align=right><?echo TOTAL_HT ?> :</td> <td class="normal" align="right"> <? echo fprix($_SESSION['caddie']->total_ht) ?> € H.T. </td> </tr> <tr> <td colspan="5" class="normal" align="right"><?echo VAT ?> :</td> <td class="normal" align="right"> <? echo fprix($_SESSION['caddie']->total_tva) ?> € </td> </tr> <tr> <td colspan="5" class="label" align=right><?echo NET ?> :</td> <td class="label" align="right"> <? echo fprix($_SESSION['caddie']->total) ?> € </td> </tr> <? } if ( $_SESSION['caddie']->total_points > 0 ) { ?> <tr> <td colspan="5" class="normal" align="right"><?echo ORDER_POINT ?> :</td> <td class="normal" align="right"> <? echo $_SESSION['caddie']->total_points." ".POINT ?> </td> </tr> <? } ?> <tr> <td colspan="6" class="normal"> <table border="0" cellpadding="5" cellspacing="0" width="100%"> <tr > <td class="label" style="border-top:1px solid black;border-left:1px solid black;border-right:1px solid black;<?php echo (empty($_SESSION['caddie']->zone)) ? "border-bottom:1px solid black;" : "";?>"> <?php if (isset($_SESSION['caddie']->pays)) { $queryPays = mysql_query("SELECT pays_".$_SESSION['langue']." FROM peel_pays WHERE pays_".$_SESSION['langue']." = '".addslashes($_SESSION['caddie']->pays)."'"); if (mysql_num_rows($queryPays) >0) { $objPays = mysql_fetch_array($queryPays); $ship = $objPays['pays_'.$_SESSION['langue'].'']; } } if (!empty($erreur_pays)) {echo "<font color=red><b>$erreur_pays</b></font><br />";} echo COUNTRY_SHIP ?> (*) : <select class="formulaire1" name="pays_zone" onChange="java script:frmsubmit('recalc')"> <option value="|"><?echo COUNTRY_CHOOSE ?></option> <?php $sqlPays = "SELECT id, pays_".$_SESSION['langue'].", zone FROM peel_pays WHERE etat = '1' ORDER BY pays_".$_SESSION['langue'].""; $resPays = mysql_query($sqlPays); if ($resPays) { if (mysql_num_rows($resPays) >0) { while ($Pays = mysql_fetch_array($resPays)) { echo "<option value=\"".$Pays['id']."|".$Pays['zone']."\""; if (vb script:frmsubmit('recalc')"> <option value=""><?echo SHIP_TYPE_CHOOSE ?></option> <?php $queryZone = mysql_query("SELECT id FROM peel_zones WHERE nom_".$_SESSION['langue']." = '".addslashes($_SESSION['caddie']->zone)."'"); $objZone = mysql_fetch_object($queryZone); $sqlType = "SELECT DISTINCT(t.id), t.nom_".$_SESSION['langue']." FROM peel_tarifs tf, peel_types t WHERE t.id = tf.type AND tf.zone = '".$objZone->id."'"; $resType = mysql_query($sqlType) or DIE('Une erreur de connexion à la base s est produite ' . __LINE__ . '.<p>' . MYSQL_ERROR());; if ($resType) { if (mysql_numrows($resType)) { while ($Type = mysql_fetch_array($resType)) { echo "<option value=\"".$Type['nom_'.$_SESSION['langue'].'']."\""; if (vb script:frmsubmit('recalc')"> <a class="normal" href="java script: frmsubmit('recalc');"><img src="images/ok.gif" align="absmiddle"></a><br /> </td> <td colspan="2"> </td> </tr> <tr> <td colspan="5" class='normal'> <b><?echo GIFT_CHECK ?> :</b><br /> <input type="text" class="formulaire1" name="code_cheque" value="<?=strtoupper(vb script:frmsubmit('recalc')"> <a class="normal" href="java script: frmsubmit('recalc');"><img src="images/ok.gif" align="absmiddle"></a><br /> </td> <td colspan="2"> </td> </tr> <tr> <td colspan="5" class='normal'> <b><?echo BON_REDUCTION ?> :</b><br /> <input type="text" class="formulaire1" name="code_bon" value="<?=strtoupper(vb script:frmsubmit('recalc')"> <a class="normal" href="java script: frmsubmit('recalc');"><img src="images/ok.gif" align="absmiddle"></a><br /> </td> <td colspan="2"> </td> </tr> <tr> <td colspan="6" align="right"> <img src="images/actualiser.gif" align="absmiddle"> <a class="normal" href="java script: frmsubmit('recalc');" onMouseOver="return overlib('Vos frais de port sont offerts à partir de <?php echo $seuil_total ?> EUROS d\'achat pour la France métropolitaine');" onMouseOut="return nd();"><?echo UPDATE ?></a> </td> </tr> <tr><td colspan="6" align="center"> <p> <a class="normal" href="java script: frmsubmit('sauvegarde');"><?echo BACKUP ?></b></a> | <a class="normal" href="<?=$wwwroot?>/achat/index.php"><?echo CATALOG?></a> | <a class="normal" href="java script: frmsubmit('vide');"><?echo EMPTY_LIST ?></a> </p> <?php if ($_SESSION['caddie']->total > 0) { ?> <div align="center"><a class="normal" href="java script: frmsubmit('commande');" onMouseOver="return overlib('Vos frais de port sont offerts à partir de <?php echo $seuil_total ?> EUROS d\'achat pour la France métropolitaine');" onMouseOut="return nd();"><b><?echo strtoupper(ORDER) ?></b></a></div> <?php } else { ?> <div align="center" class="normal"><p><?php echo MSG_SUGGEST ?></p></div> <?php } ?> </td></tr></table> </td></tr></table> </form>
Page /achat/modeles/achat_confirmation.php ou /modeles/default/achat_confirmation.php<? if ($_SESSION['caddie']->compte_elements() == 0) { echo EMPTY_CADDIE; return false; } // Détermine le pays : adresse de facturation $tab_pays1 = mysql_fetch_array(mysql_query("SELECT pays_".$_SESSION['langue']." FROM peel_pays WHERE id = '".$pays1."'")); // Déterminer le pays : adresse de livraison echo "<div class=\"entete\"><img src=\"$wwwroot/images/fleche.gif\"> ".STEP2."</div>" ?> <table border="0" width="100%" cellpaddin="0" cellspacing="0"> <tr> <td class=normal><?echo ORDER_DATE?> :</td> <td class=normal><?=date("d-m-Y")?></td> </tr> <tr> <td class="label"><?echo BILL_ADDRESS?></td> </tr> <tr> <td class=normal><?echo CUSTOMER?> :</td> <td class=normal><?=stripslashes($client1) ?></td> </tr> <tr> <td class=normal><?echo TELEPHONE?> :</td> <td class=normal><?=$contact1 ?></td> </tr> <tr> <td class=normal><?echo EMAIL?> :</td> <td class=normal><?=$email1 ?></td> </tr> <tr valign=top> <td class=normal><?echo ADDRESS?> :</td> <td class=normal><?=stripslashes($adresse1) ?><br /><?=$code_postal1 ?> <?=stripslashes($ville1)?><br /><?=stripslashes($tab_pays1['pays_'.$_SESSION['langue'].'']) ?></td> </tr> <tr> <td class="label"><?echo SHIP_ADDRESS?></td> </tr> <tr> <td class=normal><?echo CUSTOMER?> :</td> <td class=normal><?=stripslashes($client2) ?></td> </tr> <tr> <td class=normal><?echo EMAIL?> :</td> <td class=normal><?=$email2 ?></td> </tr> <tr> <td class=normal><?echo TELEPHONE?> :</td> <td class=normal><?=$contact2 ?></td> </tr> <tr valign=top> <td class=normal><?echo ADDRESS?> :</td> <td class=normal><?=stripslashes($adresse2) ?><br /><?=$code_postal2 ?> <?=stripslashes($ville2)?><br /><?=stripslashes($_SESSION['caddie']->pays) ?></td> </tr> <tr valign=top> <td class=normal><?echo PAYEMENT?> :</td> <td class=normal><?=$paiement ?></td> </tr> <tr valign=top> <td class=normal><?echo SHIPPING?> :</td> <td class=normal> <?php echo html_entity_decode($_SESSION['caddie']->zone)." - ". html_entity_decode($_SESSION['caddie']->type); ?></td> </tr> <? if ($commentaires != "") {?> <tr> <td colspan=2 class=normal><?echo COMMENTS?></td> </tr> <tr> <td colspan=2 class=normal><? echo (trim($commentaires) == "" ? "Aucun" : nl2br(stripslashes($commentaires))) ?></td> </tr> <? } else { ?> <tr> <td colspan=2 height=5 class=normal> </td> </tr> <? } ?> </table> <table border="0" cellspacing="1" cellpadding="0" width="100%"> <tr class="caddie"> <td> </td> <td ><?echo PRODUCT ?></td> <td align="center"><?echo UNIT_PRICE?></td> <td align="center"><?echo REMISE_PRODUIT ?></td> <td align="center"><?echo QUANTITY ?></td> <td align="center"><?echo TOTAL_PRICE ?></td> </tr> <? 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) { $prod = mysql_fetch_array($qid); $quantite = $_SESSION['caddie']->quantite[$i]; $couleur = $_SESSION['caddie']->couleur[$i]; $taille = $_SESSION['caddie']->taille[$i]; $prix_cat = $_SESSION['caddie']->prix_cat[$i]; $prix_cat_ht = $_SESSION['caddie']->prix_cat_ht[$i]; $prix = $_SESSION['caddie']->prix[$i]; $prix_ht = $_SESSION['caddie']->prix_ht[$i]; $total_prix = $_SESSION['caddie']->total_prix[$i]; $total_prix_ht = $_SESSION['caddie']->total_prix_ht[$i]; $tva_percent = $_SESSION['caddie']->tva_percent[$i]; $tva = $_SESSION['caddie']->tva[$i]; $poids = $_SESSION['caddie']->poids[$i]; $points = $_SESSION['caddie']->points[$i]; $remise_produit_percent = $_SESSION['caddie']->remise_produit_percent[$i]; $remise_produit = $_SESSION['caddie']->remise_produit[$i]; $comment = $_SESSION['caddie']->comment[$i]; $etat_stock = $_SESSION['caddie']->etat_stock[$i]; $delivery_stock = $_SESSION['caddie']->delivery_stock[$i]; $option = $_SESSION['caddie']->option[$i]; $email_check = $_SESSION['caddie']->email_check[$i]; } } echo "<tr>"; echo "<td class=\"lignecaddie\">".$prod['reference']."</td>"; echo "<td class=\"lignecaddie\">"; echo "<b>".html_entity_decode($prod['nom_'.$_SESSION['langue'].''])."</b><br />"; if (!empty($delivery_stock)) {echo " - ".DELIVERY_STOCK." : $delivery_stock<br />";} if (!empty($couleur)) {echo " - ".COLOR." : $couleur<br />";} if (!empty($taille)) { echo " - ".SIZE." : $taille<br />";} if (!empty($comment)) { echo "<b>".COMMENTS." :</b><br />$comment<br />";} if (!empty($email_check)) { echo "<b>".EMAIL_FRIEND." :</b><br />$email_check<br />";} echo "</td>"; echo "<td class=\"lignecaddie\" align=\"center\">"; if ($prix_cat != $prix) { "<s>".fprix($prix_cat)." €</s> ";} echo fprix($prix)."€"; echo "</td>"; echo "<td class=\"lignecaddie\" align=\"center\">"; echo (!empty($remise_produit)) ? fprix($remise_produit)." € (- $remise_produit_percent %)" : "-"; echo "</td>"; echo "<td class=\"lignecaddie\" align=\"center\">".$quantite."</td>"; echo "<td class=\"lignecaddie\" align=\"center\">"; echo fprix($total_prix)." €"; echo "</td>"; echo "</tr>"; } ?> <?php if (!empty($_SESSION['caddie']->ecotaxe_ttc)) { ?> <tr> <td colspan="5" class="normal" align="right">Ecotaxe :</td> <td class="normal" align="right"> <? echo fprix($_SESSION['caddie']->ecotaxe_ttc) ?> € </td> <?php } ?> <tr> <td colspan="5" class="normal" align=right><?echo TOTAL_TTC ?> :</td> <td class="normal" align="right"> <? echo fprix($_SESSION['caddie']->total_produit_avant_promo ) ?> € </td> </tr> <?php #- Si la session client contient une remise en % > 0 if (!empty($_SESSION['caddie']->total_remise_client)) { ?> <tr> <td colspan="5" class="normal" align="right"><?echo REMISE_CLIENT ?> (<? echo $_SESSION['caddie']->remise_client_percent." % "?>):</td> <td class="normal" align="right"> - <? echo fprix($_SESSION['caddie']->total_remise_client) ?> € </td> </tr> <?php } #- Si la session caddie contient un code promotionnel if (!empty($_SESSION['caddie']->total_remise_code) ) { ?> <tr> <td colspan="5" class="normal" align="right"><?echo CODE_PROMO_REMISE." (".$_SESSION['caddie']->remise_code_percent." % ) :";?></td> <td class="normal" align="right"> - <?=fprix($_SESSION['caddie']->total_remise_code) ?> € </td> </tr> <? } #- Si la session caddie contient un code promotionnel if (!empty($_SESSION['caddie']->total_remise_cheque) ) { ?> <tr> <td colspan="5" class="normal" align="right"><?echo CHEQUE_CADEAU_REMISE." :";?></td> <td class="normal" align="right"> - <?=fprix($_SESSION['caddie']->total_remise_cheque) ?> € </td> </tr> <? } #- Si la session caddie contient un chèque cadeau if (!empty($_SESSION['caddie']->total_remise_bon) ) { ?> <tr> <td colspan="5" class="normal" align="right"><?echo BON_REDUCTION_REMISE." :";?></td> <td class="normal" align="right"> - <?=fprix($_SESSION['caddie']->total_remise_bon) ?> € </td> </tr> <? } #- Si la session caddie contient un code promotionnel if (!empty($_SESSION['caddie']->avoir) ) { ?> <tr> <td colspan="5" class="normal" align="right"><?echo AVOIR." :";?></td> <td class="normal" align="right"> - <?=fprix($_SESSION['caddie']->avoir) ?> € </td> </tr> <? } ?> <tr> <td colspan="5" class="normal" align=right><?echo TOTAL_HT ?> :</td> <td class="normal" align="right"> <? echo fprix($_SESSION['caddie']->total_ht) ?> € H.T. </td> </tr> <tr> <td colspan="5" class="normal" align="right"><?echo VAT ?> :</td> <td class="normal" align="right"> <? echo fprix($_SESSION['caddie']->total_tva) ?> € </td> </tr> <tr> <td colspan="5" class="normal" align=right><?echo SHIPPING_COST?> :</td> <td class="normal" align="right"> <?php echo (!empty($_SESSION['caddie']->cout_transport)) ? $_SESSION['caddie']->cout_transport." €" : "".OFFERED." ".FROM." $seuil_total €"; ?> </td> </tr> <? if ( $_SESSION['caddie']->tarif_paiement > 0 ) { ?> <tr> <td colspan="5" class="normal" align="right"><?echo TARIF_PAIEMENT ?> :</td> <td class="normal" align="right"> <? echo $_SESSION['caddie']->tarif_paiement." €"; ?> </td> </tr> <? } ?> <tr> <td colspan="5" class="label" align=right><?echo NET ?> :</td> <td class="label" align="right"> <? echo fprix($_SESSION['caddie']->total) ?> € </td> </tr> <? if ( $_SESSION['caddie']->total_points > 0 ) { ?> <tr> <td colspan="5" class="normal" align="right"><?echo ORDER_POINT ?> :</td> <td class="normal" align="right"> <? echo $_SESSION['caddie']->total_points." ".POINT ?> </td> </tr> <? } ?> <tr><td colspan=6 align="center"> <form name="entryform" action="<?=$wwwroot?>/achat/fin_commande.php" method="POST"> <input type="submit" value="<?echo ORDER_VALIDATE?>" class="bouton"> </form> </td></tr> <tr><td colspan=6 class=normal> <?echo nl2br(stripslashes(MSG_BACK))?></td></tr> </table>
FICHIER /lib/lang/fr.php
Remplacer define ("TOTAL_TTC","Sous total",TRUE);
Remplacer define ("UNIT_PRICE","P.U.",TRUE);
-
Bonjour !Ca est, pratiquement tout est résolu, sauf une question : lorsque je crée un nouveau produit, je clique sur "ajouter un produit".
Tout en haut de la page nouvellement crée, je trouve "choisissez une catégorie" mais je n'ai rien dedans.
Je remplis tous les champs et, au bout du compte, dans mon back office, j'ai :
Action (dessin d'une poubelle), catégorie : nc (pour non connue).
Que puis-je faire pour modifier ça et que la catégorie apparaisse bien ?
Merci de me l'indiquer.
avant d'insérer un nouveau produit, il faudrait insérer une catégorie,
primo : on créait ses catégories :
secundo : on insère les produits (et de là tu pourras choisir la catégorie du nouveau produit)
-
Bonjour !
Ca est, pratiquement tout est résolu, sauf une question : lorsque je crée un nouveau produit, je clique sur "ajouter un produit".
Tout en haut de la page nouvellement crée, je trouve "choisissez une catégorie" mais je n'ai rien dedans.
Je remplis tous les champs et, au bout du compte, dans mon back office, j'ai :
Action (dessin d'une poubelle), catégorie : nc (pour non connue).
Que puis-je faire pour modifier ça et que la catégorie apparaisse bien ?
Merci de me l'indiquer.
-
il faut modifier l'objet caddie pour cela et ajouter 2 champs attributs dans la table commandesMerci Patrice !
J'ai regardé un peu la chose. Je pense que tu parles de la table commandes_articles (et non commandes) ?
Si je comprends bien, il me faut ajouter un champ "taille" et un champ "couleur" dans cette table.
Et en php :
il me faut modifier : achat\caddie_ajout.php
pour ajouter ces deux variables à la ligne $_SESSION['caddie']->ajout($_REQUEST['id'], $_REQUEST['qte']);
et dans lib\class\caddie.php : il faut modifier la fonction init et la fonction ajout
et il faut modifier toutes les pages qui permettent de commander des produits, pour y ajouter un menu déroulant de taille ou de couleur :
index.php
achat/index.php et
achat/produit_details.php
Mais pour que mes produits "sachent" individuellement qu'ils doivent avoir une taille ou une couleur à gérer, il me faut aussi modifier la table produits;
et du coup administrer/produits.php pour y dire qu'il y a une taille ou/et une couleur à gérer.
J'ai bon ?
J'espère que je ne vais pas mettre le bordel dans la base avec mes modifs... d'autant qu'il faut que mon truc marche dans les jours qui viennent...
Par contre, je vais buter sur un problème : suivant les produits, les choix de tailles ou de couleurs ne sont pas les mêmes (par exemple, certains T-shirts ne sont pas disponibles en taille S) ce qui m'oblige à mettre des choses en "dur" dans les fichiers php... (?)
-
je viens de faire le test et tout fonctionne correctement, peut etre y a t il 2 sessions admin d'ouvertesah, ok, si ce n'est que ça, ça va, c'est bien possible, pour ce site là, il y a deux administrateurs effectivement, et on ne se concerte pas, quand on va dans l'administration,
merci Paulanna,
bonne nuit,
Jackye
-
je viens de faire le test et tout fonctionne correctement, peut etre y a t il 2 sessions admin d'ouvertesY a t-il un moyen de voir si l'on a 2 sessions admin ouvertes ?
C'est dans les cookies ?
-
je viens de faire le test et tout fonctionne correctement, peut etre y a t il 2 sessions admin d'ouvertes
-
-
-
alors, alorstout simplement pourquoi ne pas s'inspirer de ce qui est déjà fait dans utilistateurs/enregistrement.php
n.b : ne pas oublier de créer le champ code_postal dans la table peel_tickets
Je veux bien mais quelles lignes de code reprendre...?
-
Dans la version PREMIUM il y a une détection de cookie, récupérer là et insérez la dans la version SHOPPING;) hum miam, c'est bon les cookies,
merci mr Pruault, allons voir si je sais faire ça
bonne soirée,
Jackye
-
-
pas de souci, en revnache peux tu me l'envoyer son mon email, car le copier/coller donne tout le code au kilomètrewebmaster at regim-minceur.com
l'as tu reçu ? dans ta boite ?
à plus tard,
Jackye
-
Salut,
si besoin je peux filer un coup de main, quel moteur de templates utilises-tu ?
@+
Loading
-
il faut regarder dans modeles/default/templates.php => function affiche_critere_stock0 (si ton produit n'a pas de stock, sinon c'est la fonction affiche_critere_stock1)ensuite pour mettre en ordre il faut utiliser ORDER BY en fin de requete
C'est hélas ce que j'ai déjà fait, mais ça n'y change rien...
-
pruault
Dans la version PREMIUM il y a une détection de cookie, récupérer là et insérez la dans la version SHOPPING
-
pruault
Evidemment c'est possible, mais il faut faire un peu de développement
Les tâches à faire sont
1/ Créer un champ background dans la table categories
2/ Créer un champ de type file dans la gestion des catégories pour pouvoir uploader l'image, s'inspirer du champ Image
3/ Lorsqu'une catid est appelé, il faut récupérer le champ Image et le mettre dans le style de la baliste td qui encadre l'ensemble de la catégorie en bas de la page /modeles/haut.php
mais le mieux ce serait tout de même de nous montrer une capture d'écran de ce que vous voulez sinon on ne voit pas ce que vous voulez faire exactement
-
oui, il faut mettre donc une image en background
exemple
<tr><td class="normal" style="padding-left:10px;padding-top:4px;background-image:url(<?=$wwwroot?>/images/style/regime/section.jpg); background-repeat:repeat-y;width:150px;height:22px;"> <table cellpadding="0" cellspacing="0"> <tr><td> <?php $frm['parent'] = array($catid); construit_menu_arborescent_cat($categorie_options, $frm['parent']); echo "".$categorie_options.""; ?></td></tr> </table> </td></tr>
-
-
pas de souci, en revnache peux tu me l'envoyer son mon email, car le copier/coller donne tout le code au kilomètre
webmaster at regim-minceur.com
-
Bonjour,Il me semble avoir deja lu cela sur le forum, mais je ne retrouve pas le fil.
Donc un client me passe commande par mail (3950€ tout de même) et en dessous il écrit PS je n'arrive pas a m'enregistrer sur votre site, je regarde son adresse mail et je lis ...@aol.com.
Je suppose donc qu'il s'agit du problème du navigateur aol.
Quelqu'un a t'il réussi a le résoudre?
Merci
Guillaume
avec la version shopping, on n'arrive pas à se connecter ou à s'enregistrer correctement,
par contre, avec la version peel premiun hosting, aucun problème même en passant par aol.
Donc......c'est un truc qui a le don de m'hérisser le poil.
-
( $frm['references'] = array() => répond à un ptit bug que j'ai trouvé !pour la 300ieme fois cela ne résoud pas le souci décrit plus haut !
pour ce faire laisser la page produits.php
c'est mon dernier mot
ne te fache pas Paulanna, voici la page produit.php, sans rien de modifier. (car, tant que je n'ai pas une page propre, je ne modifie rien)
<?php
include("../configuration.inc.php");
necessite_identification();
necessite_priv("admin");
$DOC_TITLE = "Gérer les produits";
include("modeles/haut.php");
$start = vn($_REQUEST['start']);// Détermine la variable start (début de page)
switch (vb script:return confirm('Êtes-vous sûr de vouloir supprimer le produit <?php echo addslashes($ligne['nom']) ?> ?');" class="normal" title="Supprimer <?php echo $ligne['nom'] ?>" href="<?php echo $_SERVER['PHP_SELF']?>?mode=suppr&id=<?php echo $ligne['id'] ?>">
<img src=<?php echo $wwwroot?>/images/poubelle.gif border=0></a></td>
<td class="normal" align="center">
<?php
$sqlCAT = "SELECT id, nom FROM peel_categories c, peel_produits_categories pc WHERE pc.produit_id = ".$ligne['id']." AND c.id = pc.categorie_id";
$resCAT = mysql_query($sqlCAT);
if (mysql_num_rows($resCAT) > 0) {
while ($cat = mysql_fetch_array($resCAT)) {
echo html_entity_decode($cat['nom'])."<br />";
}
} else {
echo "<font color=\"red\"><b>n.c</b></font>";
}
?>
</td>
<td class="normal" align="center"><a class="normal" title="Modifier ce produit" href="<?php echo $_SERVER['PHP_SELF']?>?mode=modif&id=<?php echo $ligne['id'] ?>"><?php echo stripslashes($ligne['nom'])?></a></td>
<td class="normal" align="center"><?php echo $ligne['prix'] ?> € T.T.C</td>
<td align="center" class="normal"><?php if (empty($ligne['etat'])) {echo "<img src=\"".$wwwroot."/administrer/images/puce-blanche.gif\" alt=\"\" />";} else {echo "<img src=\"".$wwwroot."/administrer/images/puce-verte.gif\" alt=\"\" />";} ?></td>
<td align="center" class="label"><?php if (empty($ligne['on_stock'])) { echo "n.a"; } else { echo ($ligne['stock'] <= 0) ? "<font color=\"red\">".$ligne['stock']."</font>" : $ligne['stock'];} ?></td>
<td class="normal" align="center"><?php echo date("d-m-Y", strtotime($ligne['date_maj'])) ?></td>
</tr>
<tr><td align="center" class="normal" colspan="7">
<?php
$i++;
}
}
//Boutons précédent et suivant
if($start)
{
print("<a class=\"normal\" href=\"".$_SERVER['PHP_SELF']."?start=".($start-$nb)."&categorie=".vb($frm['categorie'])."\">page précédent</a>");}
$result=mysql_query($sql_count);
$row=mysql_fetch_row($result);
if($row[0]>($start+$nb))
{
if($start) {print(" / ");}
print("<a class=\"normal\" href=\"".$_SERVER['PHP_SELF']."?start=".($start+$nb)."&categorie=".vb($frm['categorie'])."\">page suivante</a>");
}
print("<br />");
//Affichage des pages
if($row[0]>$nb) // le nombre d'enreg. est > au nb de lignes d'affichage ?
for($index=0;($index*$nb)<$row[0];$index++) // oui alors on affiche les numéros de pages
{
?>
<a class="normal" href="<?php echo $_SERVER['PHP_SELF']."?start=".$index*$nb; ?>&categorie=<?php echo vb($frm['categorie'])?>"><?php echo $index+1; ?></a>
<?php
}
echo "</td></tr></table>";
}
function valide_form_produit(&$frm, &$erreurs) {
$erreurs = array();
$msg = array();
if (empty($frm['nom'])) {
$erreurs['nom'] = true;
$msg['nom'] = " Vous devez insérer un nom de produit.";
}
return $msg;
}
?>[/codebox]
fonction revendeur
dans Module PEEL Premium pour PEEL SHOPPING
amap
Posté(e) · Signaler ce message
bonjour,
j'ai enregistré un revendeur dans le back office, en lui donnant bien la mention "revendeur"
Je n'ai enregistré aucun prix spécial revendeur dans mes produits car, c'est moi qui fait les factures manuellement avec ebp pour mes revendeurs.
Quand je m'enregistre sous l'email du revendeur avec son password, je simule une commande, je vois bien que les prix ne s'affichent pas (c'est ce que je veux) quand j'ajoute un produit, par contre, quand je veux finaliser la commande, j'ai deux lignes erreur dans la page affichage caddie.php
achat/caddie_affichage.php on line 594
voici la première ligne
et la ligne 125
puis-je régler ce problème (pas toute seule cependant)
merci pour votre aide