[ Home ] [ All in one ] [ Auction Payments ] [ Buy Now Links ] [ Check boxes ] [ Collecting cash ] [ ges_tidbits ] [ Host Reviews ] [ Hyperlinks ] [ Tags, Fields & Tips ] [ Misc Examples ] [ Multiproducts ] [ Multiproductform ] [ The New Button Tag ] [ New Window ] [ Payment Services ] [ php_mysql ] [ Posting Messages ] [ productpr ] [ Q&A from the forum ] [ Unsecure Payments ] [ Vouchers ] [ Shipping ]


Single/multiple Product with Attributes
product[ ]

The example below illustrates drop down boxes for selection and a text input box to gather information. Every thing will show up as one line in the cart separated by commas. i.e. The square brackets "[]" append all customer selections to the product "Custom personalization" as shown below. "add.cfm" is used as only one product is sent to the cart with all of the attributes appended to the product as shown below.
Required Tags/Fields: userid, product[ ], price, return Optional: quantity, units
Product Quantity Price Amount
Custom personalization, Angel Figurine, Moms, Personalization, Your message here, up to 34 characters 12.95 12.95

All prices are in US Dollars Subtotal 12.95
Shipping 0.00

TOTAL 12.9

***************************************************

The product is Custom Personalization.
To see the results in the cart (if you don't believe the above picture), choose your options and click on Buy Now. A new window will open showing the cart contents.

Choose Figurine
*See next item note



Choose Personalization
More options can be added by inserting additional
option values in the drop down list.




Add your Personal Message up to 34 characters.
*More characters can be added by changing the
size of the text input box.



*TIP: You can put more than 34 characters into a text box. The size="34" limits the physical size of the box on the page. Increase it to make the box longer, or decrease # for shorter. To limit it to a specific number of characters it must be validated.

**************************************************


The string

is not required in this example as the default value for the cart is 1, however I feel
it is best to include it in order to keep the code consistent throughout your site. If you can see it, you won't forget it.

<form action="http://www.aitsafe.com/cf/add.cfm" method="post">
<input type=
"hidden" name="product[]" value="Custom personalization">
<input type=
"hidden" name="userid" value="3334526">
<input type=
"hidden" name="return" value="www.yoursite.com/yourpage.htm">
<input type=
"hidden" name="price" value="12.95">
<input type=
"hidden" name="quantity" value="1">

Choose Figurine

<select name=
"product[]">
<option value=
"Angel Figurine">Angel Figurine</option>
<option value=
"Clown Figurine">Clown Figurine</option>
</select>

Choose Personalization
<select name=
"product[]">
<option value=
"Moms">Moms</option>
<option value=
"Mothers">Mothers</option>
<option value=
"Step Mothers">Step Mothers</option>
<option value=
"Grand Mothers">Grand Mothers</option>
</select>
<input type=
"hidden" name="product[]" value="Personalization">
<input type=
"text" name="product[]" size="34">
<input type=
"submit" value="Buy Now">
</form>

********************************************************

Multiple Products with Attributes
product1, product2, etc.

The example below illustrates drop down boxes for selection and a text input box to gather information. Each attribute is treated as a separate product. Each attribute will show up on it's own line in the cart as below. In this case "addmulti.cfm" must be used as there is more than one product to be sent to the cart with a single "Buy Now" button.

Product Quantity Price Amount
Custom personalization 12.95 12.95
Figurine, Angel Figurine 0.00 0.00
Personalization, Moms 0.00 0.00
Personalization Message, Your message here, up to 34 characters. 0.00 0.00

All prices are in US Dollars Subtotal 12.95
Shipping 0.00

TOTAL 12.95

******************************************************

The product is Custom Personalization.
To see the results in the cart, choose your options and click on Buy Now. A new window will open showing the cart contents.

Choose Figurine
See next item note



Choose Personalization
More options can be added by inserting additional
option values in the drop down list.




Add your Personal Message up to 34 characters.
More characters can be added by changing the
size of the text input box. See Tip in the previous example.


***************************************************************

Product1 does not need any brackets as there is nothing to append to that line in the cart
Product2, 3 and 4 uses brackets to append the option value to the product value on the same line. Brackets are not required on the "qty" but are included for consistency.
<form action="http://www.aitsafe.com/cf/addmulti.cfm" TARGET="new" method="post">
<input type=
"hidden" name="product1" value="Custom personalization">
<input type=
"hidden" name="userid" value="XXXXXXX">
<input type=
"hidden" name="return" value="www.yoursite.com/yourpage.htm">
<input type=
"hidden" name="price1" value="12.95">
<input type=
"hidden" name="qty1" value="1">

Choose Figurine

<input type=
"hidden" name="product2[]" value="Figurine">
<input type=
"hidden" name="qty2[]" value="1">
<select name=
"product2[]">
<option value=
"Angel Figurine">Angel Figurine
<option value=
"Clown Figurine">Clown Figurine
</select>

Choose Personalization

<input type=
"hidden" name="product3[]" value="Personalization">
<input type=
"hidden" name="qty3[]" value="1">
<select name=
"product3[]">
<option value=
"Moms">Moms
<option value=
"Mothers">Mothers
<option value=
"Step Mothers">Step Mothers
<option value=
"Grand Mothers">Grand Mothers
</select>

<input type=
"hidden" name="product4[]" value="Personalization Message">
<input type=
"hidden" name="qty4[]" value="1">
Add your Personal Message up to 34 characters
<input type=
"text" name="product4[]" size="34">

<input type=
"submit" value="Buy Now">
</form>


back.gif (368 bytes)