Modificare il file:
\Carrello_OLD\default.asp
<!--#include file="config.asp" --> <% Set marca = Server.CreateObject("ADODB.Recordset") marca.ActiveConnection = MM_ecommerce_STRING marca.Source = "SELECT DISTINCT Marca FROM Prodotti" marca.CursorType = 0 marca.CursorLocation = 2 marca.LockType = 1 marca.Open() marca_numRows = 0 %> <% Repeat1__numRows = -1 Repeat1__index = 0 marca_numRows = marca_numRows + Repeat1__numRows %> <% Repeat2__numRows = -1 Repeat2__index = 0 Tipo_numRows = Tipo_numRows + Repeat2__numRows %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Carrello - Lista di Nozze</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script language="JavaScript" type="text/JavaScript"> <!-- function MM_openBrWindow(theURL,winName,features) { //v2.0 window.open(theURL,winName,features); } function delp(idq) { document.location.href="delCarrello.asp?quale="+idq+"&fcampo=<%=request.QueryString("fcampo")%>&fcosa=<%=request.QueryString("fcosa")%>"; } function modi(qq) { if(document.getElementById('a'+qq).value!=""){ document.getElementById('a'+qq).select(); }else{ alert("La Quantità non può essere vuota!"); document.getElementById('a'+qq).value=0; document.getElementById('a'+qq).select(); } } function mod(ql,qt) { qt=document.getElementById(qt).value; if (isNaN(qt)==false){ document.location.href="modCarrello.asp?quale="+ql+"&qnnt="+qt+"&fcampo=<%=request.QueryString("fcampo")%>&fcosa=<%=request.QueryString("fcosa")%>"; }else{ alert("La Quantità non può essere\n\nvuota o contenere\n\ncaratteri!"); } } function moddi(qq) { setTimeout("modi('"+qq+"')",1000); } function svu() { document.location.href="../Carrello/svuCarrello.asp?fcampo=<%=request.QueryString("fcampo")%>&fcosa=<%=request.QueryString("fcosa")%>"; } function torna(url) { document.location.href=url; } function MM_goToURL() { //v3.0 var i, args=MM_goToURL.arguments; document.MM_returnValue = false; for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'"); } //--> </script> <style type="text/css"> <!-- .Stile2 { font-size: x-small; font-family: Verdana, Arial, Helvetica, sans-serif; } .Stile4 {font-size: x-small; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: bold; } .Stile5 { font-size: small; font-weight: bold; font-family: verdana; } .Stile8 {font-family: verdana} .Stile9 {font-size: x-small} .Stile11 {font-family: verdana; font-size: x-small;} --> </style> <link href="../CSS/style.css" rel="stylesheet" type="text/css"> <style type="text/css"> <!-- .Stile12 {color: #000000} --> </style> </head> <body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0"> <span class="Stile2"></span> <span class="Stile2"></span> <table width="560" height="285" border="0" align="left" cellpadding="0" cellspacing="0" bordercolor="#000000"> <tr> <td height="19" valign="top"> </td> <td height="19" valign="middle" bgcolor="#efefef"><div align="right" class="Stile3"><strong>Carrello </strong></div></td> </tr> <tr> <td width="4" height="266"> </td> <td width="556" valign="top" > <table border="0"> <tr> <td> </td> </tr> </table> <% Veditot=0 i=Session("Contatore") k=0 pprr="" qnttt="" while k <= i 'response.write(Pr(k)&"<br>") 'response.write(Qt(k)&"<br>") PR=Session("Prodotti"&k) if Session("Prodotti"&k) <> "" then quanti=Session("Quantita"&k) Set prodotti = Server.CreateObject("ADODB.Recordset") prodotti.ActiveConnection = MM_ecommerce_STRING prodotti.Source = "SELECT * FROM Prodotti WHERE ID="&Cint(PR) prodotti.CursorType = 0 prodotti.CursorLocation = 2 prodotti.LockType = 1 prodotti.Open() prodotti_numRows = 0 %> <% if (prodotti.Fields.Item("Foto").Value) <> "" then fotina="Admin/imagesProd/"&(prodotti.Fields.Item("Foto").Value) else fotina="Admin/imagesProd/nd.jpg" end if %> <% '************************************************ ' RIPORTA QUANTITA' = 1 '************************************************* if k <= 1 then one=(prodotti.Fields.Item("Prezzo").Value)*Session("Quantita"&k) else one=(prodotti.Fields.Item("Prezzo").Value)* 1 quanti = 1 %> <marquee bgcolor="#FFFF00" style="font-family: Verdana; color: #0000FF; font-weight: bold" width="435" height="18">-> La quantità non può essere maggiore di 1 <-</marquee> <% end if somma=somma+one %> <span class="Stile2"> </span> <table border="1" style="border-collapse: collapse" bordercolor="#C0C0C0"> <tr> <td> <table width="557" height="86" border="0" bordercolor="#C0C0C0" style="border-collapse: collapse"> <tr> <td width="75" rowspan="3"><img src="<%=fotina%>" alt="" width="70" height="50" class="Stile2"></td> <td width="472"><span class="Stile4 Stile12"><%=(Prodotti.Fields.Item("Nome").Value)%></span></td> </tr> <tr> <td bgcolor="#f0f0f0"><span class="Stile2"><%=(Prodotti.Fields.Item("Descrizione").Value)%></span></td> </tr> <tr> <td> <table width="448" border="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#C0C0C0"> <tr class="Stile2"> <td width="164"><div align="left">Quantità: <input name="a" type="text" class="Stile2" id="a<%=(prodotti.Fields.Item("ID").Value)%>" value="<%=quanti%>" size="4" maxlength="4"> <a href="#" onClick="mod('<%=k%>','a<%=(prodotti.Fields.Item("ID").Value)%>')"><img src="images/agg.jpg" alt="Aggiorna quantità" width="16" height="16" border="0" align="absmiddle"></a></div></td> <td width="175">Prezzo: <strong><%=FormatCurrency((Prodotti.Fields.Item("Prezzo").Value),2)%></strong></td> <td width="101" class="Stile2"> <input name="Submit" type="submit" class="Stile2" value="Togli dal Carrello" onClick="delp('<%=k%>')"></td> </tr> </table></td> </tr> </table></td> </tr> </table> <table border="0" class="Stile2"> <tr> <td> </td> </tr> </table> <% pprr=pprr&(prodotti.Fields.Item("ID").Value)&"/" qnttt=qnttt&quanti&"/" Veditot=veditot+1 prodotti.Close() Set prodotti = Nothing end if k=k+1 wend 'response.Write(Session("Prodotti")) iva=ivaaq ivva=somma*iva/100 totale=somma+ivva %> <% if Veditot <> 0 then %> <span class="Stile2"><br> <br> </span> <table border="0" cellspacing="0" cellpadding="0"> <tr bgcolor="#CCCCCC"> <td width="61" class="Stile3"><div align="right" class="Stile8"> <div align="left"><span class="Stile9">Somma:</span></div> </div></td> <td width="16" class="Stile3"> </td> <td width="126" height="20" class="Stile3"><div align="left"><span class="Stile11"><%=FormatCurrency(somma,2)%></span></div></td> </tr> <tr bgcolor="#f0f0f0"> <td><div align="right" class="Stile5"> <div align="left">Totale:</div> </div></td> <td> </td> <td><div align="left"><span class="Stile5"><%=FormatCurrency(totale+spesespedizione,2)%></span></div></td> </tr> </table> <p class="Stile2"> <input name="Submit222" type="button" class="Stile3" onClick="MM_goToURL('parent','?az=ordina');return document.MM_returnValue" value=" Acquista "> <input name="Submit2" type="button" class="Stile2" onClick="svu()" value="Svuota Carrello"> <input name="Submit22" type="button" class="Stile2" onClick="torna('?az=list&fcampo=<%=Request.QueryString("fcampo")%>&fcosa=<%=Request.QueryString("fcosa")%>')" value="Torna alla Lista"> </p> <p> <% else %> <font color="#FF0000"> <% Response.Write("<div align=left><span class=Stile5>Il carrello è vuoto</span></div>") response.redirect("../default.asp?az=list&fcampo=Marca&fcosa="&n_lista) end if%></font> </p> </td> </tr> </table> <p align="center"> </p> </body> </html>
[
Íàçàä
]