Arj1 Posted February 1, 2011 Share Posted February 1, 2011 Hello!On the product page (product.tpl) where the customer pick the quantity wanted of the item, they have to type the quantity in a textbox, how do I change that textbox to a dropdown menu?Ive searched the forum but i didnt find any answers. Thanks Link to comment Share on other sites More sharing options...
ogdcorp Posted March 3, 2011 Share Posted March 3, 2011 Hello,Did you find the solution for this?I really need to be able to have quantity as drop down.Please help.Thanks Link to comment Share on other sites More sharing options...
Arj1 Posted March 3, 2011 Author Share Posted March 3, 2011 HelloNo, i have not find any solution for this :/ Link to comment Share on other sites More sharing options...
Arafat Jahan Posted July 15, 2011 Share Posted July 15, 2011 <!-- quantity wanted --> quantity <= 0) OR $virtual OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display: none;"{/if}>{$product->minimal_quantity} == {$combination.minimal_quantity} == {$product->minimal_quantity} {if $product->minimal_quantity > 1}{$product->minimal_quantity}{$product->minimal_quantity*2}{$product->minimal_quantity*3}{$product->minimal_quantity*4}{$product->minimal_quantity*5} {else}{if $product->minimal_quantity <= 1}12345678910 {/if}{/if} Link to comment Share on other sites More sharing options...
Arafat Jahan Posted July 15, 2011 Share Posted July 15, 2011 Try the following, this is with minimum qty for 1.4vr, and there are two option, change your select option as you need , here are 1-10 for all product, and upto 5 times for minimum qty product that are min more than 1 <!-- quantity wanted --> quantity <= 0) OR $virtual OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display: none;"{/if}> {if $product->minimal_quantity > 1} {$product->minimal_quantity} {$product->minimal_quantity*2} {$product->minimal_quantity*3} {$product->minimal_quantity*4} {$product->minimal_quantity*5} {else}{if $product->minimal_quantity <= 1} 1 2 3 4 5 6 7 8 9 10 {/if}{/if} Link to comment Share on other sites More sharing options...
chetwyn Posted January 9, 2012 Share Posted January 9, 2012 this will load the product quantity into the dropdown combo box <label>{l s='Quantity:'}</label> <select type="text" title="{l s='Quantity'}" name="qty" id="quantity_wanted" class="text" style="width:auto;"> {section name=foo loop=$product->quantity} {l s=' <option value="'}{$smarty.section.foo.iteration}{l s='">'}{$smarty.section.foo.iteration}{l s='</option>'} <br /> {/section} </select> Link to comment Share on other sites More sharing options...
chetwyn Posted January 9, 2012 Share Posted January 9, 2012 Correction. <label>{l s='Quantity:'}</label> <select type="text" title="{l s='Quantity'}" name="qty" id="quantity_wanted" class="text" style="width:auto;"> <option value="1">2</option> {section name=foo loop=$product->quantity} <option value="{$smarty.section.foo.iteration}">{$smarty.section.foo.iteration}</option> <br /> {/section} </select> 3 Link to comment Share on other sites More sharing options...
andrexng Posted July 4, 2012 Share Posted July 4, 2012 Hi Chetwyn, I just wanted to say a BIG thank you for your help. It helped cut down production time. Really appreciate your sharing with us! Cheers, Andre Link to comment Share on other sites More sharing options...
amnesiak Posted August 22, 2012 Share Posted August 22, 2012 Hello, Thanks for the code. Would it be possible to get this work also on products whith attributes and groups, as there are usually different stocks for different groups? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now