Copyright
Support
TroubleShooting
Cart Files
Cart Structure
Configuration
Catalog Pages
Cart Page
Checkout Page
Insecure Order

Back
Home

Product Quantity
There may be instances where you want to customize the Quantity field. You can create Quantity fields with any of these form inputs:

  • Empty text field waiting for input
  • Text field with a default value
  • Drop down menu with values from 1 to N (N being the last number in the select menu)
The only requirement for Quantity fields is that you use numerical values greater than zero. If you use an empty text box, then the customer will be required to enter a numerical value. If they don't enter a value or it is not a number, they will get a pop up alert asking for a correct value.

Below are how each Quantity configuration would look:

Empty text field (notice field size control)
Quantity: <input type="text" name="NC_Shirt" size="3">
<a href="javascript:AddItem('NC_Shirt')">Add to Cart</a>
<input type="hidden" name="NC_Shirt_price" value="19.95">


Text field with a default value (notice field size control)
Quantity: <input type="text" name="NC_Shirt" size="3" value="1" >
<a href="javascript:AddItem('NC_Shirt')">Add to Cart</a>
<input type="hidden" name="NC_Shirt_price" value="19.95">


Hidden field with a default value
<a href="javascript:AddItem('NC_Shirt')">Add to Cart</a>
<input type="hidden" name="NC_Shirt" value="1">
<input type="hidden" name="NC_Shirt_price" value="19.95">


Drop dwn menu (offers the choice between 1 to 3 shirts)
Quantity:
<select name="NC_Shirt">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
<a href="javascript:AddItem('NC_Shirt')">Add to Cart</a>
<input type="hidden" name="NC_Shirt_price" value="19.95">

Summary:
Product Property Field Suffix Field Type Required Value(s) Code
Quantity none text yes none or number > 0 <input type="text" name="Product_ID">
or
<input type="text" name="Product_ID" value="N">
Quantity none hidden yes number > 0 <input type="hidden" name="Product_ID" value="N">
Quantity none select yes number > 0 <select name="Product_ID">
<option value="1">1</option>
...
<option value="N">N</option>
</select>
Operation Object Type Link/Method/Code
N/A N/A N/A

Basic HTML Setup
Quantity Configuration
Purchase Limit
Product Description
Product Options
Back
Main