Jump to content

Prestashop 9.0.2 how to add product availability on tpl


pcsk

Recommended Posts

Please can you help me how to make product availability in PrestaShop 9.0.2?

There is working only $product.availability_message
but I need to show different availability to logged in customer and not logged in customers


I had before version 1.7.7.8 where was $product.available_now working (when you have them empty at products, it takes data from PrastaShop configuration)

{block name='product_availability'}
  <div class="availability">
    <span id="product-availability">
      {if !$customer.is_logged}
      	<i class="material-icons product-available">&#xE5CA;</i>{$product.available_now}
      {else}
        {if $product.quantity > 0}
          <i class="material-icons product-available">&#xE5CA;</i>{$product.available_now}
        {else}
          <i class="material-icons product-last-items">&#xE002;</i>{$product.available_later}
        {/if}
      {/if}
    </span>
  </div>
{/block}

 

Edited by pcsk (see edit history)
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...