VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product pricing => Topic started by: Bjorn_Venema on April 22, 2014, 12:53:49 PM

Title: Dropdown quantity box
Post by: Bjorn_Venema on April 22, 2014, 12:53:49 PM
Hello,

I have a virtuemart 2 shop and I want the quantity box became a dropdown quantity menu. Because I sell cards and want to sell them by 20. So the quantity box has to be

20
40
60
80 etc

I've searched the web Many times for this but couldn't find it yet. I hope someone has the solution

Thanks

B Venema


Kind regards

B Venema
Title: Re: Dropdown quantity box
Post by: apagano on May 20, 2014, 13:29:25 PM
Hello, in default_addtocart modify

<span class="quantity-box">
<input class="quantity-input js-recalculate" name="quantity[]" onblur="check(this);" />
   value="<?php /*if (isset($this->product->step_order_level) && (int)$this->product->step_order_level > 0) {
echo $this->product->step_order_level;
} else if(!empty($this->product->min_order_level)){
echo $this->product->min_order_level;
}else {
echo '1';
}*/ 
?>
"
</span>

with

<span class="quantity-box">
<select class="quantity-input js-recalculate" name="quantity[]" onblur="check(this);" />
   <!--value="<?php /*if (isset($this->product->step_order_level) && (int)$this->product->step_order_level > 0) {
echo $this->product->step_order_level;
} else if(!empty($this->product->min_order_level)){
echo $this->product->min_order_level;
}else {
echo '1';
}*/ 
?>
" -->


<option value="1" selected="selected">1</option>
<option value="50" >50</option>
<option value="100" >100</option>
<option value="250" >250</option>
<option value="500" >500</option>
<option value="999" >999</option>
</select>

</span>
Title: Re: Dropdown quantity box
Post by: AH on May 20, 2014, 15:36:13 PM
Hvae you tried using the product setting

Units in Box on the productstatus tab??

Then price accordingly for the box cost

Title: Re: Dropdown quantity box
Post by: AH on May 21, 2014, 13:30:45 PM
Better still  On the same page in prodcut admin/status

Purchase Quantity Steps  - Set to 20