<%@ Language=VBScript %> <% '************************************************************************* ' DO NOT MODIFY THIS SCRIPT IF YOU WANT UPDATES TO WORK! ' Function : Bulk Order 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 'Products dim idProduct dim description dim price dim sku dim weight '************************************************************************* 'Are we in demo mode? if demoMode = "Y" then response.redirect "sysMsg.asp?errMsg=" & server.URLEncode("DEMO MODE. Sorry, this featured is NOT available in Demo Mode.") end if '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 %>

Bulk Order Maintenance

<% if len(trim(Request.QueryString("msg"))) > 0 then %> <%=Request.QueryString("msg")%>

<% end if %>
WARNING : This function should be used with caution. Once an update has been applied, it can not be undone easily. This function will not be appropriate for everyone, but we decided to include it because we use it, and thought others may want to use the function as well.

ADD Items to Orders
<% 'Get Product Records mySQL="SELECT idProduct,description,price,sku,weight " _ & "FROM products " _ & "ORDER BY description" set rs = openRSexecute(mySQL) if rs.EOF then Response.Clear response.redirect "sysMsg.asp?errMsg=" & server.URLEncode("At least one Product is required in the Database to use this function.") end if %>
1. Search for all Orders with this Item :


2. Add this Item to the Order :

Invert the Price (ie. Price x -1).



1. SKU, Description, Price and Weight for the added item are obtained from the Product file.
2. Quantity will always be 1.
3. Duplicates are NOT checked. If the added Item already exists on the order, it will be re-added.
4. EXISTING order information WILL NOT BE CHANGED, including the Order Status and Order Totals, which may result in the individual items not adding up to the Order Total. This is to prevent possible inconsistencies between the Order Total and any actual amounts already paid. If you want the individual Order Items to add up to the Order Total, add the new item twice, once with a positive price, then with a negative price. Or you could simply make the price of the product you are adding "0.00".

<% 'Close Recordset call closeRS(rs) 'Close Database Connection call closedb() %>