
Here is a single item in a one row table using a variable size/price option. The hidden variable "item" contains the keyword "op1" in the price field instead of a legal price. This tells the cart to parse the select variable named "op1" to obtain the price. Notice that the select drop down has a size and price separated by a space dash space. Use this format to insure correct parsing by the cart. Any of the option variables op1 - op44 can be used to price an item.
Here is another single item in a one row table with variable options. The hidden variable "item" contains the keywords "op1op12op4" instead of a legal price in the price field. This tells the cart to parse the selections named "op1", "op12", and "op4" (in that order), and sum up all associated costs to obtain the item price. To not add cost to an item for an option, make the value "hardened - $0.00".
| Part number | Item Description | select desired material | click to add to cart |
This example has the same basic cart functionality as the one above, but illustrates a table of similar products usefulto present many items in a small space. Notice that each row in the table containing product is actually a small form totally independent from adjacent rows.
This example illustrates a way to use the product picture as an add to cart button.
This widget is just $6.32.
(Click the image to place in cart.)
This example illustrates a way to allow the customer to place more than one thing in their cart using a select drop down. In the quantity field of the hidden "item" variable, enter the name of the select. (op2 in this example). There is also a simple usage of a text box to allow the shopper to add text to the item description.
This example illustrates a way to allow the customer to place an arbitrary number of an item in the cart using a text box. In the quantity field of the hidden "item" variable, we put the name of the variable for the text box. (op2 in this example). Just to spice it up, we threw in two extra options (op4 & op1). They're not marked for parsing in the hidden variable, and so are just appended to the description. Notice that even though op4 comes before op1 in the source, op1 is appended to the description first in the cart.
Here are the standard implementations for viewing cart contents and going to checkout. These can appear anywhere on your site you wish, but be sure not to put them inside another <form></form> construct. (Nesting forms is a bad thing!)