A simple form:Back to top.
Make sure to change the ACTION attribute in the FORM tag of this form to match the full URL to where your cart.pl script is located. It needs to match Host Variable #1 in your vars.dat file exactly.
This HTML form...
<FORM METHOD=POST ACTION="http://www.dansie.net/cgi-bin/scripts/cart.pl"> <B> Black Leather purse with leather straps<BR> Price: $20.00<BR> </B> <INPUT TYPE=HIDDEN NAME=name VALUE="Black Leather Purse"> <INPUT TYPE=HIDDEN NAME=price VALUE="20.00"> <INPUT TYPE=HIDDEN NAME=sh VALUE="1"> <INPUT TYPE=HIDDEN NAME=img VALUE="purse.jpg"> <INPUT TYPE=HIDDEN NAME=return VALUE="http://www.dansie.net/demo.html"> <INPUT TYPE=HIDDEN NAME=custom1 VALUE="Black Leather purse with leather straps"> <INPUT TYPE=SUBMIT NAME="add" VALUE="Put in Shopping Cart"> </FORM>
Makes this...
<FORM METHOD=POST ACTION="http://www.dansie.net/cgi-bin/scripts/cart.pl"> <B> Mens Tie<BR> Price: $40.00<BR> </B> <INPUT TYPE=HIDDEN NAME=name VALUE="Mens Tie"> <INPUT TYPE=HIDDEN NAME=price VALUE="40.00"> <INPUT TYPE=HIDDEN NAME=sh VALUE="1"> <INPUT TYPE=HIDDEN NAME=img VALUE="mens_tie.jpg"> <INPUT TYPE=HIDDEN NAME=return VALUE="http://www.dansie.net/demo.html"> Size: <SELECT NAME=custom1 SIZE=1> <OPTION>Small $40.00 <OPTION>Large $50.00 </SELECT><BR> Color: <SELECT NAME=custom2 SIZE=1> <OPTION>Grey <OPTION>Blue <OPTION>Purple <OPTION>Polka Dot </SELECT><BR> With tie clip? <SELECT NAME=custom3 SIZE=1> <OPTION>No clip <OPTION>Clip +$10.00 </SELECT><BR> Quantity: <INPUT TYPE=TEXT NAME=quantity VALUE="1" SIZE=2 MAXLENGTH=2><BR> <INPUT TYPE=SUBMIT NAME="add" VALUE="Order"> </FORM> |
Volume Discount Pricing method.ReadMe.
You may utilized the Dansie Shopping Cart's volume discount pricing capabilities. Just set the value of this tag like so:
<INPUT TYPE=HIDDEN NAME=price VALUE="3.00:1:2.50:10:2.00:20">
Explanation:
$3.00 for 1 or more.
$2.50 for 10 or more.
$2.00 for 20 or more.
Etc... Use the colon ":" for the delimiter.
The Dansie Shopping Cart has two other discount features: Webstore Discount and Coupon Discount. See Personal Variables #52 and #59 in the
<INPUT TYPE=CHECKBOX NAME="custom1" VALUE="With tie clip? +$10.00"> <INPUT TYPE=RADIO NAME="custom2" VALUE="No tie clip"> <INPUT TYPE=RADIO NAME="custom2" VALUE="With tie clip +$10.00"> What initials would you like embroidered into your tie? <INPUT TYPE=TEXT NAME="custom3" SIZE=20 MAXLENGTH=20> What initials would you like embroidered into your tie? <TEXTAREA NAME="custom4" COLS=30 ROWS=3></TEXTAREA> You may use standard submit buttons or images like so: Standard submit button: <INPUT TYPE=SUBMIT NAME="add" VALUE="Put in Shopping Cart"> Custom image submit button: <INPUT TYPE=HIDDEN NAME="add" VALUE="1"> <INPUT TYPE=IMAGE SRC="http://www.YourSite.com/add.gif" NAME="Order"> |
Want to send multiple items to the shopping cart at one time with the use of checkboxes? Make sure you set the "name" tag to "multi-items". For each item, use "multi-item1", "multi-item2", etc. The value of each multi-item is four or more fields separated by the "|" delimiter. The key to the fields are as follows:comprehensive capabilities with them. In other words, you can't put a bunch of pull-down menus next to each product. The way that "multi-items" forms work best is with a huge list of products with check boxes down the page that don't need any extra custom descriptions.name|price|shipping|image|custom1|custom2|custom3|etc.You may use a quantity text box with each multi-item. Just give it a corresponding number such as "quantity1", "quantity2", etc. If you omit the quantity text box, a default value of one will be given. Be sure to set Personal Variable #1 to the number of the largest number of multiple items you have in a form. For example, if you have a form that has 50 multiple items in it, set Personal Variable #1 to 50. The cart script wont look for any items higher than that array.
"multi-items" HTML form limitations:
If you use "multi-items" forms, then you can't use any
<FORM METHOD=POST ACTION="http://www.dansie.net/cgi-bin/scripts/cart.pl"> Item: Quantity:<BR> <INPUT TYPE=HIDDEN NAME="name" VALUE="multi-items"> <INPUT TYPE=HIDDEN NAME="return" VALUE="http://www.dansie.net/demo.html"> <INPUT TYPE=CHECKBOX NAME="multi-item1" VALUE="Banana Split|3.95|1|split.jpg|A delicious ice cream treat."> Banana Split<INPUT TYPE=TEXT NAME="quantity1" VALUE="1" SIZE=2 MAXLENGTH=2><BR> <INPUT TYPE=CHECKBOX NAME="multi-item2" VALUE="Pineapple|2|1|pineapple.jpg|A juicy pineapple."> Pineapple<INPUT TYPE=TEXT NAME="quantity2" VALUE="1" SIZE=2 MAXLENGTH=2><BR> <INPUT TYPE=CHECKBOX NAME="multi-item3" VALUE="Watermelon|3|1|watermelon.jpg|A ripe watermelon."> Watermelon<INPUT TYPE=TEXT NAME="quantity3" VALUE="1" SIZE=2 MAXLENGTH=2><BR> <INPUT TYPE=SUBMIT NAME="add" VALUE="Put these in my cart!"> </FORM> |
|
|
This is the HTML you use to display an image link that allows customers to "look" into their cart, or finish their purchase. Make sure you set the FORM ACTION to the correct URL. Also, set the proper URL to the cart.gif. It is recommended to have this image link on every page of your website. If your website uses frames, it is recommended to have it in your toolbar frame and use TARGET.
Example #1 (a link) <A HREF="http://www.yourname.net/cgi-bin/cart.pl"> <IMG SRC="cart.gif" BORDER=0 ALT="View Your Shopping Cart"></A> Example #2 (a form) <FORM METHOD=POST ACTION="http://www.yourname.net/cgi-bin/cart.pl"> <INPUT TYPE=HIDDEN NAME=return VALUE="http://www.YourName.com/SuperWuper.html"> <INPUT TYPE=HIDDEN NAME=purpose VALUE="look"> <INPUT TYPE=IMAGE SRC="cart.gif" NAME="View Cart/Checkout" BORDER=0> </FORM> |
Mall Version Notes
If you are using the Dansie Shopping Cart Mall Version, when using Example #1 above, you will need to link to the cart like so:
http://www.yourname.net/cgi-bin/cart.pl?look|MerchantNameHere
First put "?", then "look", then "|", then the merchant's name.
With the Dansie Shopping Cart Mall Version, when using Example #2 above, just be sure to include this tag like you do in your HTML product forms:
<INPUT TYPE=HIDDEN NAME=merchant VALUE="MerchantNameHere">
Dansie Shopping Cart version 3.0 has been upraded with new powerful search features. Make sure you add Database Variable #25 and #26 to your vars.dat file to take advantage of these new powerful features. Also, make sure you have lang.dat #91 through 96 and 149 and 150 from the 3.0lang.dat file. If you wish to use the 3.0 search engine, then set Database Variable #25 in your vars.dat file to "3.0". If you want to remain with the old 2.0 search format, then just leave DBV#25 blank or set it to "2.0".
|
|
Custom measurements, or quantity of additional tag-along items. This can be used to ask, "How many square yards of carpet will you need?" This could also be used to ask, "How may additional red roses do you want delivered with the basket?" You only need to change variables s,e and c. Make sure "custom1" is the correct name. I wouldn't tamper with the rest unless you know a little about JavaScript. Note: Dansie Shopping Cart is compatible with JavaScript 1.2, 1.0 and it will even work if a web browser has it's JavaScript turned off. However, using JavaScript in your forms wont work if a customer has his JavaScript turned off in their browser.
This JavaScript example:
<FORM> Length:<BR> <SELECT NAME="custom1" SIZE=2> <SCRIPT LANGUAGE="JavaScript"> var i = 0 // Initialize var s = 10 // Length Start value var e = 20 // Length End value var inc = 1 // Increment each time var c = 1 // Cost in units of money per extra unit of length (1 = $1.00 etc.) for (var i = s; i<= e; i+=inc) { document.write ("<OPTION VALUE=\"+$"+(i-s)*c+"\">"+i+"\n") } </SCRIPT> </SELECT> <BR> </FORM>Makes this...
You may add items to your cart with <FORM> tags and submit buttons as you see insection 1 and 2 of Template.html or you may use the GET method too by passing the name/value pairs to the cart.pl script in a query string.