%@ Language=VBScript %>
<%
'*************************************************************************
' DO NOT MODIFY THIS SCRIPT IF YOU WANT UPDATES TO WORK!
' Function : Modify Store Text Configurations
' 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
const adminLevel = 0
%>
<%
'Text Variables
dim termsAndCond
dim saveOrderEmail
dim paySuccessMsg
dim payErrorMsg
dim passRequestEmail
dim emailToFriend
dim statusUpdateEmail
dim cartMsg
'Database variables
dim mySQL, cn, rs
'Work Variables
dim tempConfigValLong
'*************************************************************************
'Open Database
call openDb()
'Get current text configurations from database
mySQL = "SELECT configVar, configValLong " _
& "FROM storeAdmin " _
& "WHERE adminType = 'T'"
set rs = openRSexecute(mySQL)
do while not rs.EOF
'Get text
tempConfigValLong = rs("configValLong")
'Assign text to local variable
select case trim(lCase(rs("configVar")))
case lCase("termsAndCond")
termsAndCond = tempConfigValLong
case lCase("saveOrderEmail")
saveOrderEmail = tempConfigValLong
case lCase("paySuccessMsg")
paySuccessMsg = tempConfigValLong
case lCase("payErrorMsg")
payErrorMsg = tempConfigValLong
case lCase("passRequestEmail")
passRequestEmail = tempConfigValLong
case lCase("emailToFriend")
emailToFriend = tempConfigValLong
case lCase("statusUpdateEmail")
statusUpdateEmail = tempConfigValLong
case lCase("cartMsg")
cartMsg = tempConfigValLong
end select
rs.MoveNext
loop
call closeRS(rs)
'Close Database
call closedb()
'If some of the text configurations are empty (as would be the case
'for users who created their own database), then pre-populate some
'required fields with default values.
if isNull(termsAndCond) or isEmpty(termsAndCond) then
termsAndCond = "" _
& "1. Payment - State payment policy ..." & vbCrlf _
& "
" & vbCrLf & vbCrLf _
& "2. Refunds - State refund policy ..." & vbCrLf _
& "
" & vbCrLf & vbCrLf _
& "3. Some more Rules - Some more rules, etc.. " & vbCrlf _
& "
"
end if
if isNull(saveOrderEmail) or isEmpty(saveOrderEmail) then
saveOrderEmail = "" _
& "#DATE#" & vbCrLf & vbCrLf _
& "Dear #NAME#," & vbCrLf & vbCrLf _
& "This is to confirm that you recently saved the following order in our store :" & vbCrLf & vbCrLf _
& "Order Number : #ORDER#" & vbCrLf _
& "Order Total : #TOTAL#" & vbCrLf _
& "Payment Type : #PAYMT#" & vbCrLf & vbCrLf _
& "As soon as payment has been received and verified, your Order Status will be updated to 'Paid'. You can track your Order Status by logging on to your 'Account'." & vbCrLf & vbCrLf _
& "If you have any questions regarding your order, please contact us via email at #SALES#." & vbCrLf & vbCrLf _
& "Regards" & vbCrLf & vbCrLf _
& "#STORE#" & vbCrLf & vbCrLf
end if
if isNull(statusUpdateEmail) or isEmpty(statusUpdateEmail) then
statusUpdateEmail = "" _
& "Dear #NAME#," & vbCrlf & vbCrlf _
& "Your Order Status was updated to : #STAT#" & vbCRlf & vbCrlf _
& "-----------------------------------------------------" & vbCrLf _
& "Name : #NAME#" & vbCrLf _
& "Order Number : #ORDER#" & vbCrLf _
& "Order Date : #DATE#" & vbCrLf _
& "Order Total : #TOTAL#" & vbCrLf _
& "-----------------------------------------------------" & vbCRlf & vbCRlf _
& "Thank you for your support." & vbCrlf & vbCrlf _
& "#STORE#" & vbCrLf & vbCrLf
end if
if isNull(paySuccessMsg) or isEmpty(paySuccessMsg) then
paySuccessMsg = "" _
& "As soon as we have received and verified your payment, " _
& "we will complete your order and update your order's " _
& "status. Please note that you can check on your order's " _
& "status by logging on to your Account and clicking on " _
& "the order.
" & vbCrLf & vbCrLf _
& "Thank you for your support.
" & vbCrLf & vbCrLf _
& "#STORE#"
end if
if isNull(payErrorMsg) or isEmpty(payErrorMsg) then
payErrorMsg = "" _
& "It appears that there was an error while you were " _
& "attempting to submit a payment for this order, or the " _
& "payment was cancelled. If there was an error " _
& "while trying to pay for this Order, you can Log On to " _
& "your Account where you will be able to re-attempt payment " _
& "for this Order.
" & vbCrLf & vbCrLf _
& "If you cancelled due to a problem or if you were not happy " _
& "with something, please let us know at #SALES#
" & vbCrLf & vbCrLf _
& "Thank you for your support.
" & vbCrLf & vbCrLf _
& "#STORE#"
end if
if isNull(passRequestEmail) or isEmpty(passRequestEmail) then
passRequestEmail = "" _
& "Dear #NAME#," & vbCRlf & vbCRlf _
& "Here is the result of your query :" & vbCRlf & vbCRlf _
& "------------------------------------------" & vbCrLf _
& "Password : #PASS#" & vbCrLf _
& "------------------------------------------" & vbCrLf & vbCRlf _
& "Thank you for your interest in our store." & vbCrLf & vbCRlf _
& "Regards" & vbCrLf & vbCrLf _
& "#STORE#"
end if
if isNull(emailToFriend) or isEmpty(emailToFriend) then
emailToFriend = "" _
& "Hi, #STORE# has this item that I thought you would " _
& "really like to know about." & vbCrLf & vbCrLf _
& "#PRICE# - #PROD#" & vbCrLf & vbCrLf _
& "Click on the link to see more info." & vbCrLf & vbCrLf _
& "#LINK#" & vbCrLf
end if
%>
Text Configuration