Whole Number Quantities (v. 2.72 - 2.8e)

By default, the SiteBuilder system allows you to use fraction quantities. If you want to disable the ability to order fractions, open the orders.php file in the /go/ folder, and change the code:

$gotolink .= "&qty=$qtty";

to:

$gotolink .= "&qty=" .(int)$qtty;

This removes everything after the decimal point, so if a customer enters 1.8 as the quantity, it would be added to the cart as 1.

We also recommend setting Inventory Check in the Catalog Variables area of the storeadmin to "Yes". If it's set to "No", a customer could change the quantities in the Mals cart to a decimal amount.