Salve a tutti scusatemi se sarò lungo e spero di essere il più chiaro possibile, ma vi spiego il mio problema e vorrei sapere da voi se avete qualche idee per risolverlo.
Ho creato su un sito un “carrello della spesa” come si vedono in tutti i siti che trattano ecommerce; questo carrello della spesa è stato creato tramite una estensione di dreamweaver in ASP che crea il tutto senza creare un database.
Io vorrei che il carrello che si realizza quando un utente effettua un ordine venisse pari pari spedito ad una email che definisco io.
Tutto questo perché non mi interessa salvare l’ordine sul database e soprattutto perché non voglio interagire con il database; la mia idea è che l’utente crea il suo ordine-carrello e lo spedisce per email al venditore.
Per fare questo ho creato una email (il codice è sotto) che è esattamente lo stesso codice adattato a CDOSYS del mio carrello della spesa, nella email però mancano tutti i riferimenti ASP che non so come mettere mi potete aiutare??
E l’email arriverà corretta?? Cioè l’ASP verrà compilato??
Altrimenti quale altre idee mi potete proporre per effettuare questa cosa??
Grazie a tutti per l’aiuto.
CODICE E-MAIL
<%@LANGUAGE="VBSCRIPT"%>
<% if (cStr(Request("Submit")) <> "") Then
Dim MiaMail
Dim TestoMail
TestoMail = "<table width=510 border=1 align=center cellpadding=0 cellspacing=0 bordercolor=#000033>"
TestoMail = TestoMail & "<tr>"
TestoMail = TestoMail & "<td width=200 height=30 bgcolor=#AB0916 class=unnamed1><div align=center class=Stile1>Articolo</div></td>"
TestoMail = TestoMail & "<td width=50 bgcolor=#AB0916 class=unnamed1><div align=center class=Stile1>Q.tà</div></td>"
TestoMail = TestoMail & "<td width=130 bgcolor=#AB0916 class=unnamed1><div align=center class=Stile1>Prezzo Unitario </div></td>"
TestoMail = TestoMail & "<td width=130 bgcolor=#AB0916 class=unnamed1><div align=center class=Stile1>Prezzo Totale </div></td>"
TestoMail = TestoMail & "</tr>"
TestoMail = TestoMail & "<tr>"
TestoMail = TestoMail & "<td height=50 bgcolor=#d8dce7><table width=185 border=0 align=center cellpadding=0 cellspacing=0>"
TestoMail = TestoMail & "<tr>"
TestoMail = TestoMail & "<td class=piccolo>aaa</td>"
TestoMail = TestoMail & "</tr>"
TestoMail = TestoMail & "</table>"
TestoMail = TestoMail & "</td>"
TestoMail = TestoMail & "<td bgcolor=#d8dce7><div align=center class=piccolo> </div>"
TestoMail = TestoMail & "</td>"
TestoMail = TestoMail & "<td bgcolor=#d8dce7><table width=115 border=0 align=center cellpadding=0 cellspacing=0>"
TestoMail = TestoMail & "<tr>"
TestoMail = TestoMail & "<td class=piccolo></td>"
TestoMail = TestoMail & "</tr>"
TestoMail = TestoMail & "</table>"
TestoMail = TestoMail & "</td>"
TestoMail = TestoMail & "<td bgcolor=#d8dce7><table width=115 border=0 align=center cellpadding=0 cellspacing=0>"
TestoMail = TestoMail & "<tr>"
TestoMail = TestoMail & " <td class=piccolo></td>"
TestoMail = TestoMail & "</tr>"
TestoMail = TestoMail & "</table>"
TestoMail = TestoMail & "</td>"
TestoMail = TestoMail & "</tr>"
TestoMail = TestoMail & "</table>"
TestoMail = TestoMail & "
"
TestoMail = TestoMail & "<div align=center>Totale Ordine: </div>"
TestoMail = TestoMail & "
"
TestoMail = TestoMail & "<div align=center>* Non comprende il costo della spedizione di € 8,20</div>"
Set MiaMail = Server.CreateObject("CDO.Message")
MiaMail.From = "Prova"
MiaMail.To = "indirizzo@email.it"
MiaMail.Subject = "Ordine Web"
MiaMail.HtmlBody = TestoMail
MiaMail.Fields("urn:schemas:httpmail:importance"). Value = 2
MiaMail.Fields.Update()
MiaMail.Send()
Set MiaMail = Nothing
Response.Redirect("inviata.html")
End If
%>
CODICE CARRELLO
<table width="510" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#000033">
<tr>
<td width="200" height="30" bgcolor="#AB0916" class="unnamed1"><div align="center" class="Stile1">Articolo</div></td>
<td width="50" bgcolor="#AB0916" class="unnamed1"><div align="center" class="Stile1">Q.tà</div></td>
<td width="130" bgcolor="#AB0916" class="unnamed1"><div align="center" class="Stile1">Prezzo Unitario </div></td>
<td width="130" bgcolor="#AB0916" class="unnamed1"><div align="center" class="Stile1">Prezzo Totale </div></td>
</tr>
<%
' UltraCart 3
' Repeat Region
For UltraCart_i=0 To UltraCart.GetItemCount()-1
%>
<tr>
<td height="50" bgcolor="#d8dce7"><table width="185" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td class="piccolo"><%=(UltraCart.GetColumnValue("Name ",UltraCart_i))%></td>
</tr>
</table></td>
<td bgcolor="#d8dce7"><div align="center" class="piccolo">
<%=(UltraCart.GetColumnValue("Quantity",UltraCart_ i))%>
</div></td>
<td bgcolor="#d8dce7"><table width="115" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td class="piccolo"><%= FormatCurrency((UltraCart.GetColumnValue("Price",U ltraCart_i)), 2, -2, -2, -2) %></td>
</tr>
</table></td>
<td bgcolor="#d8dce7"><table width="115" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td class="piccolo"><%= FormatCurrency((UltraCart.GetColumnValue("Total",U ltraCart_i)), 2, -2, -2, -2) %></td>
</tr>
</table></td>
</tr>
<%
' UltraCart 3
' Repeat Region
Next
%>
</table>

Rispondi quotando