%@ Language=VBScript %> <% '************************************************************************* ' DO NOT MODIFY THIS SCRIPT IF YOU WANT UPDATES TO WORK! ' Function : Calculate tax and other totals ' : Show complete order for final user approval/disapproval ' : Cancel Order ' : Submits Order ' Product : CandyPress Store Frontend ' Version : 2.5 ' Modified : February 2004 ' Copyright: Copyright (C) 2004 CandyPress.Com ' See "license.txt" for this product for details regarding ' licensing, usage, disclaimers, distribution and general ' copyright requirements. If you don't have a copy of this ' file, you may request one at webmaster@candypress.com '************************************************************************* Option explicit Response.Buffer = true %> <% 'cartHead dim orderDate dim orderStatus dim subTotal dim taxTotal dim shipmentTotal dim handlingFeeTotal dim otherFeeTotal dim Total dim shipmentMethod dim Name dim LastName dim CustomerCompany dim Phone dim Email dim Address dim City dim Zip dim locState dim locCountry dim shippingName dim shippingLastName dim shippingPhone dim shippingAddress dim ShippingCity dim shippingZip dim shippingLocState dim shippingLocCountry dim paymentType dim cardType dim cardNumber dim cardExpMonth dim cardExpYear dim cardName dim cardVerify dim generalComments dim taxExempt dim discCode dim discPerc dim discTotal dim randomkey dim storeCommentsPriv 'customer dim locState2 dim shippingLocState2 'cartRows dim IDCartRow dim IDProduct dim SKU dim Quantity dim unitPrice dim Description dim discAmt 'cartRowsOptions dim idOption dim optionPrice dim optionDescrip 'DiscProd dim idDiscProd dim discFromQty dim discToQty 'Work Fields dim f dim customerEmail dim customerEmailItems dim optionGroupsTotal dim optionGroupsDesc 'Database dim mySQL dim conntemp dim rstemp dim rstemp2 'Session dim idOrder dim idCust '************************************************************************* 'Open Database Connection call openDb() 'Store Configuration if loadConfig() = false then call errorDB(langErrConfig,"") end if 'Get/Set Cart/Order Session idOrder = sessionCart() 'Get/Set Customer Session idCust = sessionCust() 'Check if the session is still active if isNull(idOrder) then response.redirect "sysMsg.asp?errMsg=" & server.URLEncode(langErrCartEmpty) end if 'Check if cart has any items if cartQty(idOrder) = 0 then response.redirect "sysMsg.asp?errMsg=" & server.URLEncode(langErrCartEmpty) end if 'Check if minimum order amount has been met if cartTotal(idOrder,0) < pMinCartAmount then response.redirect "sysMsg.asp?errMsg=" & server.URLEncode(langErrMinPrice & pCurrencySign & moneyS(pMinCartAmount)) end if 'Check that the Customer is logged on if isNull(idCust) then response.redirect "sysMsg.asp?errMsg=" & server.URLEncode(langErrNotLoggedIn) end if 'Check if "Cancel Order" button was clicked if request.form("CancelOrder") <> "" then 'Cancel Order CancelOrder() 'Close DB Connection call closeDB() 'Go to index page response.redirect urlNonSSL & "default.asp" end if 'Check if "Submit Order" button was clicked if request.form("SubmitOrder") <> "" then 'Submit the Order SubmitOrder() 'Close Database call closeDb() 'Check Order Status and Payment Type and forward to the next page if orderStatus = "0" then 'Pending select case lCase(paymentType) case "paypal","cod","2checkout","authorizenet","pag_digital","custom" 'Order Number is passed via the session object for the 'benefit of gateways that require the payment page to be 'a fixed URL. session(storeID & "idOrderPaySubmit") = idOrder Response.Redirect "50_PaySubmit.asp" case else Response.Redirect "60_PayReturn.asp?CP_idOrder=" & idOrder & "&CP_Status=success" end select else Response.Redirect "60_PayReturn.asp?CP_idOrder=" & idOrder & "&CP_Status=success" end if end if 'If we get this far, then neither "Cancel Order" nor "Submit Order" 'was pressed. This means that we have not yet showed the Order for 'viewing, so we do that here. 'Retrieve info from Customer and cartHead getCustCartInfo() 'Calculate and other Totals taxAndTotals() 'Update cartHead with Totals and info from Customer updateCartInfo() 'Make sure this page can not be cached Response.Expires = -10000 Response.Expiresabsolute = Now() - 1 Response.AddHeader "pragma","no-cache" Response.AddHeader "cache-control","private" Response.CacheControl = "no-cache" %> <% 'Close Database Connection call closeDB() '********************************************************************** 'Main Shopping Cart Display Area '********************************************************************** sub cartMain() %>
PAGAMENTO A VISTA <% end if if left(storeCommentsPriv,1) = 2 Then %>PAGAMENTO EM 2x DE <%=pCurrencySign & moneyS(Total/2)%> com juros de <%=juros%>% ao mês. <% end if if left(storeCommentsPriv,1) = 3 Then %>PAGAMENTO EM 3x DE <%=pCurrencySign & moneyS(Total/3)%> com juros de <%=juros%>% ao mês. <% end if if left(storeCommentsPriv,1) = 4 Then %>PAGAMENTO EM 4x DE <%=pCurrencySign & moneyS(Total/4)%> com juros de <%=juros%>% ao mês. <% end if if left(storeCommentsPriv,1) = 5 Then %>PAGAMENTO EM 5x DE <%=pCurrencySign & moneyS(Total/5)%> com juros de <%=juros%>% ao mês. <% end if if left(storeCommentsPriv,1) = 6 Then %>PAGAMENTO EM 6x DE <%=pCurrencySign & moneyS(Total/6)%> com juros de <%=juros%>% ao mês. <% end if end if %> <% call deposito() %>
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||