Jump to content

Display product availability in cart also if it can be ordered when out of stock


fra_000111

Recommended Posts

 

Hi all, im trying to show the availability for every product in cart.

Im using the same code as the product-list that appear when for example you enter in a category and see all products available (link attached, i cant attach images idk why) https://ibb.co/412xMSz

The code im using for both (product-list availability and cart availability) is the same:


    {block name='product_availability'}
      <span id="product-availability">
        {if $product.show_availability && $product.availability_message}
          {if $product.availability == 'available'}
            <i class="material-icons product-available">&#xE5CA;</i>
          {elseif $product.availability == 'last_remaining_items'}
            <i class="material-icons product-last-items">&#xE002;</i>
          {else}
            <i class="material-icons product-unavailable">&#xE14B;</i>
          {/if}
          {$product.availability_message}
        {/if}
      </span>
    {/block}


But result is different in cart (Following link) https://ibb.co/GtnVcDr

You can see that in cart instead of displaying "available on order" (mean can be ordered when out of stock) it just say "available".

Im using the same code for both, i rlly dont understand why this difference

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