Knowledgebase
Allowing Fractional Item Quantities in the Cart
31 Oct 06 12:34 PM

If you sell 1.5 yards of material or two and a half cases of..well, whatever you might sell...our ShopCart product can now accomodate your customers' quantity preferences. 

To provide this capability, you need to add two additional form fields to your item HTML for those items where you want to allow fractional quantities.  These form fields are not available to be generated from our HTML Wizard; you must manually copy and paste them in somewhere in the item html. 

As an example, let's say indeed that you are selling material that is measured in yards.  The two new form fields to include in your item HTML are:

<INPUT TYPE="hidden" NAME="allow_decimal_qty" VALUE="1">
<INPUT TYPE="hidden" NAME="quantity_uom" VALUE="yard">

The first form field, "allow_decimal_quantity," tells our shipping engine to allow your customer to type in a fractional amount in the "Qty" text box in the cart.  The second form field, "quantity_uom," is the unit of measure you want to appear in the cart next to the selected quantity. 

Paypal does not accept partial quantity figures.  But we have a workaround that bypasses this restriction.  First, based on the fractional quantity your customer has entered, our shipping engine will calculate the correct price and shipping for the indicated whole or fractional quantity.  Then we will pass the item and figures over to Paypal.  When we do so, we reset the quantity figure for Paypal to "1"so they will accept it, and indicate the actual selected quantity and units (ie, 2.5 yards) in the item detail.  So if you use these additional form fields to allow fractional quanties, look for your customer's selected quantity in the item detail of the PayPal order.

(503 vote(s))
Helpful
Not helpful

Comments (0)