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


Tips & Examples for Mals ECom Cart

Multi-Product Forms using addmulti.cfm

Adding multiple products to the cart with a single click is easy with Mals cart. This application uses the addmulti.cfm routine since more than one product can or will be added from a list of products. The maximum number of products that a form can have is 30. So, if you want to sell 30,000 products, you'd better set in a good supply of beer & pretzels, tea & crumpets or cerveza & tacos. Each product and it's associated tags (qty, price etc.) must be numbered from 1 (successively) to as many products as you want up to a maximum of 30.
DO NOT
use a form with 18 products and a second form with products 19 to 30. Start from #1 in each and every form and don't forget! If you have two or more forms on one page, you need an end ( ) tag for each form.
When using a text box to input a quantity as shown below, if a quantity is not entered into a box, that product will not be passed to the cart. The cart quantity "default=1" does not apply when used with a text input box.

It may seem unnecessary to say this, but, you can only have one submit button per form.

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

Product Quantity Price Amount
Electric Model Airplane 22.99 22.99
Spare Motor 6.99 6.99
7.2 Volt Nicad Battery 12.99 12.99

All prices are in US Dollars Subtotal 42.97
Shipping 0.00

TOTAL 42.97
The form below is "live" meaning it will post to the cart in a new window. If you try it out, please set the quantities to 0 in the cart and click on recalculate before closing the window. I prefer not to have baskets floating around in cyberspace using up Mals resources.
Item # Description Price Quantity
1 Electric Model Airplane $22.99
2 Spare Motor $6.99
3 Spare Propeller $2.99
4 7.2 Volt Nicad Battery $12.99
5 Quik Field Charger $15.49


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

and and paste as many additional products in the form as you wish (in html view). Then don't forget to go back and number the qty, products and price sequentially (don't forget, 30 max) and of course change the values to reflect your product. After I paste in html view, I go back to page view and change the description and price to match my products, then switch to html view to finish the hidden fields and values and double check for code errors such as spaces where there shouldn't be spaces, & q u o t ; instead of ", & l t ; instead of <, & g t ; instead of >, and (important) an </form> tag.
With Front Page, you should be able to copy the complete form above and then paste it in page view. Usually it does ok, but always check the html 'cause sometimes FP thinks it knows what you want to do better than you. If you're bald; you're in trouble. You don't have anything to pull out! The reverse isn't always true though. I recommend if you delete anything from the form in page view make sure you check the html to be sure the hidden fields were deleted also. Sometimes they ain't, and they have a tendency to pile up at the top or bottom of the page in html view. Two years later you're going to wonder what all that extra code is and where did it come from. If some of the product numbers happen to be the same as the product you're adding, and those numbers happen to be in stray hidden fields at the bottom of the page....Guess what! That's the info that's going to go to the cart 'cause the browser reads the html from the top to bottom and picks up the last incidence of the number.
If you copy & paste the code below, you should wind up with the same layout as the above table. That is, after you do a search & replace for the little thingies I mention at the bottom of this paragraph. To add additional products just copy everything (from html view) between (and including)
<table bgcolor="#FFFFFF" cellpadding="8">
<tr>
<th width=
"39" height="23">"Arial, Arial, Helvetica">"#0000ff">Item
#
</th>
<th width=
"194" height="23">"#0000ff">Description</th>
<th width=
"89" height="23">"#0000ff">Price</th>
<th width=
"50" height="23">"#0000ff">Quantity</th>
</tr>
<form action=
"http://www.aitsafe.com/cf/addmulti.cfm" method="post">
<input type=
"hidden" value="www.yoursite.com/yourpage.htm" name="return">
<input type=
"hidden" value="1234567" name="userid">
<tr>
<td width=
"39" height="24">1</td>
<td width=
"194" height="24">Electric Model Airplane</td>
<td align=
"right" width="89" height="24">"#000080">$22.99</td>
<td align=
"right" width="50" height="24"><input size="4" name="qty1"></td>
<input type=
"hidden" value="Electric Model Airplane" name="product1">
<input type=
"hidden" value="22.99" name="price1">
</tr>
<tr>
<td width=
"39" height="24">2</td>
<td width=
"194" height="24">Spare Motor</td>
<td align=
"right" width="89" height="24">"#000080">$6.99</td>
<td align=
"right" width="50" height="24"><input size="4" name="qty2"></td>
<input type=
"hidden" value="Spare Motor" name="product2">
<input type=
"hidden" value="6.99" name="price2">
</tr>
<tr>
<td width=
"39" height="25">3</td>
<td width=
"194" height="25">Spare Propeller</td>
<td align=
"right" width="89" height="25">"#000080">$2.99</td>
<td align=
"right" width="50" height="25"><input size="4" name="qty3"></td>
<input type=
"hidden" value="Spare Propeller" name="product3">
<input type=
"hidden" value="2.99" name="price3">
</tr>
<tr>
<td width=
"39" height="24">4</td>
<td width=
"194" height="24">7.2 Volt Nicad Battery</td>
<td align=
"right" width="89" height="24">"#000080">$12.99</td>
<td align=
"right" width="50" height="24"><input size="4" name="qty4"></td>
<input type=
"hidden" value="7.2 Volt Nicad Battery" name="product4">
<input type=
"hidden" value="12.99" name="price4">
</tr>
<tr>
<td width=
"39" height="24">5</td>
<td width=
"194" height="24">Quik Field Charger</td>
<td align=
"right" width="89" height="24">"#000080">$15.49</td>
<td align=
"right" width="50" height="24"><input size="4" name="qty5"></td>
<input type=
"hidden" value="Quik Field Charger" name="product5">
<input type=
"hidden" value="15.49" name="price5">
</tr>
<tr>
<td width=
"472" colSpan="4" height="24">
<p align=
"center"><input type="submit" value="Add to Basket">

</FORM>

</td></tr>
</td> </tr> </tbody></table>

Back (368 bytes)