Hello just wondering how to remove the quantity box entirely from product pages in Virtuemart 2.9.9.4 as im selling a digital product.
Thanks
with a template over ride - just comment out the quanity box section and add a hidden field with the quanity = 1
Or you can just add the following css code to your template
.productdetails .quantity-box, .productdetails .quantity-controls {
display: none !important;
}
Thanks, just added to css file and worked!
greeting
i have a big problem with quantity box in virtuemart 2.6.14.
how do i remove a quantity box with each product that can not appear on the frontend website
thanks in advance.
as Spyros said->
QuoteOr you can just add the following css code to your template
Code: [Select]
.productdetails .quantity-box, .productdetails .quantity-controls {
display: none !important;
}
in which css file to put this code have 20 css files ??
in which css file to put this code have 20 css files ??
1. do some googling as to how css works
2. in any css file that is loaded on the views you want to effect
It could be added to the last css file loaded or a custom css file created specially, but my preference for VM specific styles is to include any changes in an override. http://docs.virtuemart.net/tutorials/templating-layouts/106-override-vmsite-ltr-css.html
Quote from: GJC Web Design on November 17, 2014, 12:59:29 PM
with a template over ride - just comment out the quanity box section and add a hidden field with the quanity = 1
I know this is a really old thread, but I'm looking to do the same. Here is what to do:
Create these folders:
/your_domain/templates/your_template/html/com_virtuemart/sublayouts/
Copy addtocartbar.php from /components/com_virtuemart/sublayouts/ to the new folder you created.
Approx line 97, comment out (<!--):
<input type="<?php echo $editable ?>" class="quantity-input js-recalculate" name="quantity[]"
data-errStr="<?php echo vmText::_ ('COM_VIRTUEMART_WRONG_AMOUNT_ADDED')?>"
value="<?php echo $init; ?>" init="<?php echo $init; ?>" step="<?php echo $step; ?>" <?php echo $maxOrder; ?> />
Insert this:
<input type="hidden" class="quantity-input js-recalculate" name="quantity[]"
data-errStr="<?php echo vmText::_ ('COM_VIRTUEMART_WRONG_AMOUNT_ADDED')?>"
value="<?php echo $init; ?>" init="<?php echo $init; ?>" step="<?php echo $step; ?>" <?php echo $maxOrder; ?> />
Comment out the +/- (couple lines down):
<?php if ($product->orderable) { ?>
<span class="quantity-controls js-recalculate">
<input type="button" class="quantity-controls quantity-plus"/>
<input type="button" class="quantity-controls quantity-minus"/>
</span>