<%@LANGUAGE="VBSCRIPT"%> <% 'Option Explicit %> <% '================================================================ 'Application Info: ' Cartweaver© 2002 - 2005, All Rights Reserved. 'Developer Info: ' Application Dynamics Inc. ' 1560 NE 10th ' East Wenatchee, WA 98802 'Support Info: http://www.cartweaver.com/go/asphelp ' 'Cartweaver Version: 3.0.0 - Date: 21 April 2007 '================================================================ 'Name: Application.asp 'DESCRIPTION: The Application.asp file is the root file for the ' entire Cartweaver application. This file defines the store-wide ' variables that will control your cart, and also includes all of ' the necessary function files to make the cart function. You can ' edit all of the settings on this page manually or through the ' Cartweaver 3 Setup Server Behavior. Variables are listed in the ' order in which the Cartweaver 3 Setup Server Behavior adds them ' to the page. '================================================================ '*Do Not Remove This Line* Prevents extraneous %@LANGUAGE="VBSCRIPT"% declaration. '=== Start Cartweaver Variables === Const datasource = "DSN=swankyrooms;User ID=;Password=;" Const dbType = "Access" Dim websiteURL : websiteURL = "http://www.swankyrooms.co.uk/" Dim websiteSSLURL : websiteSSLURL = "" Dim onSubmitAction : onSubmitAction = "Confirm" Dim targetResults : targetResults = "Results.asp" Dim targetDetails : targetDetails = "Details.asp" Dim targetGoToCart : targetGoToCart = "ShowCart.asp" Dim targetCheckout : targetCheckout = "OrderForm.asp" Dim targetConfirmOrder : targetConfirmOrder = "Confirmation.asp" Const cwLocale = "2057" Const uploadCom = "persits upload" Const mailObj = "CDOSYS" Const mailServer = "mail.swankyrooms.co.uk" Dim paymentAuthType : paymentAuthType = "processor" Dim paymentAuthName : paymentAuthName = "CWIncPayPal.asp" Const debugPassword = "westbrom1" '=== End Cartweaver Variables === 'Include all Cartweaver application functions %> <% 'Start Cartweaver Cart Set cwCart = New cwObjCartweaver %> <% %> Welcome to Swanky Rooms.....
 


Home


<% Set cwSearchObj = New cw3Search With cwSearchObj .SearchType = "Links" .AllCategoriesLabel = "All Products" .Separator = "
" .SelectedStart = "" .SelectedEnd = "" End With Response.Write(cwSearchObj.Display()) Set cwSearchObj = Nothing %>


Shopping cart

Special Offers

About Us

Terms & Conditions

Contact Us


<%= cwCartLinks(cwCart.Count, Null) %> <% '================================================================ 'Application Info: Cartweaver© 2002 - 2007, All Rights Reserved. 'Developer Info: Application Dynamics Inc. ' 1560 NE 10th ' East Wenatchee, WA 98802 'Support Info: http://www.cartweaver.com/go/asphelp ' 'Cartweaver Version: 3.0.0 - Date: 21 April 2007 '================================================================ 'Name: CWIncShowCart.asp 'Description: ' This page shows the user their shopping cart contents. If the ' user is checking it out, it also collects their credit card ' information and submits the data to your payment gateway or ' payment processor. If the order is processed successfully the ' customer is sent to the confirmation page. '================================================================ '*Do Not Remove This Line* Prevents extraneous %@LANGUAGE="VBSCRIPT"% declaration from being added by Dreamweaver. %> <% 'START [ SET PARAMITERS ] If Session("ShipToCountryID") = "" Then Session("ShipToCountryID") = "1" If Session("CheckingOut") = "" Then Session("CheckingOut") = False bolHasCart = False If Request.Form("promocode") <> "" Then Session("PromotionalCode") = Request.Form("promoCode") Session("AvailableDiscounts") = "" Call cwGetDiscounts() End If Dim shippingDiscounts : shippingDiscounts = cwGetshippingDiscounts() Dim displayLineItemTaxes : displayLineItemTaxes = CBool(Application("displayLineItemTaxes")) Dim displayLineItemDiscount : displayLineItemDiscount = False If CBool(Application("EnableDiscounts")) Then displayLineItemDiscount = CBool(Application("displayLineItemDiscount")) Dim CartColumnCount : CartColumnCount = 0 If DisplayLineItemTaxes Then CartColumnCount = CartColumnCount + 2 If DisplayLineItemDiscount Then CartColumnCount = CartColumnCount + 1 'Set defaults for Credit Card processing fields cstCCardHolderName = Request.Form("cstCCardHolderName") cstCCardType = Request.Form("cstCCardType") cstCCNumber = Request.Form("cstCCNumber") cstCCV = Request.Form("cstCCV") cstExprMonth = cwParam(Request.Form("cstExprMonth"),0) cstExprYr = cwParam(Request.Form("cstExprYr"),0) If cstExprMonth = "forgot" Then cstExprMonth = 0 If cstExprYr = "forgot" Then cstExprYr = 0 'START [ CART ACTIONS ] 'UPDATE CART ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If Request.Form("action") <> "" Then 'Loop through the form For i = 0 to Request.Form("rowCount") If IsNumeric(Request.Form("qty" & i)) Then If Request.Form("qty" & i) = 0 OR cwListFind(Request.Form("remove"), Request.Form("lineID" & i)) <> -1 Then 'If the user has set the quantity to 0 or checked the delete box, then remove the 'item from the cart. cwCart.Delete Request.Form("lineID" & i) Else 'The user has updated the count. cwCart.Update Request.Form("lineID" & i), Request.Form("qty" & i) End If 'Request.Form("qty" & i) = 0 OR Request.Form("delete" & i) <> "" End If Next 'i = 0 to Request.Form("rowCount") If cwCart.CartError = "" AND Request.Form("selectShipping") = "" AND NOT cwCart.StockAlert Then Response.Redirect(ThisPageQS) End If 'Request.Form("action") <> "" 'END [ CART ACTIONS ] ===================================================== Dim Cart Set Cart = cwGetCart(Request.Cookies("CartID"), Request.Cookies("TaxStateID"), Request.Cookies("TaxCountryID")) cwDebugger cwDumpDictionary(Cart) If Cart("Products").Count = 0 Then bolHasCart = False Else bolHasCart = True If Session("CheckingOut") Then 'Get customer shipping and billing information Set rsCWGetCustData = cwOpenQuery("SELECT * FROM cwq_CustData WHERE cst_ID = '" & Session("CustomerID") & "';",datasource) Set rsCWGetBillTo = rsCWGetCustData.Clone rsCWGetBillTo.Filter = "CustSt_Destination = 'BillTo'" Set rsCWGetShipTo = rsCWGetCustData.Clone rsCWGetShipTo.Filter = "CustSt_Destination = 'ShipTo'" cwDebugger cwQueryDump(rsCWGetCustData,"rsCWGetCustData") cwDebugger cwQueryDump(rsCWGetBillTo,"rsCWGetBillTo") cwDebugger cwQueryDump(rsCWGetShipTo,"rsCWGetShipTo") 'For Shipping, set ship to StProv Shipping extension shipExtension = rsCWGetShipTo("stprv_Ship_Ext") cwDebugger "shipExtension: " & shipExtension '============================================================= 'Calculate SHIPPING [ START ]================================ '============================================================= 'Get Shipping Methods Available for Customer's Location 'If you're not charging shipping by weight, then just get everything If Request.Form("PickShipPref") = "" Then If Session("PickShipPref") = "" Then Session("PickShipPref") = 0 Else Session("PickShipPref") = Request.Form("PickShipPref") End If 'If shipping is enabled, perform shipping calculations. If Application("EnableShipping") Then cwDebugger "Session(""PickShipPref""): " & Session("PickShipPref") & " - " & Request.Form("PickShipPref") 'Get shipping list and perform shipping calculations Set rsCWShipList = cwShipping("shiplist",ShipCalcType,rsCWGetShipTo("country_ID"),Cart("CartTotals")("Weight"),Cart("CartTotals")("Sub"),shipExtension,ShipTotal,Session("PickShipPref")) cwDebugger cwQueryDump(rsCWShipList,"rsCWShipList") cwDebugger "Session(""PickShipPref"") after running cwShipping: " & Session("PickShipPref") cwDebugger "ShipTotal: " & ShipTotal Else Session("PickShipPref") = 0 ShipTotal = 0 End If '============================================================= 'Calculate ORDER TOTAL [ START ]============================= '============================================================= Cart("CartTotals")("Shipping") = ShipTotal Cart("CartTotals")("Total") = Cart("CartTotals")("ProductTotal") + Cart("CartTotals")("Shipping") If shippingDiscounts <> "" Then 'There is a shipping discount Cart("CartTotals")("Shipping") = cwGetShippingDiscount(Cart("CartTotals")("Shipping"), shippingDiscounts, Session("PickShipPref"), Cart("CartTotals")("ProductTotal")) Cart("CartTotals")("ShippingDiscounts") = ShipTotal - Cart("CartTotals")("Shipping") End If Cart("CartTotals")("ShippingTax") = cwGetShippingTaxes(rsCWGetShipTo("country_ID"), ShipTotal, Cart) Cart("CartTotals")("Total") = Cart("CartTotals")("ProductTotal") + Cart("CartTotals")("Shipping") + Cart("CartTotals")("ShippingTax") End If 'Session("CheckingOut") End If 'NOT rsCWGetCart.EOF 'If the "PLACE ORDER" button has been clicked... 'START [ PROCESS ORDER ] =================================================== %> <% If Request.Form("placeOrder") <> "" Then 'Process order FieldErrorText = cwProcessOrder(Cart,Session("CustomerID"),Session("PickShipPref")) End If 'Request.Form("placeOrder") <> "" 'END [ PROCESS ORDER ] =============================++====================== %> <% If ((QtyAdded) <> (0)) AND ((FieldError) = ("")) Then 'Start CCR %>

Your shopping cart has been successfully updated.

<% End If 'End CCR: ((QtyAdded) <> (0)) AND ((FieldError) <> ("")) %> <% If (cwCart.StockAlert) = (True) Then 'Start CCR %>

You have selected more quantity than is currently available.

<% End If 'End CCR: (cwCart.StockAlert) = (True) %> <% If (bolHasCart) = (False) Then 'Start CCR %>

There is nothing in your Cart at this time.

<% Else 'CCR %> <% If (Session("CheckingOut")) = (True) Then 'Start CCR %> <% If (FieldErrorText) <> ("") Then 'Start CCR %>

There was a problem while processing your credit card.
<%= FieldErrorText %>

<% End If 'End CCR: (FieldErrorText) <> ("") %> <% If (TransactionMessage) <> ("") Then 'Start CCR %>

Your Credit Card Transaction Has Failed.
Gateway Message: <%= TransactionMessage %>

<% End If 'End CCR: (TransactionMessage) <> ("") %>

[ Your name is not <%= rsCWGetCustData("cst_FirstName") %> <%= rsCWGetCustData("cst_LastName") %>? Click Here. ]

  Billing Shipping
Name <%= rsCWGetCustData("cst_FirstName") %> <%= rsCWGetCustData("cst_LastName") %> <%= rsCWGetCustData("cst_ShpName") %>
Address: <%= rsCWGetCustData("cst_Address1") %>
<% If (rsCWGetCustData("cst_Address2")) <> ("") Then 'Start CCR %> <%= rsCWGetCustData("cst_Address2") %>
<% End If 'End CCR: (rsCWGetCustData("cst_Address2")) <> ("") %> <%= rsCWGetCustData("cst_City") %><% If (rsCWGetBillTo("stprv_Name")) <> ("None") Then 'Start CCR %>, <%= rsCWGetBillTo("stprv_Name") %> <% End If 'End CCR: (rsCWGetBillTo("stprv_Name")) <> ("None") %> <%= rsCWGetCustData("cst_Zip") %>
<%= rsCWGetBillTo("country_name") %>
<%= rsCWGetCustData("cst_ShpAddress1") %>
<% If (rsCWGetCustData("cst_ShpAddress2")) <> ("") Then 'Start CCR %> <%= rsCWGetCustData("cst_ShpAddress2") %>
<% End If 'End CCR: (rsCWGetCustData("cst_ShpAddress2")) <> ("") %> <%= rsCWGetCustData("cst_ShpCity") %><% If (rsCWGetShipTo("stprv_Name")) <> ("None") Then 'Start CCR %>, <%= rsCWGetShipTo("stprv_Name") %> <% End If 'End CCR: (rsGetShipTo("stprv_Name")) <> ("None") %> <%= rsCWGetCustData("cst_ShpZip") %>
<%= rsCWGetShipTo("country_name") %>
Phone <%= rsCWGetCustData("cst_Phone") %>  
Email: <%= rsCWGetCustData("cst_Email") %>  

If address is incorrect - Return to Order Form

<% End If 'End CCR: (Session("CheckingOut")) = (True) %>
<% If DisplayLineItemDiscount Then %> <% End If %> <% If DisplayLineItemTaxes Then %> <% End If %> <% i = 0 'Get the product options in the user's cart. 'Loop through the cart. Dim Products, ProductAttrs Dim Options, OptionNames Dim Keys, Values Set Products = Cart("Products") Dim LineIDs : LineIDs = Products.Keys Dim Product, ImageTag For i = 0 To UBound(LineIDs) 'For Each Product 'Get a product Set Product = Products(LineIDs(i)) %> <% If DisplayLineItemDiscount Then %> <% End If %> <% If DisplayLineItemTaxes Then %> <% Else %> <% End If 'DisplayLineItemTaxes %> <% Set Product = Nothing Next %> <% If DisplayLineItemDiscount Then %> <% End If %> <% If DisplayLineItemTaxes Then %> <% Else %> <% End If 'DisplayLineItemTaxes %> <% 'If Checking out show Tax, Shipping and Total If Session("CheckingOut") Then 'Display Tax ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If NOT DisplayLineItemTaxes Then %> <% End if 'Display Shipping ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If Application("EnableShipping") Then %> <% 'If showing line item discounts, show shipping discount in cell If displayLineItemDiscount Then %> <% End If 'If showing line item taxes, show shipping taxes and subtotals in cells If displayLineItemTaxes Then %> <% Else 'dislayLineItemTaxes = False %> <% End If 'displayLineItemTaxes %> <% 'Line item taxes not shown, so display shipping tax if necessary on separate line If Cart("CartTotals")("ShippingTax") <> 0 AND NOT displayLineItemTaxes Then %> <% End If End If 'Application("EnableShipping") 'Display ORDER TOTAL ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %> <% End If 'Session("CheckingOut") %>
Name Price Qty.DiscountSubtotal TaxTotal Remove
Select All
<% If CBool(Application("ShowImageInCart")) Then ImageTag = cwDisplayImage(Product("ID"), 4, Product("Name"), "") If ImageTag <> "" Then %>
<%= cwDisplayImage(Product("ID"), 4, Product("Name"), "") %>
<% End If 'ImageTag <> "" End If 'CBool(Application("ShowImageInCart")) %> <%= Product("Name") %> (<%= Product("MerchSKUID") %>) <% 'Output sku options 'Loop through the available options. Set Options = Product("Options") OptionNames = Options.Keys For x = 0 To UBound(OptionNames) %>
<%= OptionNames(x) %>: <%= Options(OptionNames(x)) %> <% Next Set Options = Nothing %>
<% If Product("DiscountAmount") <> 0 AND displayLineItemDiscount = False Then %> <%= cwDisplayOldPrice(FormatCurrency(Product("Price")), Product("Discount")("DiscountID")) & FormatCurrency(cwGetNewPrice(Product("Discount"), Product("Price"), Product("Quantity"))) %> <% Else %> <%= FormatCurrency(Product("Price")) %> <% End If %> " size="3" onBlur="cleanField(this)"><% If Product("DiscountAmount") <> 0 Then Response.Write(cwDisplayDiscountAmount(FormatCurrency(Product("DiscountAmount") * Product("Quantity")), Product("Discount")("DiscountID"))) %><%= FormatCurrency(Product("SubTotal")) %> <%= FormatCurrency(Product("Tax")) %> <%= FormatCurrency(Product("Total")) %><%= FormatCurrency(Product("SubTotal")) %>
 
Subtotal: <% If Cart("CartTotals")("Discounts") <> 0 Then Response.Write(FormatCurrency(Cart("CartTotals")("Discounts"))) %><%= FormatCurrency(Cart("CartTotals")("Sub")) %> <%= FormatCurrency(Cart("CartTotals")("Tax")) %> <%= FormatCurrency(Cart("CartTotals")("ProductTotal")) %><%= FormatCurrency(Cart("CartTotals")("ProductTotal")) %> 
Tax:  ><%= FormatCurrency(Cart("CartTotals")("Tax")) %>  
Ship By: <% If (rsCWShipList.RecordCount) <> (0) Then 'Start CCR %> <% If (rsCWShipList.RecordCount) > (1) Then 'Start CCR %>
<% Else 'CCR %> <%= rsCWShipList("shipmeth_Name") %> <% End If 'End CCR: (rsCWShipList.RecordCount) > (1) %> <% End If 'End CCR: (rsCWShipList.RecordCount) <> (0) %>
 <% If Cart("CartTotals")("ShippingDiscounts") <> 0 Then Response.Write(FormatCurrency(Cart("CartTotals")("ShippingDiscounts"))) %> <% If Cart("CartTotals")("ShippingDiscounts") <> 0 AND DisplayLineItemDiscount Then Response.Write(cwDisplayOldPrice(FormatCurrency(Client("ShipTotal")), shippingDiscount) & FormatCurrency(ShipTotal - Cart("CartTotals")("ShippingDiscounts"))) Else Response.Write(FormatCurrency(ShipTotal)) End If %>  <% If Cart("CartTotals")("ShippingTax") <> 0 Then Response.Write(FormatCurrency(Cart("CartTotals")("ShippingTax"))) %> <%= FormatCurrency(Cart("CartTotals")("ShippingTax") + Cart("CartTotals")("Shipping")) %> <% If Cart("CartTotals")("ShippingDiscounts") <> 0 Then Response.Write(cwDisplayOldPrice(FormatCurrency(ShipTotal), shippingDiscount)) Else Response.Write(FormatCurrency(Cart("CartTotals")("Shipping"))) End If %>  
Shipping Tax: <%= FormatCurrency(Cart("CartTotals")("ShippingTax")) %>  
Order Total:  <%= FormatCurrency(Cart("CartTotals")("Total")) %>  
<% If CBool(Application("enableDiscounts")) Then %>

If you have a promotional code, enter it now:

<% If Session("promotionalcode") <> "" Then %>

<% If Session("promocodeApplied") = "True" Then %> Applied promo code <%= Session("promotionalcode") %> <% Else %> Promo code <%= Session("promotionalcode") %> not found. <% Session("promotionalCode") = "" Session("promocodeApplied") = False End If End If %>

<% If Cart("CartTotals")("Discounts") <> 0 Then Response.Write(cwDisplayDiscountDescriptions()) %>

Savings of <%= FormatCurrency(Cart("CartTotals")("Discounts") + Cart("CartTotals")("ShippingDiscounts")) %>

<% End If %>
<% End If 'CBool(Application("enableDiscounts")) %> <% If (Session("CheckingOut")) = (False) Then 'Start CCR %>
<% If (Request.QueryString("returnurl")) <> ("") Then 'Start CCR %>

">Continue Shopping

<% End If 'End CCR: (Request.QueryString("returnurl")) <> ("") %> <% Else 'CCR, if Checking out, show credit card input form or Processor information %>
<% Select Case LCase(PaymentAuthType) Case "gateway" %>

Enter your credit card details to complete your order.

Credit Card Data
Card Holder Name *
Card Type <% 'Get Credit Cards for form field Set rsCWGetCCards = cwOpenQuery("SELECT ccard_Name, ccard_Code FROM tbl_list_ccards " &_ "WHERE ccard_Archive = " & cwBoolSQL(False) & " ORDER BY ccard_Name;",datasource) %> * <% cwCloseRecordset(rsCWGetCCards) %>
Card Number *
Expiration Date / *
CCV Code


This is the 3 digit number
that appears on the reverse side of your
credit card (where your signature appears).
Amex cards only - the 4 digit number on
the front of your card.


<% Case "processor" %>

Once you click Place Order below you will receive an order number. On the next page you will need to process your payment through our third party payment processor before your order will be shipped.

<% End Select 'Case PaymentAuthType %> <% If ((Session("PickShipPref")) = (0) AND (CBool(Application("enableshipping"))) = (True)) Then 'Start CCR %>

You must choose a shipping method to complete your order

<% Else 'CCR %> <% End If 'End CCR: ((Session("PickShipPref")) = (0) AND (CBool(Application("enableshipping"))) = (True)) %> ">
<% End If 'End CCR: (Session("CheckingOut")) = (False) %> <% End If 'End CCR: (bolHasCart) = (False) %> <% cwCloseRecordset(rsCWGetCart) cwCloseRecordset(rsCWGetCustData) cwCloseRecordset(rsCWGetBillTo) cwCloseRecordset(rsCWGetShipTo) %> <%= cwDebugOutput %>
 


Swanky Rooms, Unit 1, Stock Industrial Estate, Cradley Heath, West Midlands, B64 8DR

Copyright © 2007 Swanky Rooms. All rights reserved. Website Designed by TECHroute