ciao a tutti, volevo un piccolo aiutino. Sto facendo un sito ecommerce ad un mio amico. Riesco a navigare tra le varie categorie del negozio, aggiungere ed eliminare articoli dal carrello. Quando metto degl' articoli nel carrello, piu' sotto c'e un form per inviare i propri dati. Una volta cliccato sul pulsante "Ordina", arriva l'email delle ordinazioni, una al cliente e un'altra al negoziante. In questo codice vorrei che all'utente arrivasse anche i dati per il pagamento postepay,
tipo:
Puoi fare il tuo versamento del totale di € ... sulla carta postepay nr: 4023 6004 **** ****, oppure puoi fare il tuo versamento sul conto bancario: ABI: 000 CAB: 000 Nr conto: 000000000
cosi al cliente arrivano tutti i dati del venditore.
Questo e' il codice del carrello:
codice:
<html>
<script src="all.js"></script>
<head>
<title>RIEPILOGO ORDINE</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
#Layer1 {
position:absolute;
width:200px;
height:115px;
z-index:1;
left: 84px;
top: 70px;
}
-->
</style>
</head>
<body bgcolor="#ffffff" background="images/sfond.JPG" text="#10429c" link="#10429c" vlink="green" alink="red" topmargin="0">
<table width="100%" align="center" cellspacing="0" cellpadding="0">
<table width="750" height="80" align="center" border="0" cellspacing="0" cellpadding="0">
</table>
<table width="100%">
<tr>
<td width="100%" height="2"></td>
</tr>
</table>
<div align="center"></div>
<div align="center">
<table width="620" bgcolor="#ffffff" align="center" valign="top" border="1">
<tr align="left">
<td width="13%" align="center" bgcolor="#f8f8ff"><div align="center"><font face="verdana" size="2" color="#10429c">
Codice</font></div></td>
<td width="12%" align="center" bgcolor="#f8f8ff"><div align="center"><font face="verdana" size="2" color="#10429c"> Quantità</font></div></td>
<td width="13%" align="center" bgcolor="#f8f8ff"><div align="center"><font face="verdana" size="2" color="#10429c">
Prezzo</font></div></td>
<td width="14%" align="center" bgcolor="#f8f8ff"><div align="center"><font face="verdana" size="2" color="#10429c">
Totale</font></div></td>
<td width="44%" align="center" bgcolor="#f8f8ff"><div align="center"><font face="verdana" size="2" color="#10429c">
Descrizione</font></div></td>
</tr>
</table>
</div>
<p align="center">
<p align="center">
<script language = "JavaScript">
/* la funzione seguente è stata trasportata nel file all.js
This function prints out each order. It accepts one parameter which is an instance of the
product object defined in index.htm. It creates four text boxes to store the PRODUCT ID,
QUANTITY BOUGHT, PRICE PER ITEM, TOTAL FOR THIS PRODUCT. It then prints a hyperlink displaying
the products name, and leading to the products URL. This enables the customer to quickly
locate the product if they wish to change their order in relation to this product. */
i = 0;
/* --------------------------------------------------------------------------------------------
In this section variables are initialised and functions are called to print out
the entire orders list.*/
i = 0;
grandtotal = 0;
document.write("<form onSubmit='return checkrequired(this)' method='POST' action='mailto:email@venditore.it' enctype='text/plain'>");
/*
document.write("<form action='http://localhost/cgi-bin/dbscript.pl' method='POST'>");
document.write("<form ACTION='http://homepages.paradise.net.nz/cgi-bin/mailto' METHOD='POST'><input type='hidden' name='recipient' value=''><input type='hidden' name='followup-page' value='http://homepages.paradise.net.nz/milhous/'>");
*/
// ***INSERT HERE***
printLine(parent.case_prone);
printLine(parent.case_prtwo);
printLine(parent.case_prthree);
printLine(parent.case_prfour);
printLine(parent.video_prone);
printLine(parent.video_prtwo);
printLine(parent.video_prthree);
printLine(parent.madre_prone);
printLine(parent.madre_prtwo);
printLine(parent.madre_prthree);
printLine(parent.madre_prfour);
printLine(parent.madre_prfive);
printLine(parent.madre_prsix);
printLine(parent.alimentatori_prone);
printLine(parent.processori_prone);
printLine(parent.processori_prtwo);
printLine(parent.processori_prthree);
printLine(parent.processori_prfour);
document.write("<table border='0' width='620' align='center'>")
document.write("<tr>")
document.write("<td width='13%' align=right><font face='verdana' size='2'>")
document.write("Spedizione:");
document.write("</font></td>")
document.write("<td><font face='verdana' size='2'>")
document.write("<input type='checkbox' name='postacelere' value='si' checked>")
document.write("Pacco Celere 3</font></td>")
document.write("</tr>")
document.write("<tr>")
document.write("</tr>")
document.write("<tr>")
document.write("<td width='13%' align=right><font face='verdana' size='2'>")
document.write("Importo:");
document.write("</font></td>")
document.write("<td width='12%' align=right><font face='verdana' color='green' size='2'>")
document.write( grandtotal);
document.write("</font></td>")
document.write("<INPUT TYPE='hidden' SIZE='7' NAME='subtotal' VALUE=",'€' + parent.roundToCents(grandtotal), ">");
document.write("<td width='13%' align=right><font face='verdana' size='2'>")
document.write("Spese:");
document.write("</font></td>")
document.write("<td width='12%' align=right><font face='verdana' color='green' size='2'>")
document.write( parent.postage);
document.write("</font></td>")
document.write("<INPUT TYPE='hidden' SIZE='7' NAME='postage' VALUE=",'€' + parent.roundToCents(parent.postage), ">");
document.write("<td width='22%' align=right><font face='verdana' size='2'>")
document.write("Totale in Euro:");
document.write("</font></td>")
document.write("<td width='12%' align=right><font face='verdana' color='green' size='2'>")
document.write( grandtotal + parent.postage);
document.write("</font></td>")
document.write("<INPUT TYPE='hidden' SIZE='7' NAME='grandtotal' VALUE=",'€' + parent.roundToCents(grandtotal + parent.postage), ">");
document.write("<td width='12%' align=right><font face='verdana' color='green' size='2'>")
document.write( parent.roundToCents((grandtotal + parent.postage) / 1936.27));
document.write("</font></td>")
document.write("<INPUT TYPE='hidden' SIZE='7' NAME='grandtotaleuro' VALUE=",'€' + parent.roundToCents((grandtotal + parent.postage) / 1936.27), ">");
document.write("</tr>")
document.write("</table>
")
</script>
<table width="615" align="center" border="0" cellpadding="0" cellspacing="5" bgcolor="#ffffff">
<tr>
<td width="100%" align="left" colspan="4">
<font face="verdana" size="1" color="red">
Tutti i campi contrassegnati dall'asterisco sono obbligatori e necessari per l'esecuzione dell'ordine.
</font>
</td>
</tr>
<tr>
<td width="15%" align="right">
<font face="verdana" size="1" color="#10429c">E-mail:</font></td>
<td width="40%" align="left" bgcolor="#ffffff">
<input type="text" size=25 maxlength=60 name="requiredemail"></input><font color="red">*</font></td>
<td width="45%" align="left">
</td>
</tr>
<tr>
<td width="15%" align="right" >
<font face="verdana" size="1" color="#10429c">Nome:</font></td>
<td width="40%" align="left" bgcolor="#ffffff">
<input type="text" size="25" maxlength="30" name="requiredname_first"></input><font color="red">*</font>
</td>
<td width="45%" align="left"></td>
</tr>
<tr>
<td width="15%" align="right" >
<font face="verdana" size="1" color="#10429c">Cognome:</font></td>
<td width="40%" align="left" bgcolor="#ffffff">
<input type="text" size="25" maxlength="30" name="requiredname_last"></input><font color="red">*</font>
</td>
<td width="45%" align="left">
</td>
</tr>
<tr>
<td width="15%" align="right" >
<font face="verdana" size="1" color="#10429c">Indirizzo:</font></td>
<td width="40%" align="left" bgcolor="#ffffff">
<input type="text" size="25" maxlength="60" name="requiredaddress1"></input><font color="red">*</font>
</td>
<td width="45%" align="left">
</td>
</tr>
<tr>
<td width="15%" align="right" >
</td>
<td width="40%" align="left" >
<input type="text" size="25" maxlength="60" name="address2"></input>
</td>
<td width="45%" align="left">
</td>
</tr>
<tr>
<td width="15%" align="right" >
<font face="verdana" size="1" color="#10429c">Città:</font></td>
<td width="40%" align="left" bgcolor="#ffffff">
<input type="text" size="25" maxlength="30" name="requiredcity"></input><font color="red">*</font>
</td>
<td width="45%" align="left"></td>
</tr>
<tr>
<td width="15%" align="right" >
<font face="verdana" size="1" color="#10429c">C.A.P.:</font></td>
<td width="40%" align="left" bgcolor="#ffffff">
<input type="text" size="7" maxlength="5" name="requiredzip"></input><font color="red">*</font>
</td>
<td width="45%" align="left"></td>
</tr>
<tr>
<td width="15%" align="right" >
<font face="verdana" size="1" color="#10429c">Stato:</font></td>
<td width="40%" align="left" bgcolor="#ffffff">
<input type="text" size="25" maxlength="30" name="state" value="Italia"></input>
</td>
<td width="45%"></td>
</tr>
<tr>
<td width="15%" align="right" >
<font face="verdana" size="1" color="#10429c">Telefono:</font></td>
<td width="40%" align="left" bgcolor="#ffffff">
<input type="text" size="25" maxlength="25" name="phone"></input>
</td>
<td width="45%"></td>
</tr>
<tr>
<td width="15%" align="right" >
<font face="verdana" size="1" color="#10429c">Fax:</font></td>
<td width="40%" align="left" bgcolor="#ffffff">
<input type="text" size="25" maxlength="25" name="fax"></input>
</td>
<td width="45%"></td>
</tr>
<tr>
<td width="15%" ></td>
<td width="40%" align="left" ></td>
<td width="45%"></td>
</tr>
</font>
<tr>
<td width="15%" ></td>
<td width="40%" align="left" >
<input type="submit" value="ORDINA"></input>
</td>
<td width="45%"></td>
</tr>
</table>
<!--
<table width="100%" height="17" border="0" bgcolor="#FFA9F0" bordercolor="blue" cellspacing="0" cellpadding="0">
<tr>
<td>
<div align="left"><font face="Arial" size="2" ><marquee scrollamount="2" scrolldelay="80"><font color="blue">INSERIRE TUTTI I DATI RICHIESTI</font></marquee></font></div>
</td>
</tr>
</table>
//-->
</form>
</p>
<p align="center">Ritorna alla Home Page </p>
</body>
Aspetto vostre risposte grazie in anticipo