I guys!
i was wondering if i could set a limit to product-quantity selection on the product-add-to-cart.tpl page.
<div class="product-quantity"> <div class="qty"> <span class="control-label">{l s='Quantity:' d='Shop.Theme.Catalog'}</span> <input type="text" name="qty" id="quantity_wanted" value="{$product.quantity_wanted}" class="input-group" min="{$product.minimal_quantity}" /> </div> <div class="add"> {if $product.add_to_cart_url} <button onclick="return validateSelection();" class="btn btn-primary add-to-cart" data-button-action="add-to-cart" type="submit"> <i class="fa fa-shopping-basket">{l s=' BUY NOW!' d='Shop.Theme.Catalog'}</i> </button> {/if} {if !$product.add_to_cart_url} <button class="btn btn-primary add-to-cart" data-button-action="add-to-cart" type="submit" disabled=""> <i class="fa fa-shopping-basket"> {l s=' SOLD OUT' d='Shop.Theme.Catalog'}</i> </button> {/if} {hook h='displayProductListFunctionalButtons' product=$product} {hook h='displayCompareButton' product=$product} </div> </div>
This is the parte of the code i think i've to change.
What i'm trying to achieve is this:
i dont want to be able to add 800 item when there's only like 10 available. I would like i could only choose as max the number of items that are available.
I'm on prestashop 1.7.6
If anyone could help me it would be nice
.png.022b5452a8f28f552bc9430097a16da2.png)