Jump to content

[SOLVED] How to get a NOT AVAILABLE ribbon


Penge

Recommended Posts

 

Hello

 

I am using prestashop 1.7.x

 

In backoffice on product page and under Options it is possible to remove a tick in a box when the product is not available.

Is it possible to get a ribbon on the image saying "Not available" when the box is unticked ?

Or do I need a module for this ?

I know there is a module for adding ribbons but then I need first to untick the box and then add the ribbon,.  Means two steps.

Anyone done this ?

 

Petter

 

Edited by Penge (see edit history)
Link to comment
Share on other sites

  • 8 months later...

The code here didnt work for classic template on prestashop 1.7.4.3, I used this code instead:

 

 {block name='product_flags'}
<ul class="product-flags">
{if $product->quantity == 0 AND $quantity == 0}
    <li class="product-flag">
        {l s="NOT AVAILABLE" d="Shop.Theme.Catalog"}
    </li>
    {/if} {foreach from=$product.flags item=flag}
    <li class="product-flag {$flag.type}">{$flag.label}</li>
    {/foreach}
</ul>
{/block}

 

But just coudlt quite get the main page to show the label..

 

Edited by guzzy92fs (see edit history)
Link to comment
Share on other sites

  • 5 months later...
  • 1 year later...

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