>> THIS IS A VM 1.1.X POST... sorry <<
>> The initial poster is using 1.1.2, I see, and I posted this before I realized which forum I was in. <<
For the Product Details page I changed
/components/com_virtuemart/themes/default/templates/product_details/includes/quantity_box_general.tpl.php around lines 9 and 45 respectively from this (which displays the <label>):
(lines 7-10)
$html = '';
if(!$child && $display_type != 'hide') {
$html = '<label for="quantity'.$prod_id.'" class="quantity_box">'.$VM_LANG->_('PHPSHOP_CART_QUANTITY').': </label>';
}
and line 45 which displays the Quantity Box:
case "none" :
default:
$html .= '<input type="text" class="inputboxquantity" size="4" id="quantity'.$prod_id.'" name="quantity[]" value="'.$quantity.'" />
<input type="button" class="quantity_box_button quantity_box_button_up" onclick="var qty_el = document.getElementById(\'quantity'.$prod_id.'\'); var qty = qty_el.value; if( !isNaN( qty )) qty_el.value++;return false;" />
<input type="button" class="quantity_box_button quantity_box_button_down" onclick="var qty_el = document.getElementById(\'quantity'.$prod_id.'\'); var qty = qty_el.value; if( !isNaN( qty ) && qty > 0 ) qty_el.value--;return false;" />
';
break;
}
Updated lines 7-10 to the following in order to remove the "Quanity" Label:
$html = '';
if(!$child && $display_type != 'hide') {
$html = '';
}
and line 45 again to Hide the Quantity Box:
case "none" :
default:
$html .= '<input type="hidden" id="quantity'.$prod_id.'" name="quantity[]" value="1" />';
break;
}
And this accomplishes a fix for the front-end, where I don't want customers to have the option of additional quantities, but this
does not solve my problem in that from the Admin side, when entering New Products, the Display Options are defaulted to show the Quantity Box.
I would like all New Products to have their Display Options default to "Hide Quantity Box" so that the above workaround isn't necessary. Does anyone know where the file is that would allow us to change the default of all new products to Hide the Quantity Box?