Jump to content

Label "Out-Of-Stock" in product list?


Delizie Raggi 1920

Recommended Posts

Hello everyone, i've been looking for this for a few days now but i still can't figure it out. I just want to show a little label on the product image in the product list (scrolling through the shop to be clear) saying "Out of Stock". I can't find a way to do it. It says so if i click on the product, but i want costumers to see it even without clicking! I link my website if it can help. If you need any more informations I will be pleased to answer. Iìll also attach two images as an example.

Thanks in advance, Lorenzo.

https://delizieraggi1920.it/4-shop

product list2.JPG

product.JPG

Link to comment
Share on other sites

  • 2 weeks later...

We want to tell you that you can add the text when the product is out of stock by modifying the theme file.

Code:  {if $product.quantity_all_versions <= 0}
             <h3 class="h3 product-title" itemprop="name"><a href="{$product.url}">{l s='Out of Stock' d='Shop.Theme.Catalog'}</a></h3>
        {/if}

File Path need to modify : /themes/{your_theme_name}/templates\catalog\_partials\miniatures\product.tpl

Image for your reference: https://nimb.ws/XOfCqT

https://nimb.ws/HMjJ7X

Also, you can change the look and position of the text using CSS.

Link to comment
Share on other sites

On 11/15/2021 at 11:37 AM, Knowband Plugins said:

We want to tell you that you can add the text when the product is out of stock by modifying the theme file.

Code:  {if $product.quantity_all_versions <= 0}
             <h3 class="h3 product-title" itemprop="name"><a href="{$product.url}">{l s='Out of Stock' d='Shop.Theme.Catalog'}</a></h3>
        {/if}

File Path need to modify : /themes/{your_theme_name}/templates\catalog\_partials\miniatures\product.tpl

Image for your reference: https://nimb.ws/XOfCqT

https://nimb.ws/HMjJ7X

Also, you can change the look and position of the text using CSS.

Thank you very much for the answer! Perfect!

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