The HTML method is the legacy method used to create product forms on your website. It's recommended to enter product data in the shopping cart admin > Products and cut/paste the HTML code provided. However, there are times when the HTML method offers more flexibility.
Copy the HTML code below and paste it next to each item you offer on your web site. Words in CAPITAL letters should be replaced with item values.
Add to Cart Button with Quantity Box
<input type="hidden" name="name" value="NAME OF ITEM">
<input type="hidden" name="description" value="DESCRIPTION">
<input type="hidden" name="price" value="ITEM PRICE">
<input type="hidden" name="shipping" value="WEIGHT or CHARGE">
<input type="hidden" name="image" value="IMAGE FILE NAME">
Quantity: <input type="text" name="quantity" value="1" maxlength="3" size="3"><br><br>
<input type="submit" name="add" value="Add to Cart"></form>
ONLY USE the line: <input type="hidden" name="shipping" value="WEIGHT or CHARGE"> if you have set up shipping methods "by weight" or "by flat fee per item."
TIP: You can use a stock number, part number or any value when specifying the name of an item (NAME OF ITEM). You can also change the words that display on the submit button by changing value="Add to Cart" to value="ANYTHING YOU WANT".
Add to Cart Button - no quantity box
Copy the HTML code below and paste it next to each item you offer on your web site. Words in CAPITAL letters should be replaced with item values.
<input type="hidden" name="name" value="NAME OF ITEM">
<input type="hidden" name="description" value="DESCRIPTION">
<input type="hidden" name="price" value="ITEM PRICE">
<input type="hidden" name="quantity" value="1">
<input type="hidden" name="shipping" value="WEIGHT or CHARGE">
<input type="hidden" name="image" value="IMAGE FILE NAME">
<input type="submit" name="add" value="Add to Cart"></form>
ONLY USE the line: <input type="hidden" name="shipping" value="WEIGHT or CHARGE"> if you have set up shipping methods "by weight" or "by flat fee per item".
TIP: You can use a stock number, part number or any value when specifying the name of an item (NAME OF ITEM). You can also change the words that display on the submit button by changing value="Add to Cart" to value="ANYTHING YOU WANT".
Add options for products
If you provide options for the items you offer at your web site, use the HTML code below. You can choose which options add to the price of the item. All of the following examples are based on a web site that sells t-shirts.
IMPORTANT: Be sure to place HTML code for options inside the form tags
(<form> . . . </form>) used to create an "Add to Cart" button.
Drop-Down Box:
<option value="OPTION 1" select>OPTION 1</option>
<option value="OPTION 2">OPTION 2</option>
<option value="OPTION 3">OPTION 3</option>
<option value="OPTION 4|PRICE">OPTION 4 add $0.00</option>
</select>
Example:
Size: <select name="option1|Size">
<option value="Small" select>Small</option>
<option value="Medium">Medium</option>
<option value="Large">Large</option>
<option value="X-Large|2.00">X-Large add $2.00</option>
</select>
Text Box:
Example:
Enter the name you want embroidered on your t-shirt:
<input name="option1|Name on Shirt" size=20>
Use Check Boxes for upselling!
Example:
If you like our t-shirts, you may also like:<br>
<input type="checkbox" name="option1|Optional" value="Sports Bag|19.99">Sport Bag add $19.99
<input type="checkbox" name="option2|Optional" value="Running Shoes|79.99">Running Shoes add $79.99
<input type="checkbox" name="option3|Optional" value="Ladies Shorts|16.50">Ladies Shorts add $16.50
Radio Buttons
<input type="radio" name="option1|NAME OF OPTION" value="OPTION 2">OPTION 2
<input type="radio" name="option1|NAME OF OPTION" value="OPTION 3|0.00">OPTION 3 add $0.00
Example:
Color:<br>
<input type="radio" name="option1|Color" value="White">White
<input type="radio" name="option1|Color" value="Blue">Blue
<input type="radio" name="option1|Color" value="White w/blue collar|3.75">White w/blue collar add $3.75
Allow adding multiple items at once
<table>
<tr>
<td>Item</td>
<td>Quantity</td>
</tr>
<tr>
<td><input type="checkbox" name="item1" value="NAME|DESC|PRICE|SHIP|IMAGE"> ITEM LABEL</td> <td><input type="text" name="item1|quantity" value="1" size="3"></td></tr>
<tr>
<td><input type="checkbox" name="item2" value="NAME|DESC|PRICE|SHIP|IMAGE"> ITEM LABEL</td> <td><input type="text" name="item2|quantity" value="1" size="3"></td></tr>
</table><br>
<input type="submit" name="add_items" value="Add Selected Items to Cart"></form>
Replace NAME with the name of the item.
Replace DESCR with a short description of the item.
Replace PRICE with the price of the item (e.g., 24.95, 5.00, 0.50)
If you have set up a shipping method by weigh or flat fee per item, replace SHIP with a valid shipping amount (charge or weight)
If you designated a thumbnail image folder (Settings > Shopping Cart Page), replace IMAGE with the file name of the item's thumbnail image. You can also use the complete URL that points to the image.
Replace ITEM LABEL with the actual text your customers will see next to the checkbox.
Allow adding multiple items at once with product options
<table> <tr> <td>Item</td><td>Option</td><td>Quantity</td> </tr> <tr> <td><input type="checkbox" name="item1" value="NAME|DESC|PRICE|SHIP|IMAGE"> ITEM LABEL</td> <td><select name="item1|option1|OPT_NAME"> <option value="OPT_VALUE">OPT_VALUE</option> <option value="OPT_VALUE">OPT_VALUE</option> </select></td> <td><input type="text" name="item1|quantity" value="1" size="3"></td> </tr> <tr> <td><input type="checkbox" name="item2" value="NAME|DESC|PRICE|SHIP|IMAGE"> ITEM LABEL</td> <td><select name="item2|option1|OPT_NAME"> <option value="OPT_VALUE">OPT_VALUE</option> <option value="OPT_VALUE">OPT_VALUE</option> </select></td> <td><input type="text" name="item2|quantity" value="1" size="3"></td> </tr> </table><br> <input type="submit" name="add_items" value="Add Selected Items to Cart"></form>
Replace OPT_NAME with the name of the option (e.g., Color or Size)
Replace OPT_VALUE with a possible option your customer can choose (e.g., brown, blue, small, large).
You can create any type of option (e.g., drop-down box, radio buttons, etc.), as long as you name the option using the format above. To make an option apply to all items added to the shopping cart, replace "item#" with the word "all" for the option name.
Display items in a drop-down box
Use the HTML code below as a template for designing your own drop-down box.
<select name="ITEM">
<option value="NAME|DESCRIPTION|PRICE|SHIPPING|IMAGE">ITEM LABEL</option>
<option value="NAME|DESCRIPTION|PRICE|SHIPPING|IMAGE">ITEM LABEL</option>
<option value="NAME|DESCRIPTION|PRICE|SHIPPING|IMAGE">ITEM LABEL</option>
</select><br> Quantity: <input type="text" name="quantity" value="1" maxlength="3" size="3">
<input type="submit" name="add" value="Add to Cart"></form>
Replace NAME with the name of the item.
Replace DESCRIPTION with a phrase that describes the item.
Replace PRICE with the price of the item (e.g., 24.95, 5.00, 0.50)
If you have set up a shipping method by weigh or flat fee per item, replace SHIPPING with a valid shipping amount (charge or weight)
If you designated a thumbnail image folder (see Settings page, Display Options, Miscellaneous), replace IMAGE with the file name of the item's thumbnail image.
Replace ITEM LABEL with the actual text shoppers will see in the drop-down box.
Example:
<form method=post action="https://www.ewebcart.com/MERCHANT CODE/cart">
<select name="ITEM">
<option value="novalue" select>- Please select -</option>
<option value="Item #45|1 Dozen Cookies|3.50|cookies34.gif">1 Dozen Cookies - $3.50</option>
<option value="Item #23|Wedding Cake|75.45|wedcake.gif">Wedding Cake - $75.45</option>
<option value="Item #12|1 lb. Gourmet Candy|5.00|gcandy.gif">1 lb. Gourmet Candy - $5.00</option>
</select><br>
Quantity: <input type="text" name="quantity" value="1" maxlength="3" size="3">
<input type="submit" name="add" value="Add to Cart">
</form>
Display an Add to Cart or View Shopping Cart/Checkout text link
Copy the "Add to Cart text link" HTML code below and paste it next to each item you offer at your web site.
Add to Cart text link
NAME = Name of the item.
DESCRIPTION = A phrase that describes the item.
PRICE = Price of the item.
SHIPPING = Weight or shipping charge for item.
ONLY USE the section shipping=SHIPPING& if you have set up shipping methods "by weight" or "by flat fee".
IMPORTANT: When browsers pass values using a URL, certain characters need to be replaced. When you are assigning NAME and DESCRIPTION values, replace:
spaces with the "+" sign
semicolons ; with "%3B"
pound sign # with "%23"
commas , with "%2C"
Example:
<a href="https://www.ewebcart.com/MERCHANT CODE/cart?add=1&name=%23GARD397&
description=Garden+Hose&price=10.95">Add to Cart</a>
NOTE: You cannot use an "Add to Cart" text link for items that have options.
View Cart/Checkout text link
Example:
<a href="https://www.ewebcart.com/MERCHANT CODE/cart?view=1">View Cart/Checkout</a>
View Shopping Cart/Checkout Button
Copy the HTML code below and insert it into any page of your choice. Normally, you would create one "View Shopping Cart/Checkout" button for each page that displays the items you offer.
IMPORTANT: Do not place the following code in between other form tags
(<form> . . . </form>).
TIP: You can change the words that display on the submit button by changing
value="View Shopping Cart/Checkout" to value="ANYTHING YOU WANT".
Allow adding files to the shopping cart
1. Place the files (e-books, reports, software, etc.) your customers can purchase in any folder (directory) on your web site.
2. Enter the Shopping Cart Administration Area and click on Settings; then click on Web Site Information.
3. Under part (2), enter the URL that points to the folder (directory) where you placed the files in step 1. Example: http://www.YOURSITE.com/files4sale/
4. Click on the Save Settings button.
5. Include the name of each file within the HTML code used to display an Add to Cart button.
<input type="hidden" name="name" value="NAME OF ITEM[#FILE:FILE NAME#]">
Example:
<input type="hidden" name="name" value="Special Report[#FILE:report.zip#]">
How do I replace the Add to Cart and View Shopping Cart/Checkout buttons with images?
Replace the lines:
<input type="submit" name="add" value="Add to Cart">
<input type="submit" name="view" value="View Shopping Cart/Checkout">
with . . .
<input type="image" src="IMAGE URL" name="add" border="0">
<input type="image" src="IMAGE URL" name="view" border="0">
Replace IMAGE URL with your own web site address and the location of the button image you want to use.
Offer volume discounts on a per item basis
You must specify the quantity ranges and discount amounts inside the "name" hidden form tag used to create an Add to Cart button.
Example:
<input type="hidden" name="name" value="Men's Gloves[#DISCOUNT:1-3,0.50::4-10,1.00#]">
If a shopper adds 1 to 3 pairs of Men's Gloves to their cart, they will receive a 50 cent discount. If a shopper adds 4 to 10 pairs of Men's Gloves to their cart, they will receive a discount of $1.00.
OPTIONAL: If you would like the volume discount to apply to each item, you can enter the multiplication (*) symbol after the range value.
Example:
<input type="hidden" name="name" value="Men's Gloves[#DISCOUNT:1-3*,0.50::4-10*,1.00#]">
If a shopper adds 2 pairs of Men's Gloves to their cart, they will receive a discount of $1.00 (the 50 cent discount is now applied to each pair of men's gloves). If a shopper adds 7 pairs of Men's Gloves to their cart, they will receive a discount of $7.00.
NOTE: Volume discounts based on a per item basis work well for merchants who only want to offer volume discounts on a few select items or a unique volume discount per item. If you want to create volume discounts based on the subtotal of the entire order or the total number of items ordered, use Volume Discounts on the Settings page.
Special Codes Index
[#RPL#] - Use this code if you are displaying a link on receipt pages but only want certain items to cause the link to appear.
Example:
<input type="hidden" name="name" value="Membership[#RPL#]">
[NOTAX] - Use this code to make an item sales tax exempt.
Example:
<input type="hidden" name="name" value="Men's Polo Shirt[NOTAX]">
novalue - Use this code when you want the shopping cart to ignore a drop-down box or radio button value.
Example:
<select name="option1|Size">
<option value="novalue" select>Please select a size
<option value="Small">Small</option>
<option value="Medium">Medium</option>
<option value="Large">Large</option>
</select>
If a shopper doesn't choose a size, the shopping cart will disregard the words "Please select a size"
[#OMITSHIP#] - If you sell both products and services, you can use the [#OMITSHIP#] code with service items. If a shopper only adds service items to their cart, sections related to shipping will not display.
Example:
<input type="hidden" name="name" value="Marketing Services[#OMITSHIP#]">
[#NOSHIP#] - If you base shipping charges on an order's subtotal amount, you can use the [#NOSHIP#] code to exclude an item's price from the subtotal. The item's price will still be added to the order total but won't be considered when shipping charges are being calculated.
Example:
<input type="hidden" name="name" value="Shoe Laces[#NOSHIP#]">
[#NOPROMO#] - If you offer your customers promotional discounts but want to exclude certain items from being discounted, use the [#NOPROMO#] code. The item's price will still be added to the order total but won't be considered if a shopper enters a valid discount code.
Example:
<input type="hidden" name="name" value="Item A275[#NOPROMO#]">
[#NOVOL#] - If you offer your customers volume discounts but want to exclude certain items from being discounted, use the [#NOVOL#] code. The item's price will still be added to the order total but won't be considered when a volume discount is being calculated.
Example:
<input type="hidden" name="name" value="UltraMax Dog Food[#NOVOL#]">
[#FREE#] - If there are items you offer at no charge, use the [#FREE#] code. If a shopper's cart only contains FREE items, payment methods will not display and shipping and tax charges will not apply.
Example:
<input type="hidden" name="name" value="Brochure[#FREE#]">
[#MINQTY:number#] - Set a minimum amount that can be ordered. If your customer attempts to set item quantity below "number", an error message will display.
Example:
<input type="hidden" name="name" value="Music CD[#MINQTY:12#]">
[#MAXQTY:number#] - Set a maximum amount that can be ordered. If your customer attempts to set item quantity above "number", the shopping cart will automatically reset the quantity to the maximum amount.
Example:
<input type="hidden" name="name" value="Legal Services[#MAXQTY:1#]">
FLAT: - If you have set up shipping options by weight and by flat fee per item, a shipping value will have to be sent with each item's name, description, price, etc. The shopping cart needs to know whether a shipping value should be viewed as a monetary amount (flat fee) or as a weight amount. You can use the "FLAT:" code to specify which shipping values should be used for flat fee shipping charges only.
Example:
<input type="hidden" name="shipping" value="FLAT:5.00">
Hints and Tips
- If you want to require your customers to choose one or more options you have set up, use the "require" field. Place the "require" field anywhere within your "Add to Cart" code.
Example - You sell flowers and have set up two options. One option allows customers to select a color and the other let's customers enter a short message on gift cards.
<select name="option1|Color">
<option value="novalue">Select Color</option>
<option value="Red">Red</option>
<option value="Blue">Blue</option>
</select>
<input name="option2|Card Message" size=20>
<input type="hidden" name="require" value="option1|Color~option2|Card Message"> - If you have chosen to assign a flat shipping fee to each item, you can use one amount that applies only to the first item and a different amount for each additional item.
Example - Item A uses the following shipping amounts:
<input type="hidden" name="shipping" value="2.50~1.00">
If a shopper set quantity at 3 and clicked on the "Add to Cart" button for item A, the shipping charge would be $4.50. - If you do not want to charge shipping for a particular product, set the shipping amount for that product to 0.00.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article