Help Index >> Cart 32 Help >> Add Item Method back to Cart 32 Helpforward to Item List Methodup a level to Cart 32 Helptable of contents

Cart32 Help
Add Item Method

To add an item to the shopping cart you must use an HTML form for each item. Here is the syntax for the additem form. Items in italics are to be filled in with the appropriate information.

Form Tag
<form method=post action="/cgi-bin/cart32.exe/CLIENTCODE-additem">
- Replace cgi-bin with the name of your CGI directory
- Replace CLIENTCODE with your Cart32 client code.

Required Fields

Name of the Item:
<input type=hidden name="Item" value="name of item">

Price of the Item
<input type=hidden name="Price" value="price of item">

Quantity
Hidden field with set quantity
<input type=hidden name="Qty" value="1">
or
Text field with user set quantity
<input type=text size=3 name="Qty">


Optional Fields

Discount This field is to modify the price based on quantity. To set up a discount, you can use the following specification. <input type="hidden" name="discount" value="qty[+]:[+/-]price[%]">
The items in brackets are optional. Each value would be separated by semi-colons.

Ex. This would give an item the price of $12 for qty 1 to 5. Anything over 6 would be $10
<input type="hidden" name="discount" value="1-5:12;6+:10">

This would give any qty of items over 3 a discount of $1 per item
<input type="hidden" name="discount" value="3+:-1">

This would give any qty of items over 3 a discount of 5% per item. You have to put the percentage of the price. So if you want 10% off them put 90% and so on.
<input type="hidden" name="discount" value="3+:95%">

Part No (this is for an item number, code or partno)
<input type=hidden name="PartNo" value="Part Number of item">

Shipping Price of the Item
You would use this if this client used the "Built into price" shipping method (discussed later). Shipping only accepts numeric values
<input type=hidden name="Shipping" value="price of item">

You can also use this field to exclude an item from shipping. To do this set the shipping value to -1.
Ex. <input type=hidden name="shipping" value="-1">

Weight of the Item
You would use this only if this client used the "By Weight" or UPS Zone shipping method. Weight only accepts numeric values.
<input type=hidden name="Weight" value="weight of item">

URL
This is the URL that the item name links to on page that shows the list of items in the shopping cart. <input type=hidden name="URL" value="
URL of item">

Referer
This is the URL that the “Click Here To Continue Shopping" text links back to. You can specify that text on the Customize Tab in Cart32 Admin. <input type=hidden name="Referer" value="Referer of item">

Tax
This field is to customize the tax value for each item. You need to specify the tax in decimal form as a percentage of that item’s cost.
<input type=hidden name="Tax" value=".06"> This is for 6% tax for this item
or
<input type=hidden name="Tax" value=".07251"> This is for 7.251% tax for this item

SendTo
This will cause Cart32 to add the item to the cart and then display the page in the value of the SendTo tag instead of the list of items in the cart. <input type=hidden name="SendTo" value="URL of page">

Extra Parameters or Options For each item you can have from 1 - 20 parameters. They can be a drop down list, radio buttons, check boxes or text boxes. For each extra parameter you need two fields. For parameter x your need fields named px and tx. The p stand for parameter and the t stand for type so you can have fields named p1,t1 then p2,t2 then p3,t3 … The options can also be used to set or modify the price, part number, tax and weight hidden fields.

Drop Down List
<select name="px">>
<option value="Option1Value">Option1Value
<option value="Option2Value">Option2Value
<option value="Option3Value">Option3Value
</select>
<input type=hidden name="tx" value="d-OptionName;Option1Value;Option2Value;Option3Value">

Radio Button
<select name="px">
<input type=radio name="Option Name" value="Option1Value">Option1Value
<input type=radio name="Option Name" value="Option2Value">Option2Value
<input type=radio name="Option Name" value="Option3Value">Option3Value
<input type=hidden name="tx" value="r-OptionName;Option1Value;Option2Value;Option3Value">

Check Box
<input type=checkbox name="px" >Option1Value
<input type=hidden name="tx" value="c-OptionName">

Text box
<input type=text name="px">
<input type=hidden name="tx" value="t-OptionName">

Multi line Text Box
<textarea name="px"> rows=5 cols=40 wrap=physical></textarea>
<input type=hidden name="tx" value="m-OptionName">

Hidden option
<input type=hidden name="px">
<input type=hidden name="tx" value="h-OptionName">

To see a sample of the HTML code to use in Cart32 try the HTML Form Wizard which you can download by clicking here.