News:

Looking for documentation? Take a look on our wiki

Main Menu

Dropdown quantity box

Started by Bjorn_Venema, April 22, 2014, 12:53:49 PM

Previous topic - Next topic

Bjorn_Venema

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

apagano

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>

AH

#2
Hvae you tried using the product setting

Units in Box on the productstatus tab??

Then price accordingly for the box cost

Regards
A

Joomla 3.10.11
php 8.0

AH

Better still  On the same page in prodcut admin/status

Purchase Quantity Steps  - Set to 20

Regards
A

Joomla 3.10.11
php 8.0