Add a select for mobile

This commit is contained in:
Michael RICOIS 2018-01-10 17:55:44 +01:00
parent 6006429bea
commit 8b2476e6a7

View File

@ -456,7 +456,19 @@
<!-- quantity wanted --> <!-- 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}> <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 :' mod='expresscart'}</label> <label>{l s='Quantity :' mod='expresscart'}</label>
<input type="text" 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} /> <select name="qty" id="quantity_wanted" class="text" {if $product->minimal_quantity > 1}onchange="checkMinimalQuantity({$product->minimal_quantity});"{/if}>
{assign var="qtySelected" value="1"}
{if isset($quantityBackup)}
{assign var="qtySelected" value=$quantityBackup|intval}
{else}
{if $product->minimal_quantity > 1}
{assign var="qtySelected" value=$product->minimal_quantity}
{/if}
{/if}
{for $qty=1 to 12}
<option value="{$qty}"{if $qtySelected == $qty} selected{/if}>{$qty}</option>
{/for}
</select>
</p> </p>
<!-- minimal quantity wanted --> <!-- minimal quantity wanted -->