Jump to content

Edit History

pcsk

pcsk

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}

 

pcsk

pcsk

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}

 

×
×
  • Create New...