Script de paiement PAYPAL en PHP
jordane45 Messages postés 38486 Date d'inscription Statut Modérateur Dernière intervention -
Bonjour,
depuis peu, mon formulaire de paiment de prend plus en charge les frais de port.
J'ai tout essayé mais rien n'y fais, la valeur est envoyé dans paypal sans les frais de port. Quelqu'un aurait-il une idée?
<?php
if( isset($_GET['qte1']) )
{
$qte1=$_GET['qte1'];
}
else
{
$qte1=0;
}
if(isset($_GET['qte2'])){$qte2=$_GET['qte2'];}else{$qte2=0;}
if(isset($_GET['qte3'])){$qte3=$_GET['qte3'];}else{$qte3=0;}
if(isset($_GET['qte4'])){$qte4=$_GET['qte4'];}else{$qte4=0;}
if(isset($_GET['qte5'])){$qte5=$_GET['qte5'];}else{$qte5=0;}
if(isset($_GET['qte6'])){$qte6=$_GET['qte6'];}else{$qte6=0;}
if(isset($_GET['qte7'])){$qte7=$_GET['qte7'];}else{$qte7=0;}
if(isset($_GET['qte8'])){$qte8=$_GET['qte8'];}else{$qte8=0;}
if(isset($_GET['total1'])){$total1=$_GET['total1'];}else{$total1=0;}
if(isset($_GET['total2'])){$total2=$_GET['total2'];}else{$total2=0;}
if(isset($_GET['total3'])){$total3=$_GET['total3'];}else{$total3=0;}
if(isset($_GET['total4'])){$total4=$_GET['total4'];}else{$total4=0;}
if(isset($_GET['total5'])){$total5=$_GET['total5'];}else{$total5=0;}
if(isset($_GET['total6'])){$total6=$_GET['total6'];}else{$total6=0;}
if(isset($_GET['total7'])){$total7=$_GET['total7'];}else{$total7=0;}
if(isset($_GET['total8'])){$total8=$_GET['total8'];}else{$total8=0;}
if(isset($_GET['Total-def'])){$totaldef=$_GET['Total-def'];}else{$totaldef=0;}
if(isset($_GET['boutonchariot'])){$btnchariot=$_GET['boutonchariot'];}else{$btnchariot='chq';}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php if ($btnchariot == 'chq') { ?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>SIDDOUR MAGUEN AVOT - TARIFS WEB PREFERENTIELS</title>
<style type="text/css">
<!--
#form1 label {
width: 130px;
display: inline-block;
}
#form1 input {
width: 300px;
background-color: #FFC;
}
#reglt {
font-weight: bold;
border-top-style: none;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
}
body, h1, h2, h3, h4, h5, h6, p {
margin: 0px;
padding: 0px;
}
#form1 p {
margin-bottom: 10px;
}
body {
margin-left: 10px;
}
#message_livraison_gratuite {
width: 100%;
border-top-style: none;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
display: none;
font-family: Georgia, "Times New Roman", Times, serif;
color: #F30;
}
-->
</style>
<script type="text/javascript">
function frais_livraison()
{
//poids siddour
var PoidsU = 735 ;
//poids format poche
var PoidsU1 = 150 ;
//poids format ecoles
var PoidsU2 = 441 ;
//poids minha arvit
var PoidsU3 = 50 ;
var Emballage = 0 ;
if((qte1+qte2+qte3+qte4+qte5)>1){Emballage=200;}
var qte1 = document.getElementById('qte1').value ;
var qte2 = document.getElementById('qte2').value ;
var qte3 = document.getElementById('qte3').value ;
var qte4 = document.getElementById('qte4').value ;
var qte5 = document.getElementById('qte5').value ;
var qte6 = document.getElementById('qte6').value ;
var qte7 = document.getElementById('qte7').value ;
var qte8 = document.getElementById('qte8').value ;
qte1 = parseFloat(qte1);
qte2 = parseFloat(qte2);
qte3 = parseFloat(qte3);
qte4 = parseFloat(qte4);
qte5 = parseFloat(qte5);
qte6 = parseFloat(qte6);
qte7 = parseFloat(qte7);
qte8 = parseFloat(qte8);
var QteTotal = qte1 + qte2 + qte3 + qte4 + qte5 + qte6 + qte7 + qte8 ;
//alert('quantites totales' +QteTotal);
var PoidsTotal = (PoidsU * (qte1 + qte2 + qte3 + qte4 + qte5)) + (PoidsU1 * qte6) + (PoidsU2 * qte7) + (PoidsU3 * qte8) + Emballage;
//alert('poids total' +PoidsTotal);
var PrixEnvoi = 0 ;
var alerte_poids = false ;
var T1 = 500 ;
var T2 = 1000 ;
var T3 = 2000 ;
var T4 = 3000 ;
var T5 = 5000 ;
var T6 = 7000 ;
var T7 = 10000 ;
var T8 = 15000 ;
var T9 = 30000 ;
var P1 = 350 ;
var P2 = 600 ;
var P3 = 915 ;
var P4 = 1410 ;
var P5 = 1410 ;
var P6 = 2050 ;
var P7 = 2050 ;
var P8 = 2600 ;
var P9 = 3220 ;
if(PoidsTotal<=T1){PrixEnvoi=P1;}
if(PoidsTotal>T1 && PoidsTotal<=T2){PrixEnvoi=P2;}
if(PoidsTotal>T2 && PoidsTotal<=T3){PrixEnvoi=P3;}
if(PoidsTotal>T3 && PoidsTotal<=T4){PrixEnvoi=P4;}
if(PoidsTotal>T4 && PoidsTotal<=T5){PrixEnvoi=P5;}
if(PoidsTotal>T5 && PoidsTotal<=T6){PrixEnvoi=P6;}
if(PoidsTotal>T6 && PoidsTotal<=T7){PrixEnvoi=P7;}
if(PoidsTotal>T7 && PoidsTotal<T8){PrixEnvoi=P8;}
if(PoidsTotal>T8 && PoidsTotal<T9){PrixEnvoi=P9;}
if(PoidsTotal>=T9){alerte_poids=true;}
//il sagit du nb d'ex mini dt la liv est offerte
var livraison_gratuite = Math.ceil(T9/PoidsU) ;
PrixEnvoi = PrixEnvoi/100 ;
if(alerte_poids==true)
{
//alert('La livraison est offerte pour l\'Ile de France à partir de '+livraison_gratuite+' exemplaires. \n Autres régions, nous consulter au 06.28.07.68.08');
alert('La livraison est offerte pour l\'Ile de France à partir de 30KG. \n Autres régions, nous consulter au 06.28.07.68.08');
//var message_boite_alert = 'La livraison est offerte pour l\'Ile de France à partir de '+livraison_gratuite+' exemplaires. Autres régions, nous consulter.');
document.getElementById('message_livraison_gratuite').style.display='block';
//document.getElementById('message_livraison_gratuite').value='La livraison est offerte pour l\'Ile de France à partir de '+livraison_gratuite+' exemplaires. Autres régions, nous consulter au 06.28.07.68.08';
document.getElementById('message_livraison_gratuite').value='La livraison est offerte pour l\'Ile de France à partir de 30KG. Autres régions, nous consulter au 06.28.07.68.08';
document.getElementById('fraisport').value = 'Livraison offerte en IDF';
var reglement_total = parseFloat(document.getElementById('Totaldef').value) ;
document.getElementById('totalreglement').value = reglement_total ;
document.getElementById('reglt').value = reglement_total+' €';
}
else
{
document.getElementById('fraisport').value = PrixEnvoi;
var reglement_total = PrixEnvoi + parseFloat(document.getElementById('Totaldef').value) ;
document.getElementById('totalreglement').value = reglement_total ;
document.getElementById('reglt').value = reglement_total+' €' ;
}
}
</script>
</head>
<body>
<div align="center">
<h1>Bon de commande France</h1>
<h2>(Autres pays, nous contacter)</h2>
<p> </p>
<table border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="right">
<form id="form1" name="form1" method="post" action="">
<p>
<label for="nom">Nom :</label>
<input type="text" name="nom" id="nom" />
</p>
<p>
<label for="prenom">Prénom :</label>
<input type="text" name="prenom" id="prenom" />
</p>
<p>
<label for="adresse">Adresse :</label>
<input type="text" name="adresse" id="adresse" />
</p>
<p>
<label for="Adresse2">Adresse (suite) :</label>
<input type="text" name="Adresse2" id="Adresse2" />
</p>
<p>
<label for="codepostal">Code postal :</label>
<input type="text" name="codepostal" id="codepostal" />
</p>
<p>
<label for="Ville">Ville :</label>
<input type="text" name="Ville" id="Ville" />
</p>
<p>
<label for="mail">Mail :</label>
<input type="text" name="mail" id="mail" />
</p>
<p>
<label for="tel">Téléphone :</label>
<input type="text" name="tel" id="tel" />
</p>
</form>
</td>
</tr>
</table>
<p> </p>
<h2>Détail de ma commande :</h2>
<p> </p>
<table border="0" align="center" cellpadding="0" cellspacing="0">
<tr class="libelle">
<td width="161">Couleur</td>
<td width="152" class="centre">Qtés</td>
<td width="5" class="centre"> </td>
<td width="171" class="centre">Total</td>
</tr>
<tr class="petite_ligne">
<td width="161"> </td>
<td width="152"> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td width="161">Noir brillant</td>
<td width="152"><input name="qte4" type="text" id="qte4" value="<?php echo $qte4;?>" readonly="readonly" /></td>
<td class="centre"> </td>
<td><input name="total4" type="text" id="total4" value="<?php echo $total4;?>" readonly="readonly" /></td>
</tr>
<tr>
<td width="161">Blanc brillant</td>
<td width="152"><input name="qte5" type="text" id="qte5" value="<?php echo $qte5;?>" readonly="readonly" /></td>
<td class="centre"> </td>
<td><input name="total5" type="text" id="total5" value="<?php echo $total5;?>" readonly="readonly" /></td>
</tr>
<tr>
<td>Gris argenté</td>
<td><input name="qte3" type="text" id="qte3" value="<?php echo $qte3;?>" readonly="readonly" /></td>
<td class="centre"> </td>
<td><input name="total3" type="text" id="total3" value="<?php echo $total3;?>" readonly="readonly" /></td>
</tr>
<tr>
<td width="161">Bleu</td>
<td width="152" class="centre"><input name="qte1" type="text" id="qte1" value="<?php echo $qte1;?>" readonly="readonly" /></td>
<td class="centre"> </td>
<td><input name="total1" type="text" id="total1" value="<?php echo $total1;?>" readonly="readonly" /></td>
</tr>
<tr>
<td width="161">Rouge</td>
<td width="152"><input name="qte2" type="text" id="qte2" value="<?php echo $qte2;?>" readonly="readonly" /></td>
<td class="centre"> </td>
<td><input name="total2" type="text" id="total2" value="<?php echo $total2;?>" readonly="readonly" /></td>
</tr>
<tr>
<td width="161">Poche broché</td>
<td width="152"><input name="qte6" type="text" id="qte6" value="<?php echo $qte6;?>" readonly="readonly" /></td>
<td class="centre"> </td>
<td><input name="total6" type="text" id="total6" value="<?php echo $total6;?>" readonly="readonly" /></td>
</tr>
<tr>
<td width="161">Format Ecoles</td>
<td width="152"><input name="qte7" type="text" id="qte7" value="<?php echo $qte7;?>" readonly="readonly" /></td>
<td class="centre"> </td>
<td><input name="total7" type="text" id="total7" value="<?php echo $total7;?>" readonly="readonly" /></td>
</tr>
<tr>
<td width="161">Min'ha - Arvit</td>
<td width="152"><input name="qte8" type="text" id="qte8" value="<?php echo $qte8;?>" readonly="readonly" /></td>
<td class="centre"> </td>
<td><input name="total8" type="text" id="total8" value="<?php echo $total8;?>" readonly="readonly" /></td>
</tr>
<tr>
<td colspan="3" class="centre"> </td>
<td> </td>
</tr>
<tr>
<td colspan="3" class="centre">Total</td>
<td><input name="Totaldef" type="text" id="Totaldef" value=" <?php echo $totaldef;?>" readonly="readonly" /></td>
</tr>
<tr>
<td colspan="3" class="centre"> </td>
<td> </td>
</tr>
<tr>
<td colspan="3" class="centre"><label for="fraisport">Frais de port :</label></td>
<td><input type="text" name="fraisport" id="fraisport" /></td>
</tr>
<tr>
<td colspan="4" class="centre"><textarea name="message_livraison_gratuite" id="message_livraison_gratuite"></textarea></td>
</tr>
<tr>
<td colspan="3" class="centre"> </td>
<td> </td>
</tr>
<tr>
<td colspan="3" class="centre"><label for="totalreglement2">Total à régler :</label></td>
<td><input type="text" name="totalreglement" id="totalreglement" /></td>
</tr>
<tr>
<td colspan="3" class="centre"> </td>
<td> </td>
</tr>
<tr>
<td colspan="4" class="centre"><p align="left">Merci de bien vouloir retourner ce bon de commande accompagné</p>
<p>de votre règlement par chèque d'un montant total de
<input name="reglt" type="text" id="reglt" />
</p>
<p align="left">libellé à l'ordre de<strong> Zmanim Diffusion</strong> à :</p></td>
</tr>
<tr>
<td colspan="3" class="centre"> </td>
<td> </td>
</tr>
<tr>
<td colspan="4" class="centre"><h4 >ZMANIM DIFFUSION</h4>
<h4 >19 BIS RUE DU SOLEIL</h4>
<h4 >94380 BONNEUIL-SUR-MARNE</h4>
<p></p></td>
</tr>
<tr>
<td colspan="3" class="centre"> </td>
<td> </td>
</tr>
<tr>
<td colspan="2" bordercolor="#FFFFFF"><div align="center"><a href="javascript:window.print()">Imprimer</a></div></td>
<td colspan="2" bordercolor="#FFFFFF"><div align="center"><a href="siddour.php">Retour au site</a></div></td>
</tr>
</table>
<div align="left"></div>
<p align="left"> </p>
<script type="text/javascript">
frais_livraison();
</script>
</div>
<?php } else { ?>
<?php include('include/link.php'); ?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>SIDDOUR MAGUEN AVOT - TARIFS WEB PREFERENTIELS</title>
<style type="text/css">
<!--
#form1 label {
width: 130px;
display: inline-block;
}
#form1 input {
width: 300px;
background-color: #FFC;
}
#reglt {
font-weight: bold;
border-top-style: none;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
}
body, h1, h2, h3, h4, h5, h6, p {
margin: 0px;
padding: 0px;
}
#form1 p {
margin-bottom: 10px;
}
body {
margin-left: 10px;
}
#message_livraison_gratuite {
width: 100%;
border-top-style: none;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
display: none;
font-family: Georgia, "Times New Roman", Times, serif;
color: #F30;
}
.lien_revendeur {
color: #F30;
text-align: center;
display: block;
font-family: Verdana, Geneva, sans-serif;
}
a:hover.lien_revendeur {
text-decoration: none;
color: #FFF;
}
#form1 p {
color: #FFF;
text-align: center;
font-weight: bold;
font-family: Georgia, "Times New Roman", Times, serif;
font-size: 14px;
}
.Style4 {color: #00FFFF}
.Style5 {color: #FFFFFF}
.Style6 {color: #FFFF00}
.Style10 {color: #40352D}
.Style11 {color: #99FF66}
.Style15 {color: #CCFF66; font-weight: bold; }
.Style17 {
color: #CCFFFF
}
.Style19 {color: #FFCC99}
.Style20 {
color: #FFCC66;
font-size: 14px;
}
.Style21 {font-size: 14px}
.Style23 {font-size: 14px; color: #FFFFFF;}
.Style26 {
font-size: 14px;
color: #FF9900;
font-weight: bold;
}
.Style28 {color: #FFFF00; font-weight: bold; }
.Style29 {
color: #FF9900;
font-weight: bold;
}
.Style31 {font-size: 14px; color: #FFFF00; font-weight: bold; }
-->
</style>
<script type="text/javascript">
function frais_livraison()
{
//poids siddour
var PoidsU = 735 ;
//poids format poche
var PoidsU1 = 150 ;
//poids format ecoles
var PoidsU2 = 441 ;
//poids minha arvit
var PoidsU3 = 50 ;
var Emballage = 0 ;
if((qte1+qte2+qte3+qte4+qte5)>1){Emballage=200;}
var qte1 = document.getElementById('qte1').value ;
var qte2 = document.getElementById('qte2').value ;
var qte3 = document.getElementById('qte3').value ;
var qte4 = document.getElementById('qte4').value ;
var qte5 = document.getElementById('qte5').value ;
var qte6 = document.getElementById('qte6').value ;
var qte7 = document.getElementById('qte7').value ;
var qte8 = document.getElementById('qte8').value ;
qte1 = parseFloat(qte1);
qte2 = parseFloat(qte2);
qte3 = parseFloat(qte3);
qte4 = parseFloat(qte4);
qte5 = parseFloat(qte5);
qte6 = parseFloat(qte6);
qte7 = parseFloat(qte7);
qte8 = parseFloat(qte8);
var QteTotal = qte1 + qte2 + qte3 + qte4 + qte5 + qte6 + qte7 + qte8 ;
//alert('quantites totales' +QteTotal);
var PoidsTotal = (PoidsU * (qte1 + qte2 + qte3 + qte4 + qte5)) + (PoidsU1 * qte6) + (PoidsU2 * qte7) + (PoidsU3 * qte8) + Emballage;
//alert('poids total' +PoidsTotal);
var PrixEnvoi = 0 ;
var alerte_poids = false ;
var T1 = 500 ;
var T2 = 1000 ;
var T3 = 2000 ;
var T4 = 3000 ;
var T5 = 5000 ;
var T6 = 7000 ;
var T7 = 10000 ;
var T8 = 15000 ;
var T9 = 30000 ;
var P1 = 350 ;
var P2 = 600 ;
var P3 = 915 ;
var P4 = 1410 ;
var P5 = 1410 ;
var P6 = 2050 ;
var P7 = 2050 ;
var P8 = 2600 ;
var P9 = 3220 ;
if(PoidsTotal<=T1){PrixEnvoi=P1;}
if(PoidsTotal>T1 && PoidsTotal<=T2){PrixEnvoi=P2;}
if(PoidsTotal>T2 && PoidsTotal<=T3){PrixEnvoi=P3;}
if(PoidsTotal>T3 && PoidsTotal<=T4){PrixEnvoi=P4;}
if(PoidsTotal>T4 && PoidsTotal<=T5){PrixEnvoi=P5;}
if(PoidsTotal>T5 && PoidsTotal<=T6){PrixEnvoi=P6;}
if(PoidsTotal>T6 && PoidsTotal<=T7){PrixEnvoi=P7;}
if(PoidsTotal>T7 && PoidsTotal<T8){PrixEnvoi=P8;}
if(PoidsTotal>T8 && PoidsTotal<T9){PrixEnvoi=P9;}
if(PoidsTotal>=T9){alerte_poids=true;}
//il sagit du nb d'ex mini dt la liv est offerte
var livraison_gratuite = Math.ceil(T9/PoidsU) ;
PrixEnvoi = PrixEnvoi/100 ;
if(alerte_poids==true)
{
//alert('La livraison est offerte pour l\'Ile de France à partir de '+livraison_gratuite+' exemplaires. \n Autres régions, nous consulter au 06.28.07.68.08');
alert('La livraison est offerte pour l\'Ile de France à partir de 30KG. \n Autres régions, nous consulter au 06.28.07.68.08');
//var message_boite_alert = 'La livraison est offerte pour l\'Ile de France à partir de '+livraison_gratuite+' exemplaires. Autres régions, nous consulter.');
document.getElementById('message_livraison_gratuite').style.display='block';
//document.getElementById('message_livraison_gratuite').value='La livraison est offerte pour l\'Ile de France à partir de '+livraison_gratuite+' exemplaires. Autres régions, nous consulter au 06.28.07.68.08';
document.getElementById('message_livraison_gratuite').value='La livraison est offerte pour l\'Ile de France à partir de 30KG. Autres régions, nous consulter au 06.28.07.68.08';
document.getElementById('fraisport').value = 'Livraison offerte en IDF';
var reglement_total = parseFloat(document.getElementById('Totaldef').value) ;
document.getElementById('totalreglement').value = reglement_total ;
document.getElementById('reglt').value = reglement_total+' €';
}
else
{
document.getElementById('fraisport').value = PrixEnvoi;
var reglement_total = PrixEnvoi + parseFloat(document.getElementById('Totaldef').value) ;
document.getElementById('totalreglement').value = reglement_total ;
document.getElementById('reglt').value = reglement_total+' €' ;
}
document.getElementById('amount_<?php echo $bouc; ?>').value = PrixEnvoi ;
}
</script>
</head>
<body id="siddour">
<div id="conteneur">
<?php include('include/tetiere.php'); ?>
<?php include('include/menu.php'); ?>
<script type="text/javascript">
$(document).ready(function() {
// $('#corps p').html($('title').html() );
// $('#footer').after('<h1 align ="center">Veuillez ne pas poster de commentaires injurieux.</h1>');
// $('#fin_footer p span').click( function() { window.location.href='emailing/index.html'; } );
// $("#footer").fadeOut(2000);
/*$('#tetiere area').click(function(e){
e.preventDefault(); //supprime le lien
$("#message_alerte").fadeIn(2000);
$("#message_alerte").fadeOut(16000);
});*/
$('#message_alerte').click(function(){
$("#message_alerte").fadeOut();
});
/*
$('#menu a').click(function(e){
e.preventDefault();
alert($(this).html()+ " va disparaitre");
$(this).hide();//hide=fadeOut(0)
});*/
$("#message_alerte").fadeIn(4000);
setTimeout(function(){$("#message_alerte").fadeOut(5000);},25000);
}); // NE JAMAIS SUPPRIMER
</script>
<div onMouseOver="gestion_smenu('')" id="corps">
<div align="center">
<p> </p>
<h1>Bon de commande France</h1>
<h2>(Autres pays, nous contacter)</h2>
<p> </p>
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<p> </p>
<h2>Détail de ma commande :</h2>
<p> </p>
<table border="0" align="center" style="font-size:16px" cellpadding="0" cellspacing="0">
<tr class="libelle">
<td width="161">Couleurs</td>
<td width="152" class="centre">Qtés</td>
<td width="5" class="centre"> </td>
<td width="171" class="centre">Total</td>
</tr>
<tr class="petite_ligne">
<td width="161"> </td>
<td width="152"> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td width="161">NOIR BRILLANT</td>
<?php
$bouc = 1;
if ($qte4 != 0)
{
echo '<input type="hidden" name="item_name_'.$bouc.'" value="Siddour Noir brillant">'."\n";
echo '<input type="hidden" name="quantity_'.$bouc.'" value="'.$qte4.'">'."\n";
echo '<input type="hidden" name="amount_'.$bouc.'" value="'.$total4/$qte4.'">'."\n";
$bouc ++;
}
?>
<td width="152"><input name="qte4" type="text" id="qte4" value="<?php echo $qte4;?>" readonly="readonly" /></td>
<td class="centre"> </td>
<td><input name="total4" type="text" id="total4" value="<?php echo $total4;?>" readonly="readonly" /></td>
</tr>
<tr>
<td width="161">BLANC BRILLANT</td>
<?php
if ($qte5 != 0)
{
echo '<input type="hidden" name="item_name_'.$bouc.'" value="Siddour Blanc brillant">'."\n";
echo '<input type="hidden" name="quantity_'.$bouc.'" value="'.$qte5.'">'."\n";
echo '<input type="hidden" name="amount_'.$bouc.'" value="'.$total5/$qte5.'">'."\n";
$bouc ++;
}
?>
<td width="152"><input name="qte5" type="text" id="qte5" value="<?php echo $qte5;?>" readonly="readonly" /></td>
<td class="centre"> </td>
<td><input name="total5" type="text" id="total5" value="<?php echo $total5;?>" readonly="readonly" /></td>
</tr>
<tr>
<td width="161">GRIS ARGENTE</td>
<?php
if ($qte3 != 0)
{
echo '<input type="hidden" name="item_name_'.$bouc.'" value="Siddour Gris argenté">'."\n";
echo '<input type="hidden" name="quantity_'.$bouc.'" value="'.$qte3.'">'."\n";
echo '<input type="hidden" name="amount_'.$bouc.'" value="'.$total3/$qte3.'">'."\n";
$bouc ++;
}
?>
<td width="152"><input name="qte3" type="text" id="qte3" value="<?php echo $qte3;?>" readonly="readonly" /></td>
<td class="centre"> </td>
<td><input name="total3" type="text" id="total3" value="<?php echo $total3;?>" readonly="readonly" /></td>
</tr>
<tr>
<td width="161">BLEU</td>
<?php
if ($qte1 != 0)
{
echo '<input type="hidden" name="item_name_'.$bouc.'" value="Siddour Bleu">'."\n";
echo '<input type="hidden" name="quantity_'.$bouc.'" value="'.$qte1.'">'."\n";
echo '<input type="hidden" name="amount_'.$bouc.'" value="'.$total1/$qte1.'">'."\n";
$bouc ++;
}
?>
<td width="152"><input name="qte1" type="text" id="qte1" value="<?php echo $qte1;?>" readonly="readonly" /></td>
<td class="centre"> </td>
<td><input name="total1" type="text" id="total1" value="<?php echo $total1;?>" readonly="readonly" /></td>
</tr>
<tr>
<td width="161">ROUGE</td>
<?php
if ($qte2 != 0)
{
echo '<input type="hidden" name="item_name_'.$bouc.'" value="Siddour Rouge">'."\n";
echo '<input type="hidden" name="quantity_'.$bouc.'" value="'.$qte2.'">'."\n";
echo '<input type="hidden" name="amount_'.$bouc.'" value="'.$total2/$qte2.'">'."\n";
$bouc ++;
}
?>
<td width="152"><input name="qte2" type="text" id="qte2" value="<?php echo $qte2;?>" readonly="readonly" /></td>
<td class="centre"> </td>
<td><input name="total2" type="text" id="total2" value="<?php echo $total2;?>" readonly="readonly" /></td>
</tr>
<tr>
<td width="161">POCHE BROCHE</td>
<?php
if ($qte6 != 0)
{
echo '<input type="hidden" name="item_name_'.$bouc.'" value="Siddour Poche broché">'."\n";
echo '<input type="hidden" name="quantity_'.$bouc.'" value="'.$qte6.'">'."\n";
echo '<input type="hidden" name="amount_'.$bouc.'" value="'.$total6/$qte6.'">'."\n";
$bouc ++;
}
?>
<td width="152"><input name="qte6" type="text" id="qte6" value="<?php echo $qte6;?>" readonly="readonly" /></td>
<td class="centre"> </td>
<td><input name="total6" type="text" id="total6" value="<?php echo $total6;?>" readonly="readonly" /></td>
</tr>
<tr>
<td width="161">FORMAT ECOLE</td>
<?php
if ($qte7 != 0)
{
echo '<input type="hidden" name="item_name_'.$bouc.'" value="Siddour Format Ecoles">'."\n";
echo '<input type="hidden" name="quantity_'.$bouc.'" value="'.$qte7.'">'."\n";
echo '<input type="hidden" name="amount_'.$bouc.'" value="'.$total7/$qte7.'">'."\n";
$bouc ++;
}
?>
<td width="152"><input name="qte7" type="text" id="qte7" value="<?php echo $qte7;?>" readonly="readonly" /></td>
<td class="centre"> </td>
<td><input name="total7" type="text" id="total7" value="<?php echo $total7;?>" readonly="readonly" /></td>
</tr>
<tr>
<td width="161">MIN'HA - ARVIT</td>
<?php
if ($qte8 != 0)
{
echo '<input type="hidden" name="item_name_'.$bouc.'" value="Siddour Min\'ha - Arvit">'."\n";
echo '<input type="hidden" name="quantity_'.$bouc.'" value="'.$qte8.'">'."\n";
echo '<input type="hidden" name="amount_'.$bouc.'" value="'.$total8/$qte8.'">'."\n";
$bouc ++;
}
?>
<td width="152"><input name="qte8" type="text" id="qte8" value="<?php echo $qte8;?>" readonly="readonly" /></td>
<td class="centre"> </td>
<td><input name="total8" type="text" id="total8" value="<?php echo $total8;?>" readonly="readonly" /></td>
</tr>
<tr>
<td colspan="3" class="centre"> </td>
<td> </td>
</tr>
<tr>
<td colspan="3" class="centre">Total</td>
<td><input name="Totaldef" type="text" id="Totaldef" value=" <?php echo $totaldef;?>" readonly="readonly" /></td>
</tr>
<tr>
<td colspan="3" class="centre"> </td>
<td> </td>
</tr>
<tr>
<td colspan="3" class="centre"><label for="fraisport">Frais de port :</label></td>
<td>
<input type="text" name="fraisport" id="fraisport" />
<?php
echo '<input type="hidden" name="item_name_'.$bouc.'" value="Frais de port">'."\n";
echo '<input type="hidden" name="quantity_'.$bouc.'" value="1">'."\n";
echo '<input type="hidden" name="amount_'.$bouc.'" value="'.$frais.'">'."\n";
?> </td>
</tr>
<tr>
<td colspan="4" class="centre"><textarea name="message_livraison_gratuite" id="message_livraison_gratuite"></textarea></td>
</tr>
<tr>
<td colspan="3" class="centre"> </td>
<td> </td>
</tr>
<tr>
<td colspan="3" class="centre"><label for="totalreglement2">Total à régler :</label></td>
<td><input type="text" name="totalreglement" id="totalreglement" /></td>
</tr>
<tr>
<td colspan="4" class="centre"> </td>
<td> </td>
</tr>
<tr>
<td colspan="4" class="centre"> </td>
<td> </td>
</tr>
<tr>
<td colspan="4">
<div align="center">
<input type="image" src="https://www.paypal.com/fr_FR/FR/i/btn/btn_buynow_LG.gif" name="submit" alt="PayPal - la solution de paiement en ligne la plus simple et la plus sécurisée !">
<img alt="" border="0" src="https://www.paypal.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
<input type="hidden" name="upload" value="1">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="***@***">
<?php //<input type="hidden" name="handling_1" value="0.00"> ?>
<input type="hidden" name="logo_custom" value="https://www.paypal.com/fr_FR/FR/i/btn/btn_buynow_LG.gif">
<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="bn" value="PP-ShopCartBF">
</div> </td>
</tr>
<tr>
<td colspan="4" class="centre"> </td>
<td> </td>
</tr>
<tr>
<td colspan="4">
<div align="center">
<img src="images/logo-paypal.png" /> </div> </td>
</tr>
<tr>
<td colspan="3" class="centre"> </td>
<td> </td>
</tr>
<tr>
<td colspan="3" class="centre"> </td>
<td> </td>
</tr>
</table>
</form>
</div>
</div>
<div style="clear:both"></div>
<script type="text/javascript">
frais_livraison();
</script>
<?php include('include/footer.php'); ?>
</div>
<?php } ?>
</body>
</html>
Windows / Firefox 115.0
- Script de paiement PAYPAL en PHP
- Script vidéo youtube - Guide
- Paypal - Guide
- Paypal paiement 4 fois airbnb - Forum Consommation & Internet
- Paypal 0821230233 ✓ - Forum Réseaux sociaux
- Créer un compte paypal - Guide
2 réponses
Bonjour
Commence par modifier la tribu action de ton formulaire pour la rediriger vers une page de ton site, puis fait du debug (un var_dump ) afin de regarder ce que contient la variable envoyée par ce formulaire.
Il semble également que tes frais de port soient gérés par du JavaScript...
Regarde donc dans la console de ton navigateur internet si il n'y a pas des erreurs...
Si oui, il te faudra les corriger.
Si tu n'envoies pas, ajoute du debug dans ton code javascript afin d'essayer de voir comment il se comporte et si les données qui s'y trouvent sont correctes.
Merci pour votre réponse, malheureusement je suis novice en code et ce site avait était créé il y a 10ans, rien n'a changé mais les frais de port ne s'integrent plus au total à payer alors que rien n'a bougé dans le code. Je n'ai pas de javascript dans les fichiers sources. Un vrai mystère. Je pense que c'est plutôt côté paypal qu'il y a du changement...
Tu as du Javascript sur les premières lignes du code que tu nous montres....nous dire que tu n'en as pas montre, en effet, un niveau plus que novice.
Je ne peux que t'encourager à te former un minimum pour pouvoir résoudre cet éventuelle souci.
Et comme je te l'ai dit, à tout hasard, ouvre la console de ton navigateur et essaye de voir si il n'y a pas des erreurs ( dans la console javascript )