To create item pages for the shopping cart script, you use hidden form tags to enable the different script functions. You can format the pages anyway you like as long as you include the necessary hidden tags.
To add an item to a customers shopping cart script, you need to include the following elements:
tag to send the page for processing. The method is POST and the action is the URL of the script:
<FORM METHOD=POST ACTION="http://www.marketwizz.com/cgi-bin/cybercart5.pl">
Merchant userid.
<input type=hidden name=merchant value=userid>
Action. This hidden variable determines the action the script will take. For adding items, this is add:
<input type=hidden name=action value=add>
Page_name. This hidden variable determines where the script goes after adding items. Either use a full url, or a relative path name. If the script is running through a cgi wrapper, such as cgiwrap, then you might have to use the full url here.
Item Variables. Each item will have a number of hidden form variables. Some are required, and some are optional. Here is a description of the different possible hidden variables and when you need to use them.
<a name="id"></a>
<input type=hidden name=id_name value="Item Name">
The id_name should be unique. I usually use a two letter code followed by a three digit number and group the items into categories. For example, for a juggling club, it might be:
<a
name="jg002"></a>
<input type=hidden name=jg002_name value="Dube
Airflite Club">>
<input type=text name=id_quant value=0>
The id has to be the same as in the above name variable. This produces a text box where the customer can indicate item quantity. Example:
<input type=text name=jg002_quant value=1>
You can also use a checkbox for quantity:
<input type=checkbox name=jg002_quant value=1>
Or a drop down box:
<select
name=jg002_quant>
<option>0
<option>1
<option>2
<option>3
</select>
<input type=hidden name=id_price value=itemprice>
Example for the juggling clubs:
<input type=hidden name=jg002a_price value=13>
The script is also setup to accomodate an item that has slightly different properties, but at different prices. For example, if you have a book that comes in hardcover and softcover, with different prices, you can use a drop down selection box for this, if you format it right.
<input
type=select name=id_price>
<option>type1-$price1
<option>type2-$price2
</select>
Where type1 would be the additional item distinction, and $price1 is the price associated with that distinction. In the check out form, the type1 will be added to the name of the item. Note, this is not the same as using item properties. So, for example, to do a book with hardcover and softcover options:
<input
type=select name=book1_price>
<option>Soft Cover-$5.95
<option>Hard Cover-$21.95
</select>
Note:For this to work, you must have the -$ separating the distinction and price. The script keys on these two characters.
Non-Taxable Items. To mark an item as non-taxable, add a -nt after the price. To calculate the order total, the script will keep separate totals for taxable and non-taxable items. Tax is applied only to the taxable item total.
<input type=hidden name=id_price value=price-nt>
For a book that is non-taxable:
<input type=hidden name=bk001_price value=9.95-nt>
Colors <select name=jg002_prop1>
<option>Blue
<option>Green
<option>Pink
<option>Purple
<option>White
<option>Yellow
</select>
Note the "1" at the end of "prop1". This indicates a value for the first property in the @properties array. If you defined @properties=("Color","Size"), then "prop1" would refer to color and "prop2" would refer to the size.
The full versions can handle up to three properties, while the demo version allows one property variable.
<input type=hidden name=id_weight value=weight>
Again, you only need to include this variable if you are determining shipping and handling cost by total weight. The weight should be in the unit you defined in $weight (lbs, kgs, etc.). Example:
<input type=hidden name=jg002_weight value=.5>
Thats all the hidden variables that need to be defined for the items. Submit Button. At the bottom you need to include a submit button to add the items. You can also add multiple submit buttons or use an image instead of a form submit looking button:
<input type=submit
value=button_name>
</form>
Example:
<input type=submit value="Add Items"> </center> </form>
To use an image as a button:
<input type="image" align=right src="picture.gif" name="action" value="add" border=0>
You also need a set of buttons for the script to allow other functions. These can be included on each catalog page (recommended) or can be in a frame somewhere. I usually put them in a table to make their appearence neater. These buttons allow four actions to be taken:
<form method=post
action=script_url>
<input type=hidden name=merchant value=userid>
<input type=text name="term" size=15
maxlength=40>
<input type=hidden name=action value=search>
<input type=submit value="Search">
</form>
<form method=post
action=script_url>
<input type=hidden name=merchant value=userid>
<input type=hidden name=action value=order>
<input type=submit value="Show Order">
</form>
<form method=post
action=script_url>
<input type=hidden name=merchant value=userid>
<input type=hidden name=action value=place>
<input type=submit value="Check Out">
</form>
<form method=post
action=script_url>
<input type=hidden name=merchant value=userid>
<input type=hidden name=action value=clear>
<input type=submit value="Clear Order">
</form>
Here's an example of the four buttons put into a table that you can cut and paste:
<table>
<tr valign=top align=center><td>
<form method=post action="http://www.name.com/cgi-bin/cybercart.pl">
<input type=hidden name=merchant value=userid>
Term:<input type=text name="term" size=15 maxlength=40>
<input type=hidden name="action" value="search">
<input type=submit value="Search">
</form>
</td>
<td>
<form method=post action="http://www.name.com/cgi-bin/cybercart.pl">
<input type=hidden name=merchant value=userid>
<input type=hidden name="action" value="order">
<input type=submit value="Show Order">
</form>
</td>
<td>
<form method=post action="http://www.name.com/cgi-bin/cybercart.pl">
<input type=hidden name=merchant value=userid>
<input type=hidden name="action" value="place">
<input type=submit value="Check Out">
</form>
</td>
<td>
<form method=post action="http://www.name.com/cgi-bin/cybercart.pl">
<input type=hidden name=merchant value=userid>
<input type=hidden name="action" value="clear">
<input type=submit value="Clear Order">
</form>
</td></tr>
</table>
| Home | Support Archive | Hosting | Shopping Cart Rental | Secure Forms |
| Standard Business | Business Plus | Commerce Package | Commerce Package Plus |
|Information on Server Type||Use Policy||Use Policy|Data Center|| The Pros & Cons of Server Types |
| Win95 Drivers Release A | Win95 Web Sites | Software, Shareware, Freeware | Pre Paid Legal |
| Fresno Mall| US
Internet Mall
|Shop on the Internet| Domain-Names-for Sale | Office
Pro |
| Check By Fax | US
Internet Mall
| Free Midis | Free
1001 Backgrounds
| Travel |
|Dial-up Access for Californian's
Marketwizz Internet Solutions™ All rights reserved.
Copyright © 1996-99
Marketwizz Internet Solutions™. All rights reserved.
Marketwizz Internet
Solutions
309 N. Claremont Ave.
Fresno CA 93727
Phone: 559-458-0250
Fax: 559-458-0251
Email: webmaster@marketwizz.com
Copyright © 1998, Marketwizz Internet Solutions. All rights reserved.