Hallo freunde,
Hallo Database,
ich habe alles mögliche versucht, die Action - Butons auf deutsch zu
beschriften aber immer wenn ich zum beispiel stat "proceed to check out"
"Senden" eingebe bleibt die Seite bestehn und geht nicht weiter.
Lieder hatte ich bis jetzt kein Erfolg.
Es waere Super, wenn mir jemand helfen könnte.
Vielen Dank für Eure mitthilfe
Gruss Deniz
Hier die seite:
<!-- #include file="db.asp" -->
<%
'===================================================
'Side-Shop
'(c) Deniz Toper Side-TR
'===================================================
'shopping cart code on this page -
'generates session variables with order items
Dim prodid, quantity, arrCart, scartItem
prodid = Request.Form("fproductid")
quantity = Request.Form("fquantity")
arrCart = Session("MyCart")
scartItem = Session("cartItem")
If scartItem = "" Then
Response.Redirect "error.asp?msg=" & Server.URLEncode ("Es ist
festgestellt worden, dass ihr Browser keine Cookys akzeptiert. Bitte
Aktivieren Sie.")
else
if quantity <> "" AND quantity < 1 then
Response.Redirect "error.asp?msg=" & Server.URLEncode
("Bitte die Menge eingeben, die Sie bestellen möchten.")
end if
End If
If prodid <> "" Then
call addToCart()
Else
Dim strAction
strAction = UCase(Left(Request.Form("action"),5))
Select Case strAction
Case "CONTI" 'continue shopping
Response.Redirect "Default.asp"
Case "RECAL" 'recalculate
call recalculateCart()
Case "PROCE" 'proceed to check out
Response.Redirect "customer.asp"
End Select
'end if for updating or inserting new item in Cart
End If
sub addToCart()
If scartItem < maxCartItems Then
scartItem = scartItem + 1
End If
Session("cartItem") = scartItem
dim rsItem, sqlProductInfo
sqlProductInfo = "SELECT * FROM products WHERE
(products.catalogID=" & prodid & ")"
'open connection - returns dbc as Active connection
call openConn()
Set rsItem = Server.CreateObject("ADODB.Recordset")
rsItem.Open sqlProductInfo, dbc,
adOpenForwardOnly,adLockReadOnly,adCmdText
If Not rsItem.EOF Then
arrCart(cProductid,scartItem) = rsItem("catalogID")
arrCart(cProductCode,scartItem) = rsItem("ccode")
arrCart(cProductname,scartItem) = rsItem("cname")
arrCart(cQuantity,scartItem) = CInt(quantity)
arrCart(cUnitPrice,scartItem) = rsItem("cprice")
Session("MyCart") = arrCart
End If
rsItem.Close
set rsItem = nothing
call closeConn()
end sub
sub recalculateCart()
For i = 1 To scartItem
Dim tquantity
tquantity = Request.Form("quantity" & Cstr(i))
if isempty(tquantity) OR (tquantity = "") then
tquantity = 0
elseif (tquantity < 0) OR (isnumeric(tquantity)=false) then
tquantity = 0
end if
arrCart(cQuantity,i) = CInt(tquantity)
Next
'make temp array and set it empty
ReDim temparrcart(UBound(arrCart,1),UBound(arrCart,2))
Dim tempItems
tempItems = 0
For x = 1 to UBound(arrCart,1)
For y = 1 to UBound(arrCart,2)
temparrCart(x,y) = ""
Next
Next
For i = 1 to scartItem
confirm = Request.Form("selected" & CStr(i))
zeroQuantity = arrCart(cQuantity,i)
If confirm <> "" and zeroQuantity > 0 Then
tempItems = tempItems +1
For x = 1 to UBound(arrCart,1)
temparrCart(x,tempItems) = arrCart(x,i)
Next
End If
Next
For x = 1 to UBound(arrCart,1)
For y = 1 to UBound(arrCart,2)
arrCart(x,y) = temparrCart(x,y)
Next
Next
scartItem = tempItems
Session("cartItem") = scartItem
Session("MyCart") = arrCart
end sub
'procedure builds Cart contents table
sub showCart()
'double quote character
q = chr(34)
if scartItem = 0 then
strURL = Request.ServerVariables("HTTP_REFERER")
strFile = Request.ServerVariables("PATH_INFO")
if right(strURL,8) = right(strURL,8) then
strURL = "Default.asp"
end if
strHTML = "<h3>Ihr Warenkorb ist leer.</h3>"
strHTML = strHTML & "<p><a href=" & q & strURL & q &
">Zurück zum Schop.</a></p>"
else
strHTML = "<FORM action="& q &"addprod.asp"& q &"
method="& q &"POST"& q &">"
strHTML = strHTML & "<table border=0 cellPadding=3
cellSpacing=2 width="&q&"100%"&q&">"
strHTML = strHTML & "<tr bgColor=#999966>"
strHTML = strHTML & "<td><FONT color=white>Produkt
code</FONT></td>"
strHTML = strHTML & "<td><FONT color=white>Produkt
name</FONT></td>"
strHTML = strHTML & "<td><FONT
color=white>Menge</FONT></td>"
strHTML = strHTML & "<td><FONT color=white>Einzel
Preis</FONT></td>"
strHTML = strHTML & "<td><FONT
color=white>Total</FONT></td></tr>"
Dim isubtotal, i
isubtotal = 0
For i = 1 to scartItem
strHTML = strHTML & "<tr bgColor=navajowhite>"
strHTML = strHTML & "<td><input name=selected"&
Cstr(i)&" type=checkbox value="&q&"yes"&q&" checked>" &
arrCart(cProductCode,i) &"</td>"
strHTML = strHTML & "<td>" &
arrCart(cProductname,i) & "</td>"
strHTML = strHTML & "<td><input
type="&q&"text"&q&" name="&q & "quantity" & CStr(i) & q &" value="&q &
arrCart(cQuantity,i) &q&" size=3></td>"
strHTML = strHTML & "<td>" &
FormatCurrency(arrCart(cUnitPrice,i),2) & "</td>"
strHTML = strHTML & "<td>" &
FormatCurrency(arrCart(cUnitPrice,i) * arrCart(cQuantity,i),2) & "</td>"
strHTML = strHTML & "</tr>"
isubtotal = isubtotal + (arrCart(cUnitPrice,i)
* arrCart(cQuantity,i))
Next
strHTML = strHTML & "<tr>"
strHTML = strHTML & "<td></td><td></td><td></td>"
strHTML = strHTML & "<td bgColor=#999966><font
color=white>Total</font></td>"
strHTML = strHTML & "<td bgColor=lightgoldenrodyellow>"
& FormatCurrency(isubtotal,2) & "</td>"
strHTML = strHTML & "</tr>"
strHTML = strHTML & "</table>"
strHTML = strHTML & "<input name="&q&"action"&q&"
type="&q&"submit"&q&" value="&q&"Continue shopping"&q&" >"
strHTML = strHTML & "<input name="&q&"action"&q&"
type="&q&"submit"&q&" value="&q&"Recalculate"&q&"><br>"
strHTML = strHTML & "<input name="&q&"action"&q&"
type="&q&"submit"&q&" value="&q&"proceed to check out"&q&">"
strHTML = strHTML & "</form>"
end if
response.write strHTML
end sub
%>
<HTML>
<HEAD>
<title>Shopping cart items</title>
<link rel="stylesheet" type="text/css" href="eposter.css">
</HEAD>
<BODY>
<table border="0" width="600" cellpadding="4">
<tr>
<td width="100%" colspan="2" valign="top">
<h3><img src="images/eplogo2.gif" alt="eplogo.gif (2683 bytes)"
width="187" height="36">
<br><font face="Arial">Mein Warenkorb:</font></h3>
</td>
</tr>
<tr>
<td width="120" bgcolor="#004080" valign="top">
<!--#include file="navleft.htm" --></td>
<td width="480">
<P>
<%
call showCart()
%>
<table width="95%" border="0">
<td width="53%"> </td>
<td width="47%"><div align="right"><a
href="http://www.kocbank.com/_finans/eng_exchange.asp"
target="_blank">Info
Tages-Kurse</a></div></td><br><br>
<table width="95%" border="0">
<td width="53%"> </td>
<td width="47%"><div align="right">Ihre Daten werden sicher
mit 128 bit SSL gesendet</div></td>
</P>
</td>
</tr>
</table>
</BODY>
</HTML>
_______________________________________________
Database.asp mailing list
[EMAIL PROTECTED]
http://www.glengamoi.com/mailman/listinfo/database.asp