Jump to content

Show product availability when products use combinations


DARKF3D3

Recommended Posts

Actually on product pages of my website i show availability using this code:

{if $PS_STOCK_MANAGEMENT}
<!-- availability -->
<p id="availability_statut">
{*<span id="availability_label">{l s='Availability:'}</span>*}
<span class="{if $product->quantity <= 0}icon-remove{else}icon-ok{/if}"></span><span id="availability_value"{if $product->quantity <= 0} class="warning_inline"{/if}>{if $product->quantity <= 0}{if $allow_oosp}{$product->available_later}{else}{l s='Out of stock'}{/if}{else}{l s='Available'}{/if}</span> 
</p>
{/if}

In this way i show "available" when quantity > 0 and "out of stock" when quantity < 0.

But when products use combinations like colors or other attributes the availability is not showed.

 

How can I show availability with combinations?

 

Link to comment
Share on other sites

×
×
  • Create New...