VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: fabioweb on October 06, 2016, 19:33:38 PM

Title: Select quantity instead of input VM3
Post by: fabioweb on October 06, 2016, 19:33:38 PM
Hello,
is it possible to convert default input quantity into a select?

regards
Title: Re: Select quantity instead of input VM3
Post by: GJC Web Design on October 06, 2016, 20:20:47 PM
don't see why not.. esp. as the addtocart is now a sublayout
Title: Re: Select quantity instead of input VM3
Post by: fabioweb on October 18, 2016, 21:05:35 PM
Ok i did with this code :)

    <select class="quantity-input js-recalculate" name="quantity[]">
      <option value="0"> 0 </option>
      <option value="1"> opzione uno </option>
      <option value="2"> opzione due </option>
      <option value="3"> opzione tre </option>
      <option value="4"> opzione quattro </option>
      <option value="5"> opzione cinque </option>
    </select>


is it possibile to set select also in cart page?
Thank you

Title: Re: Select quantity instead of input VM3
Post by: GJC Web Design on October 19, 2016, 00:27:27 AM
Its just an input like any other..  replace with a select as you have done in the cart list template
Title: Re: Select quantity instead of input VM3
Post by: fabioweb on October 19, 2016, 00:38:11 AM
Okay but how to upload quantity when i select the number?
In cart page i need to click on the icon..
Title: Re: Select quantity instead of input VM3
Post by: GJC Web Design on October 19, 2016, 11:19:37 AM
either keep the icon or JS to trigger if the select changes