Jump to content

If condition


sanl

Recommended Posts

okey, where is my problem? My IF doesnt work.

 

<span id="availability_label">{l s='Availability:'}</span>        

 

So here is the main part. If I have product which has arrival date , customer should see that date in availability_value. Now I can see available now , available later text and after this new ID with arrival date.

{if !isset($product->available_date) } // If product has DATE when it comes SHOULD show date
<span id="availability_value">{dateFormat date=$product->available_date full=false} </span>
{else} // If dont have DATE should show as always default.
<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='This product is no longer in stock'}{/if}{else}{$product->available_now}{/if}</span>
{/if}


Where is my problem?

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...