Agora.cgi OPTIONS files ----------------------- Here is a sample OPTIONS file: Gift Option junk this is ... it never gets displayed. This allows the software to be more easily edited by html editors or commented well. :)

--cut here--

Select Accessories

--cut here--

more junk here that is discarded. Everything outside of the

--cut here--

tags is discarded, it they are present. They are NOT required, if they are not present then the entire file is displayed. But remember without the

--cut here--

tags you should only have the contents of the . Note that in the form on which the client chooses options, each option is denoted with the form: NAME = "a|b|c" VALUE = "d|e|f" where a is the option marker "option" b is the option number (you might have multiple options which all modify the same item. Option number identifies each option uniquely. If using more that 9 options, use a leading zero so that they will sort correctly when added to the cart.) c is the option item number (the unique item id number which the option modifies) d is the option name (the descriptive name of the option) e is the option price. f is the shipping weight or price, depending whether UPS or fixed-rate shipping is being used. For example, consider this option from the default Vowels.html file which modifies item number 0001: Red
This is the second option modifying item number 0001 (you should use the %%PRODUCT_ID%% token (or %%PRODUCTID%%) as a placeholder here when you make your options files). When displayed in the display cart screen, it will read "Red 0.00", and will not affect the cost of the item. The second 0.00 means that the shipping weight is not affected either. Virtual Fields -------------- The virtual fields pre-installed with agora allow the options to be displayed one way on the web browser, and another in the emails. In the "cart display" option of the manager then web_options and email_options choices should be used for this purpose. Another benefit of these virtual fields is that they allow for the use of numbers to identify options in the option descriptions. In the option name, if it starts with the # character, everything up to the first blank is ignored for web display of the cart, but included in the emails. Options Security ---------------- It is possible, although highly unlikely, for someone to fake their "http referer" response and put in bogus options. These options could be "real" options with fake costs that would lower the cost, or they could be non-existant options. If you are worried about options security, there are a couple methods available to prevent options fraud on agora.cgi version 3.3d and higher. Inside the options file you will need to use agorascript to set the $item_opt_verify{} values for your options. One way to do it is manually, as in: An easier method is shown below, it has only been tested for a limited number of options files but should work so long as the name= part precedes any value= parts in the HTML. Various %% token substitutions and evals are completed, then the result is evaluated by agorascript running a special routine where it is parsed for the values that will be displayed on the browser for options. The parsing is activated by and is closed by Notice the use of helper tags, which are deleted at run-time to re-glue the agorascript. They allow the use of an HTML editor to initially generate the options, without those helper tags the HTML editor will think your options are comments!

--cut here--

Choose your Warranty %%cost%%

--cut here--

Last thing is that you would need to turn on options security by setting $sc_use_verified_opt_values = "yes"; in the agora.setup.db file or in a section of the agora_user_lib.pl you maintain for such purposes (unless your manager allows this option to be set directly.) Once this is set then NO options will be available unless they have the special options verification, so do not set it if you do not have all your "verified" options files working perfectly! One way to debug while enabling options security is to add the following code to the bottom of your options file or your product page inc file: It will print out a table of the options verification information that agora has in the verifcation table. If you are displaying more than one item, all the info in the table is displayed so be careful what you are doing! A little more about Option Agorascript -------------------------------------- Option agorascripts can be used at the time the option is displayed and when items are ordered, as seen above. It can also be used to make changes to what options are selected 'on-the-fly'. For example, you can force an option to be non-null via 'option agorascript' that gets run at the time they add things to the cart. Take this example for an option number 15 (your number here should match exactly, so if you use 01 as your option number, use that below were 15 is.) If the option 15 is null, our default info is filled in: This agorascript should be placed in the option file above or below the 'cut' tags (

--cut here--

) so they don't go out to the web browser. If you need to debug, use print statements, any returned values from the add-to-cart-opt- type agorascript is ignored.