hideaki Posted September 14, 2013 Share Posted September 14, 2013 (edited) Hi guys! I'm able to get a dropdown list for quantity based on how many quantity are available for the product. The code is as follows: <!-- quantity wanted --> <p id="quantity_wanted_p"{if (!$allow_oosp && $product->quantity <= 0) OR $virtual OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display: none;"{/if}> {if $product->quantity <= 0} <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=99} <option value="{$smarty.section.foo.iteration}">{$smarty.section.foo.iteration}</option> <br /> {/section} </select> <p> </p> {else} <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} <option value="{$smarty.section.foo.iteration}">{$smarty.section.foo.iteration}</option> <br /> {/section} </select> {/if} </p> However I'm experiencing a problem with combinations, as the dropdown list will show the total number of quantity (added from all attributes). I'm using radio buttons for my combination selection if that helps. Is there anything I can do when the user selects the attribute, the particular quantity for that combination gets updated into the dropdown list? Thanks in advance! Edited September 14, 2013 by hideaki (see edit history) 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