HELP SECTION - ADVANCED BUY BUTTON BUILDING IN HTML

Overview
 

The Buy button builder is a tool designed to create your products Buy buttons also known as the add to cart button.  CartScience offers several ADVANCED options that are NOT available to the buy button builder tool and will be covered here.  These options require some knowledge of HTML.

Multi Item Discount Tables

Pull Down Menu Pricing

Buy Button Basic Framework

Adding a Quantity Entry Box

How to set a Minimum Quantity required

Multi Item Discount Tables
 

Multi Item Discount tables  - Allows the cart to handle items that have up to 5 different price breakdowns based on the quantity the customer enters into their cart.

Below is an example how the discount table is created.  The string of numbers in the value tag contains all the discount data.  The 1st number in each of the highlighted sections below is the STARTING number while the 2nd number is the ending number for that particular qty discount.  The 3rd number is the actual price of the item if the customer where to purchase a quantity between the 1st and 2nd number's in each section.  You can have up to 5 (five) price breakdowns per button.

If 23 quantity of the below item was added to the users cart, they would pay $1.33 each.  If they where to enter 5500 quantity of the same item into their cart, they would pay $1.00 each. 

 

When we break down the string of numbers in the value tag this is what the cart assumes.

Between 1 and 299 qty will cost $1.33 each
Between 300 and 2499 qty will cost $1.20 each
Between 2500 and 4999 qty will cost $1.09 each
Between 5000 and 10000 qty will cost $1.00 each

 

BREAKDOWN OF HTML MULTI ITEM DISCOUNT STRING.

PLEASE NOTE:  It is important to enter your prices with decimals! $1 would be entered at 1.00.  Please use a comma (,) after each number.  The shopping cart uses the comma as a way to look for the next number so it is important to include them as shown in the highlighted example.

 

Here is the actual HTML snippet if you need to cut and past it into your page.  Make sure to reconfigure all the quantity / prices to your item!

<input type="hidden" value="1,299,1.33,300,2499,1.20,2500,4999,1.09,5000,10000,1.00" name="disc_table">

Pull Down Menu Pricing

Pull down Menu Pricing - Allows each item listed in a pull down menu to have it's own price.  A good example of when to use this feature is if you have an item in multiple colors and each color has it's own price. 

Below is a section of a working example.

<input type="hidden" name="price" value="24.95"> <!-- BASE PRICE -->

<select NAME="cart_res1">
<option selected value="No Color Selected">SELECT COLOR
<option value="Blue">Blue
<option value="Red##0.15">Red Add $0.15
<option value="Gold##0.25">Gold Add $0.25
<option value="Silver##0.20">Silver Add $0.20
</select>

To change the price of an item in the pull down you need to use the ##PRICE tag as shown in the above example.   First you need to set the PRICE value to a base value that you can add to with the ## tag to raise the value of the item(s) in your pull down.    The ## tag signals to the shopping cart that the item will have an additional cost added to it's base price which is set in the PRICE tag.  Notice that the BASE price is set to $24.95 in the above price tag.  The highlighted example below will add $0.25 to that price making this items price $25.20 each.   If you do not want to add anything to the items price leave out the ## tag as shown in the above example for Blue.

You can have up to 4 Pull downs per buy button each loaded with different options.  Each pull down's Select name must be named "cart_res1" - "cart_res4".  Because we only used 1 pull down in the above example we names it cart_res1. 

 

BREAKDOWN OF HTML STRING.

PLEASE NOTE:  It is important to enter your prices with decimals! $1 would be entered at 1.00. 

 

Buy Button Basic Framework (This can also be found right from the main help menu for quick reference each time you build a button in HTML)
 

The Above examples show how to add additional functionality to your shopping carts buy buttons.  Please remember that each button requires a BASIC framework.  The HTML below is the BASIC framework to ANY button.  Use this framework as a reference when adding buttons by hand in your HTML.  Change USERNAME in the first line to your carts ID name provided during your account setup.  Then change the price and desc value tags to your items parameters and you are set.

 

<form action="http://www.cartscience.com/cgi-bin/USERNAME/cart_login.cgi" method="post">
<input type="hidden" name="price" value="5.00">
<input type="hidden" name="desc" value="ITEM NAME GOES HERE">
<!-- ADDITIONAL CART FUNCTIONS GO HERE -->
<input type="submit" name="submit" value="BUY">
</form><!-- Cart powered by CartScience.com -->

 

Adding a Quantity Entry Box
 

In some cases you might need to have a quantity entry box next to your buy button.  Place this piece of code under the

<!-- ADDITIONAL CART FUNCTIONS GO HERE --> line.

 

<font face="arial" size="2">QTY</font>
<input type="text" maxLength="4" size="4" name="qty_passed">

 

PLEASE NOTE:  If no Quantity entry box is provided next to your buy button and if pressed only 1 quantity will be added to your customers cart, which is why quantity entries are not necessarily needed on all buttons.

Setting a Minimum quantity for an item.

In some cases you might need to require a minimum quantity of an item.  This will prevent a customer from buying less then the minimum that you set for that item.  Place this piece of code under the  <!-- ADDITIONAL CART FUNCTIONS GO HERE --> line in the buy button basic framework.

 

<input type="hidden" name="qty_required" value="25" >

 

Please note that you MUST have a QTY box available next to any buy button with a set quantity required. See above section "Adding a Quantity Entry Box".  You can also preset the value of the qty box from above by adding a value tag. Here is an example that will create a QTY box with a default value of 5 suggesting to your customer that a quantity of 5 will be needed to purchase this item.  Simply change the 5 to any other number to set a suggested QTY amount.

 

<font face="arial" size="2">QTY</font>
<input type="text" maxLength="4" size="4" name="qty_passed" value="5" >
 

(C)2004, 2005 Cart Science Inc.