<%@ Language=VBScript %> <% '************************************************************************* ' DO NOT MODIFY THIS SCRIPT IF YOU WANT UPDATES TO WORK! ' Function : Options 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 'Options dim idOption dim optionDescrip dim priceToAdd dim weightToAdd dim taxExempt dim percToAdd dim sortOrder '************************************************************************* '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" %>

Option Maintenance

<% 'Page Tabs call optTabs("OP") if len(trim(Request.QueryString("msg"))) > 0 then %> <%=Request.QueryString("msg")%>

<% end if %>
Add New Option

<% rowColor = col2 'Retrieve all Options mySQL="SELECT idOption,optionDescrip,priceToAdd," _ & " weightToAdd,taxExempt,percToAdd,sortOrder " _ & "FROM Options " _ & "ORDER BY optionDescrip" set rs = openRSexecute(mySQL) do while not rs.eof %> <% rs.movenext 'Switch Row Color if rowColor = col2 then rowColor = col1 else rowColor = col2 end if loop %> <% call closeRS(rs) %>
 
ID Description Sort Price Perc. Weight TaxEx  
<%=rs("idOption")%> <%=rs("optionDescrip")%>  <%=emptyString(rs("SortOrder"),"-")%> <%=moneyD(rs("priceToAdd"))%>  <%=formatNumber(rs("percToAdd"))%>%  <%=rs("weightToAdd")%>  <%=rs("taxExempt")%>  [ ">edit ] ">
Delete Selected Options?

Help and Instructions :
Overview - Options are used to collect additional bits of information from a customer when they order a particular product. There are two ways in which you can do this. First of all, you can display a group of related options in a drop-down select list which will allow the customer to select one of the options in that list. Secondly, you can display a text box into which the customer can enter some text.

Example - Drop-Down Select List :
  1. Scenario - You want the customer to be able to pick a color from a list of colors when they order a T-Shirt (see example structure below).
  2. Create an option for each color. For example, Red, Green, Blue, etc. Note : On the store's product detail page, the option description will be displayed in the list, along with it's price (if any).
  3. Create a Color option group using the Option Groups function, and add the options you created in the previous step to this option group. Make sure that the option group type is "Drop-Down List". Note : On the store's product detail page, the option group description will be displayed above the drop-down select list as a heading for that list of options.
  4. The final step would be to add the Color option group to each T-Shirt product. This is done using the Product Maintenance function. When you add the option group to a product, you will also have the option of excluding any options in the option group that do not apply to that particular product. This way you don't have to create multiple Color option groups for different products with different color combinations.
  5. The system will now display a drop-down box with a list of Colors on the product detail page. The same process can be used for many other options, such as T-Shirt Size, Gift Wrapping, Technical Support Options, etc.
Example - Text Box :
  1. Scenario - You want the customer to enter some text which will be printed on the T-Shirt (see example structure below).
  2. Create a single option and give it a meaningful description. Note : Unlike drop-down list options, this description will not be displayed on the product detail page. Instead, it's merely used to identify that option in the maintenance functions. Like any other option however, you can specify if this option will incur an additional price.
  3. Create a Printed Text option group using the Option Groups function, and add the option you created in the previous step to this option group. Make sure that the option group type is "Text Input". Note : On the store's product detail page, the option group description will be displayed above the text box as a heading for that text box.
  4. The final step would be to add the Printed Text option group to each T-Shirt product. This is done using the Product Maintenance function.
  5. The system will now display a text box on the product detail page. Other good examples would be where you want the customer to enter an engraving for jewellery, a domain name when they order web hosting, etc.
Example Structure :
  • T-Shirt
    • Color
      • White
      • Red
      • Blue
    • Size
      • S
      • M
      • L
      • XL
    • Printed Text
      • <Text entered by customer>
<% call closedb() %>