ADDING ITEMS ONE AT A TIME
|
Features and Details of additem.exe
<FORM METHOD="POST" ACTION="/cgi-bin/additem.exe">
<input type="hidden" name="weight" value="1.25"> (optional) additem.exe POST METHOD As with all forms, you will have an opening form tag defining the action that will take place. You will have various values set or preset within the form, a submit button and a tag to define the end of the form. Here is a line-by-line breakdown and some sample code that shows what is required for additem.exe: Beginning form tag. The method is defined as "post" and the action defines the function all the values within the form are forwarded to. <FORM METHOD="POST" ACTION="/cgi-bin/additem.exe"> Nextpage. You can specify an input for a nextpage. This will allow you to specify a special page that will appear when an additem.exe does a submission. This feature is great for use as a way to confirm that an item added to the Shopping Cart. <input type="hidden" name="nextpage" value="http://www.yoursite.com/cart/itemadded.htm"> Template. You can specify a template page to appear upon additem.exe submission. A template page can be a Total page or a Subtotal page where template values are pulled from the Shopping Cart. <input type="hidden" name="template" value="\cart\subtotal.htm"> Product Values. For each product you must have these 5 values (ID, DESC, QUAN, SHIPPING, PRICE) defined with some type of input, if one of these values is left out or omitted the item will not be added. The item value for ID must not have any spaces in it or it will not work. Below is the code for the 5 values and a description of what they are. Note: When submitting values to the pre-built fields, the maximum characters of any value in an input is 50 characters or less including spaces. ID: Typically this will be the product number, SKU number, or can be used to set a product number and size. <input type="hidden" name="ID" value="SKU50503"> PRICE: The selling price of the product. You can include tax and or shipping in this amount, you can choose to add those values with the shipping tag in additem.exe, or place them on the subtotal page. <input type="text" name="Price" value ="5.50"> DESC: The description of the product that will appear in the purchase email as well as on the total and subtotal pages. (Remember the max size is 50 characters.) <input type="hidden" name="Desc" value="A nice product in red"> SHIPPING: The shipping value in additem.exe is multiplied by the QUAN number value. If you wish to code a solution that is a set rate of shipping no matter what the quantity, you can do so by making a product that is a shipping value, or by adding the shipping value on the subtotal page. The Shipping value can be setup as a radio button and will allow the customer to choose the method of shipping when they choose the product. Another use of this field is as an additional charge for special packaging or delivery. <input type="hidden" name="Shipping" value="0.00"> QUAN: This is the quantity of the item that a customer wishes to purchase. Quantity can be set by the customer using a checkbox, radio button, select (dropdown menu), text input or a textarea. <input type="text" name="Quan" value="1"> WEIGHT: This tag is optional and will add a weight for use with the Estimated Shipping Method <input type="hidden" name="weight" value="1.25"> TAXABLE: All items are by default taxable by the System Tax Features. If you wish to flag a particular Product as non-taxable so that Tax is not calculated when the item is added to the cart then you will need to add the TAXABLE=NO value. Note: The NO needs to be capital letters or this will not work. <input type="hidden" name="TAXABLE" value="NO"> Submit Button. You will need a Submit button in the form so that when the values are acceptable to the customer they can submit the product to the Shopping Cart. <input type="submit" value="Add to Cart"> Closing the form. You will need to add a close form tag </FORM> after the last field in the item. When the Submit button is pressed, the browser submits the required ID, PRICE, DESC, SHIPPING, QUAN values and any other optional fields like WEIGHT and DL to the additem.exe program on the server.
|