cassim Posted February 6, 2017 Share Posted February 6, 2017 Can i limit the number of units in stock shown to the customer ??Lets say i have product 1 in stock, and i have like 1234 units in stock.How do i then just show "20+ in stock" instead of 1234 units in stock ? Link to comment Share on other sites More sharing options...
JeredBolton Posted February 7, 2017 Share Posted February 7, 2017 (edited) You could modify product.tpl in your theme's directory: {if ($display_qties == 1 && !$PS_CATALOG_MODE && $PS_STOCK_MANAGEMENT && $product->available_for_order)} <!-- number of item in stock --> <p id="pQuantityAvailable"{if $product->quantity <= 0} style="display: none;"{/if}> {if $product->quantity > 20} {l s='20+'} {else} <span id="quantityAvailable">{$product->quantity|intval}</span> <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> {/if} </p> {/if} Edited February 7, 2017 by JeredBolton (see edit history) 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