Customer can order item twice, despite inventory limits
The Mals-e shopping cart system does not check quantities between item additions - it uses whatever a customer posts to the site. So there isn't a true way to stop someone from trying to cheat the system and order more than is available.
Pappashop.com does have a built in inventory checker that stops them from adding more than the quantity in stock to the cart when they first order the item. But the customer can later add the item to the cart again, and there isn't an easy way to stop that.
What you can do, provided you do not need the scode variable in Mals, is to force the cart to charge $999 if the customer tries to order more than is available, by using Mals' discountpr variable instead of the price variable. Please note that this can cause issues with some items, especially if you are using LinkLok or you need the scode variable. If you decide to make this modification, please check each item thoroughly before keeping the changes!
1. Open the order.php page in the main directory.
2. Change the lines:
$gotolink .= "&price=$price"; $gotolink .= "&units=$units"; if ($scode) $gotolink .= "&scode=$scode";
towards the bottom of the page to:
$gotolink .= "&units=$units"; if ($invcheck != "No" AND isset($chkrow[0]) AND $chkrow[0] > 0) $gotolink .= "&discountpr=$chkrow[0],$price:0,999"; else $gotolink .= "&discountpr=0,$price";
You can change the 999 in the modified code to some other value if you want - whatever you put there will be shown if the customer tries to order more than is available.
This isn't a perfect solution, but it should at least stop someone from trying to go the round about way and order the item more than one time.