<%@ 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

Terms and Conditions
Enter the general Terms and Conditions for the store here. You may use HTML tags (see example). Be sure to specify things such as your store's payment policy, return policy, and any other rules and conditions you may want to add.

Cart Message
The text you enter here will be displayed on the shopping cart page. For example, you may want to specify things like shipping and tax policies for your store. You may use HTML tags. This setting is optional.

Save Order Email Body
Enter the Email message that you want to send to your customers when they save an order in your store. Use only plain text, no HTML (some EMail software may not display HTML correctly).

Replacement Tags :

#NAME#  - Customer name
#DATE#  - Current date
#ORDER# - Order number
#TOTAL# - Order total
#ITEMS# - Order item detail
#COMMT# - Customer comments
#PAYMT# - Payment method
#STORE# - Store name
#SALES# - Sales Email addr
#SHIPT# - Shipping total
#SHIP#  - Shipping address
#BILL#  - Billing address

Update Order Status Email Body
Enter the Email message that you want to send to your customers when the order status is updated. Use only plain text, no HTML (some EMail software may not display HTML correctly).

Replacement Tags :

#NAME#  - Customer name
#STAT#  - Order status
#ORDER# - Order number
#DATE#  - Order date
#TOTAL# - Order total
#STORE# - Store name
#SALES# - Sales Email addr

Password Request Email Body
Enter the Email message that you want to send to your customers when they request their password in your store. Use only plain text, no HTML (some EMail software may not display HTML correctly).

Replacement Tags :

#NAME#  - Customer name
#PASS#  - Password
#STORE# - Store name

Email To Friend Email Body
Enter the default Email message that you want to be sent when a customer uses the "Email To a Friend" function. Use only plain text, no HTML (some EMail software may not display HTML correctly).

Replacement Tags :

#PROD#  - Product Description
#LINK#  - Link to Product
#PRICE# - Product Price
#STORE# - Store name

Successful Payment Message
This message is displayed to the customer upon return from a payment processor, if payment was determined to be successful. You may use HTML tags (see example) to further enhance the message's appearance.

Replacement Tags :

#STORE# - Store name
#SALES# - Sales Email addr

Unsuccessful Payment Message
This message is displayed to the customer upon return from a payment processor, if payment was determined to be unsuccessful. You may use HTML tags (see example) to further enhance the message's appearance.

Replacement Tags :

#STORE# - Store name
#SALES# - Sales Email addr

Replacement Tags can be used to personalize emails or text. The tags are replaced with their actual values before the email is sent out, or the text is displayed.