Creating WizzCart Pages

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.

Add Item Tags

To add an item to a customers shopping cart script, you need to include the following elements:

  1. Form Tag. At the top of the page, you will need a

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.

  1. Name variable (required) and anchor (required for search engine).

    <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">>

  2. Quantity variable (required).

    &ltinput 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>

  3. Price variable (required).

    <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>

  4. Properties variables (optional). If items have properties such as color or size that you specified in the @properties array in the merchant setup file, then you need to include a way to indicate property choices. You can use SELECT, TEXT or RADIO form elements for this. Note: The script does not support SELECT MULTIPLE form elements at this time.

    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.

  5. Weight variable (optional, but required if you use weight in calculating shipping).

    <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>

Other Script Functions

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:

  1. Search feature. This feature is disabled in the demo version. As mentioned above, you will need to have a name anchor tag at the top of each item for the search engine to be most effective.

    <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>

  2. Show current order. Will show the current order if pressed.

    <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>

  3. Check out. When the customer is done shopping and wants to submit the order.

    <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>

  4. Clear order. This will clear the customers order by deleting the temp file.

    <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>&lttd>
<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>

Back To Marketwizz.net

 

Subscribe to subscribers list:

| 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.

PL - logo142x23Avon

Marketwizz Internet Solutions
309 N. Claremont Ave.
Fresno CA 93727
Phone: 559-458-0250
Fax: 559-458-0251
Email:
webmaster@marketwizz.com
CBS SportsLine Hickory Farms Esprit de Corp Lady Classic Greentree Nutrition

Copyright © 1998, Marketwizz Internet Solutions. All rights reserved.