%@ Language=VBScript %> <% '************************************************************************* ' DO NOT MODIFY THIS SCRIPT IF YOU WANT UPDATES TO WORK! ' Function : Order Discount Maintenance ' Product : CandyPress Store Administration ' 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 = 1 %> <% 'Database dim mySQL, cn, rs, rs2 'DiscOrder dim idDiscOrder dim discCode dim discPerc dim discAmt dim discFromAmt dim discToAmt dim discStatus dim discOnceOnly dim discValidFrom dim discValidTo 'Work Fields dim I dim item dim count dim pageSize dim totalPages dim showArr dim sortField dim curPage dim showStatus dim showOnceOnly dim showPhrase '************************************************************************* 'Open Database Connection call openDB() 'Store Configuration if loadConfig() = false then response.redirect "sysMsg.asp?errMsg=" & server.URLEncode("Could not load Store Configuration settings.") end if 'Set Row Colors dim rowColor, col1, col2 col1 = "#DDDDDD" col2 = "#EEEEEE" 'Set Number of Items per Page pageSize = 25 'Get Page to show curPage = Request.Form("curPage") 'Form if len(curPage) = 0 then curPage = Request.QueryString("curPage") 'QueryString end if 'Get showStatus showStatus = Request.Form("showStatus") 'Form if len(showStatus) = 0 then showStatus = Request.QueryString("showStatus") 'QueryString end if 'Get showOnceOnly showOnceOnly = Request.Form("showOnceOnly") 'Form if len(showOnceOnly) = 0 then showOnceOnly = Request.QueryString("showOnceOnly") 'QueryString end if 'Get showPhrase showPhrase = Request.Form("showPhrase") 'Form if len(showPhrase) = 0 then showPhrase = Request.QueryString("showPhrase") 'QueryString end if 'Check if a Cookie Reset was requested if Request.QueryString("resetCookie") = "1" then Response.Cookies("DiscSearch").expires = Date() - 30 else 'Check if a Cookie Recall was requested if Request.QueryString("recallCookie") = "1" then for each item in Request.Cookies if item = "DiscSearch" then showArr = Split(Request.Cookies(item),"*|*") curPage = showArr(0) showStatus = showArr(1) showOnceOnly = showArr(2) showPhrase = showArr(3) end if next else 'Save Search Criteria in a Cookie Response.Cookies("DiscSearch") = navCookie(curPage) Response.Cookies("DiscSearch").expires = Date() + 30 end if end if 'After attempting to retrieve the search criteria through the various 'mechanisms above (Form/QueryString/Cookie), check that some of the 'critical values are valid. If not, set to default values. if len(curPage) = 0 or not isNumeric(curPage) then curPage = 1 else curPage = CLng(curPage) end if 'Check what we will be sorting the results on sortField = Request.Form("sortField") 'Form if len(sortField) = 0 then sortField = Request.QueryString("sortField") 'QueryString end if if len(sortField) = 0 then sortField = "discCode" end if %>
Order Discount Maintenance
| Add New Discount |
|
No Discounts matched search criteria. |
|||||||||
| <% call pageNavigation("selectPageTop") %> | Sort : | ||||||||
|
Overview - There are two disctinct type of discounts,
namely Order discounts, and Product (item) discounts. Order
discounts are applied to the entire order, while Product
discounts are selectively applied to individual items in an order.
This function only applies to Order discounts, while Product
discounts are configured using the
Product Maintenance
function. Each order discount is assigned a unique code that must be entered in order to qualify for the discount. In addition, order discounts can be given a date range and can be configured so that they're only used once. Order discounts are calculated based upon the total value of an order, BEFORE taxes and shipping and AFTER product discounts have been applied (if any). You specify what order total will qualify for the order discount by entering a "From" and "To" amount. You also have to enter what percentage or amount of the order total to discount. If the customer then creates an order, and enter a valid discount code, the system will check the order total to see if it qualifies for the selected discount code. If it does, the appropriate amount will be deducted from the order total. In the list of discounts above, the following columns are displayed : Code - Discount code that must be entered by customer. From - Minimum order amount to qualify for discount. To - Maximum order amount to qualify for discount. Perc. - Percentage that will be subtracted from order. Amt. - Amount that will be subtracted from order. Stat - Discount Status. (A)ctive, (I)inactive, (U)sed. Once - Use once only? (Y)es, (N)o. If set to Yes, the discount can only be used once. Date Valid - Date range for which discount is valid. Add Discount - Click on the "Add Discount" button, and complete the form as indicated to add a new discount record. Find Discount(s) - You can limit the list of Discounts on this page by selecting one of several discount options, or combination of discount options by using the "Find" functions. Edit Discount - Click on "edit" to change discount information. Delete Discount - Check the box next to the discount you want to delete and click the button at the bottom of the page. Search Orders - Click the "orders" link to search for orders using that discount code. |