Jump to content

PS 1.6 product availability


SVKpneux

Recommended Posts

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

  • 2 months later...

 

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...