Jump to content

Can this be done


Recommended Posts

Hi I am wondering if its possible to make the quantity input type on a product page become a select, I think this would be better since customers would not be forced to type in that number, i know its possible and would really appreciate if anyone can help with the code?

Link to comment
Share on other sites

Hi,

well, if you use an HTML5 template, you can always set it to input type=number

If not, you can find it at line 324 of the default template (product.tpl). Just change it to a select, but maintain the name! i suggest you use a loop, but you can as well write down the numbers one by one :)

Link to comment
Share on other sites

Hi,

well, if you use an HTML5 template, you can always set it to input type=number

If not, you can find it at line 324 of the default template (product.tpl). Just change it to a select, but maintain the name! i suggest you use a loop, but you can as well write down the numbers one by one :)

 

Thanks Nemo for the reply, do you mean to change this here

 

 

<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}>

 

<label>{l s='Quantity:'}</label>

 

<input type="select" name="qty" id="quantity_wanted" class="text" value="{if isset($quantityBackup)}{$quantityBackup|intval}{else}{if $product->minimal_quantity > 1}{$product->minimal_quantity}{else}1{/if}{/if}" size="2" maxlength="3" {if $product->minimal_quantity > 1}onkeyup="checkMinimalQuantity({$product->minimal_quantity});"{/if} />

 

</p>

 

 

if yes, this won't work for me, i tried many times, what do you think the issue can be?

Link to comment
Share on other sites

×
×
  • Create New...