Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore Tweaks › How to Remove the Quanity Field › Reply To: How to Remove the Quanity Field
October 13, 2009 at 9:25 am
#15759
Participant
The above will remove the “Quantity” header from the table so customer won’t see it but they can still click the “Add to Cart” button twice the quantity will go up. So to take care of that open the “wp_eStore1.php” file and look for the following block of code:
if ($item['name'] == stripslashes($_POST['product']))
{
$req_qty = $item['quantity']+1;
$update_quantity = is_quantity_availabe($item['item_number'],$req_qty);
$count += $item['quantity'];
if ($update_quantity)
{
$item['quantity']++;
unset($products[$key]);
array_push($products, $item);
}
}
Once you find it, change it to the following to finalize the quantity removal:
if ($item['name'] == stripslashes($_POST['product']))
{
$count =2;
}
Thanks to Ian Clarke for modifying the code to match with the current version of eStore.