SVKpneux Posted August 16, 2016 Share Posted August 16, 2016 Hello Can you help me pls? I want to show 10+, when quantity of product is more than 10. When is less, I want to show real quantity. I´m trying to change code in product.tpl <span id="quantityAvailable">{$product->quantity|intval}</span> <span {if $product->quantity > 1} style="display: none;"{/if} id="quantityAvailableTxt">{l s='Items'}</span> <span {if $product->quantity == 1} style="display: none;"{/if} id="quantityAvailableTxtMultiple">{l s='Item'}</span> but, no success. Thank you. Peter Link to comment Share on other sites More sharing options...
rocky Posted August 17, 2016 Share Posted August 17, 2016 Try: <span id="quantityAvailable">{if $product->quantity|intval > 10}10+{else}{$product->quantity|intval}{/if}</span> Link to comment Share on other sites More sharing options...
SVKpneux Posted August 17, 2016 Author Share Posted August 17, 2016 Try: <span id="quantityAvailable">{if $product->quantity|intval > 10}10+{else}{$product->quantity|intval}{/if}</span> It works. Thank you very much. Link to comment Share on other sites More sharing options...
SVKpneux Posted November 5, 2016 Author Share Posted November 5, 2016 Try: <span id="quantityAvailable">{if $product->quantity|intval > 10}10+{else}{$product->quantity|intval}{/if}</span> Hi Can you help me pls? This code works, but when product has combinations, it not work. Thank for your reply. 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