close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

ecart 4 .asp

Thread began 6/21/2011 5:04 am by john70964 | Last modified 6/21/2011 11:56 am by john70964 | 3372 views | 9 replies

john70964

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252" %>
Here is the code

<%
' WA eCart Continue Shopping
if (cStr(Request.Form("FB_Ecart_Continue_1")) <> "" OR cStr(Request.Form("FB_Ecart_Continue_1.x")) <> "") then
Redirect_redirStr="Product_ResultsWith Space.asp"'_redirStr
if (false AND cStr(Session("WAEC_ContinueRedirect")) <> "") then
Redirect_redirStr=Session("WAEC_ContinueRedirect")
end if
if (Redirect_redirStr <> "") then
FB_Ecart_redirStr = Redirect_redirStr
end if
FB_Ecart_cartAction = "Continue"
end if
%><!--#include file="WA_eCart/WA_eCart_Definition_VB.asp" -->
<!--#include file="WA_eCart/FB_Ecart_VB.asp" -->
<%
' WA eCart Redirect
if (FB_Ecart_redirStr <> "") then
Response.Redirect(FB_Ecart_redirStr)
end if
%>

<!--#include file="WA_eCart/WA_eCart_Definition_VB.asp" -->
<!--#include file="WA_eCart/FB_Ecart_VB.asp" --><%
' WA eCart Redirect
if (FB_Ecart_redirStr <> "") then
Response.Redirect(FB_Ecart_redirStr)
end if
%>
<%
' WA eCart Update
if (cStr(Request.Form("FB_Ecart_Update_100")) <> "" OR cStr(Request.Form("FB_Ecart_Update_100.x")) <> "") then
set FB_Ecart = FB_Ecart_UpdateCart(FB_Ecart)
Redirect_redirStr=""'_redirStr
if (Redirect_redirStr <> "") then
FB_Ecart_redirStr = Redirect_redirStr
end if
FB_Ecart_cartAction = "Update"
end if
%><%
' WA eCart Continue Shopping
if (cStr(Request.Form("FB_Ecart_Continue_100")) <> "" OR cStr(Request.Form("FB_Ecart_Continue_100.x")) <> "") then
Redirect_redirStr=""'_redirStr
if (true AND cStr(Session("WAEC_ContinueRedirect")) <> "") then
Redirect_redirStr=Session("WAEC_ContinueRedirect")
end if
if (Redirect_redirStr <> "") then
FB_Ecart_redirStr = Redirect_redirStr
end if
FB_Ecart_cartAction = "Continue"
end if
%><%
' WA eCart Clear Cart
if (cStr(Request.Form("FB_Ecart_Clear_100")) <> "" OR cStr(Request.Form("FB_Ecart_Clear_100.x")) <> "") then
set FB_Ecart = WA_eCart_ClearCart(FB_Ecart)
Redirect_redirStr=""'_redirStr
if (Redirect_redirStr <> "") then
FB_Ecart_redirStr = Redirect_redirStr
end if
FB_Ecart_cartAction = "ClearCart"
end if
%><%
'WA eCart Redirect Check Out
if (cStr(Request.Form("FB_Ecart_Checkout")) <> "" OR cStr(Request.Form("FB_Ecart_Checkout.x")) <> "") then
Redirect_redirStr=""'_redirStr
if (Redirect_redirStr <> "") then
if (cStr(Request.QueryString()) <> "") then
if (InStr(Redirect_redirStr, "?") <= 0) then
Redirect_redirStr = Redirect_redirStr & "?" & Request.QueryString()
else
Redirect_redirStr = Redirect_redirStr & "&" & Request.QueryString()
end if
end if
FB_Ecart_redirStr = Redirect_redirStr
end if
FB_Ecart_cartAction = "Checkout"
end if
%>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link href="WA_eCart/CSS/eC_Clean_Pacifica_Arial.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div class="eC_Clean_Pacifica_Arial">
<%
'WA eCart Show If Start
if (NOT WA_eCart_IsEmpty(FB_Ecart)) then
%>
<form action="<% If(Request.QueryString <> "")Then Response.Write(CStr(Request.ServerVariables("SCRIPT_NAME"))&"?"&Server.HTMLEncode(Request.QueryString)) Else Response.Write(CStr(Request.ServerVariables("SCRIPT_NAME"))) %>" method="post" >
<h2>Your Shopping Cart</h2>
<table class="eC_ShoppingCart" border="0" cellspacing="0" cellpadding="0">
<tr>
<th>Name</th>
<th class="eC_PriceItem" >Price</th>
<th class="eC_FormItem" >Quantity</th>
<th class="eC_FormItem" >Remove</th>
<th class="eC_PriceItem" >Total</th>
</tr>
<%
while (NOT WA_eCart_EOF(FB_Ecart))
%>
<tr>
<td><img src="" alt="" width="110" height="110" class="eC_ProductThumb" />
<p class="eC_ItemLabel"><%=WA_eCart_DisplayInfo(FB_Ecart, "Name")%></p>
<p class="eC_ItemDescription"><%=WA_eCart_DisplayInfo(FB_Ecart, "Description")%></p></td>
<td class="eC_PriceItem" ><%=WA_eCart_DisplayMoney(FB_Ecart, WA_eCart_DisplayInfo(FB_Ecart, "Price"))%></td>
<td class="eC_FormItem" ><input type="text" name="FB_Ecart_Quantity_<%=FB_Ecart.DisplayIndex%>" size="3" value="<%=WA_eCart_DisplayInfo(FB_Ecart, "Quantity")%>" /></td>
<td class="eC_FormItem" ><input type="checkbox" value="<%=WA_eCart_DisplayInfo(FB_Ecart, "ID")%>" name="FB_Ecart_Delete_<%=FB_Ecart.DisplayIndex%>" /></td>
<td class="eC_PriceItem" ><%=WA_eCart_DisplayMoney(FB_Ecart, WA_eCart_DisplayInfo(FB_Ecart, "TotalPrice"))%></td>
</tr>
<%
set FB_Ecart = WA_eCart_MoveNext(FB_Ecart)
wend
set FB_Ecart = WA_eCart_MoveFirst(FB_Ecart)
%>
</table>
<div class="eC_OrderSummary">
<table border="0" cellpadding="0" cellspacing="0" class="eC_CartSummary">
<%
'WA eCart Merchandizing Show Start
'ecart="FB_Ecart"
if (WA_eCart_GetDiscounts(FB_Ecart) > 0 OR WA_eCart_GetCharges(FB_Ecart) > 0 OR WA_eCart_GetShipping(FB_Ecart) > 0 OR WA_eCart_GetTax(FB_Ecart) > 0) then
%>
<tr>
<td class="eC_Subtotal eC_SummaryLabel">Sub-total</td>
<td class="eC_Subtotal"><%=WA_eCart_DisplayMoney(FB_Ecart, WA_eCart_TotalColumn(FB_Ecart, "TotalPrice"))%></td>
</tr>
<%
'WA eCart Merchandizing Show End
'ecart="FB_Ecart"
end if
%>
<%
'WA eCart Merchandizing Show Start
'ecart="FB_Ecart"
if (WA_eCart_GetDiscounts(FB_Ecart) > 0) then
%>
<tr>
<td class="eC_SummaryLabel">Discounts</td>
<td>-<%=WA_eCart_DisplayMoney(FB_Ecart, WA_eCart_GetDiscounts(FB_Ecart))%></td>
</tr>
<%
'WA eCart Merchandizing Show End
'ecart="FB_Ecart"
end if
%>
<%
'WA eCart Merchandizing Show Start
'ecart="FB_Ecart"
if (WA_eCart_GetCharges(FB_Ecart) > 0) then
%>
<tr>
<td class="eC_SummaryLabel">Charges</td>
<td><%=WA_eCart_DisplayMoney(FB_Ecart, WA_eCart_GetCharges(FB_Ecart))%></td>
</tr>
<%
'WA eCart Merchandizing Show End
'ecart="FB_Ecart"
end if
%>
<%
'WA eCart Merchandizing Show Start
'ecart="FB_Ecart"
if (WA_eCart_GetShipping(FB_Ecart) > 0) then
%>
<tr>
<td class="eC_SummaryLabel">Shipping</td>
<td><%=WA_eCart_DisplayMoney(FB_Ecart, WA_eCart_GetShipping(FB_Ecart))%></td>
</tr>
<%
'WA eCart Merchandizing Show End
'ecart="FB_Ecart"
end if
%>
<%
'WA eCart Merchandizing Show Start
'ecart="FB_Ecart"
if (WA_eCart_GetTax(FB_Ecart) > 0) then
%>
<tr>
<td class="eC_SummaryLabel">Tax</td>
<td><%=WA_eCart_DisplayMoney(FB_Ecart, WA_eCart_GetTax(FB_Ecart))%></td>
</tr>
<%
'WA eCart Merchandizing Show End
'ecart="FB_Ecart"
end if
%>
<tr class="eC_SummaryFooter">
<td class="eC_SummaryLabel">Total:</td>
<td><%=WA_eCart_DisplayMoney(FB_Ecart, WA_eCart_GrandTotal(FB_Ecart))%></td>
</tr>
</table>
</div>
<table class="eC_ButtonWrapper" cellpadding="0" cellspacing="0">
<tr>
<td><input type="image" name="FB_Ecart_Continue_100" id="FB_Ecart_Continue_100" src="WA_eCart/Images/Pacifica/Btn4_EN_continueshopping.gif" alt="Continue Shopping" />
<input type="image" name="FB_Ecart_Clear_100" id="FB_Ecart_Clear_100" src="WA_eCart/Images/Pacifica/Btn4_EN_clearcart.gif" alt="Clear Cart" />
<input type="image" name="FB_Ecart_Update_100" id="FB_Ecart_Update_100" src="WA_eCart/Images/Pacifica/Btn4_EN_update.gif" alt="Update" />
<input type="image" name="FB_Ecart_Checkout" id="FB_Ecart_Checkout" src="WA_eCart/Images/Pacifica/Btn4_EN_checkout.gif" alt="Checkout" />
</td>
</tr>
</table>
<input type="submit" value="Continue Shopping" name="FB_Ecart_Continue_1">
</form>
<%
'WA eCart Show If Middle
else
%>
<table>
<tr>
<td>The cart is empty</td>
</tr>
</table>
<%
'WA eCart Show If End
end if
%>
</div>
</body>
</html>

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...