alejoghenao Posted October 20, 2016 Share Posted October 20, 2016 Good day, I want to set a limit for available quantity in product page. If there are more than 10 pieces show "+10" but if the quantity is 9,8,7… show the real quantity. I was modifying product.tpl but I don’t know how control the quantity of the product combination instead product global. I tried with: <!-- number of item in stock --> <p id="pQuantityAvailable"{if $product->quantity <= 0} style="display: none;"{/if}> {if $product->quantity < 10} <span id="quantityAvailable">{$product->quantity|intval}</span> {else} <span id="quantityAvailable">+10</span> {/if} <span {if $product->quantity > 1} style="display: none;"{/if} id="quantityAvailableTxt">{l s='Item'}</span> <span {if $product->quantity == 1} style="display: none;"{/if} id="quantityAvailableTxtMultiple">{l s='Items'}</span> </p> Any help? Thank you so much 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