Jump to content

Product "Out Of Stock" Extra class


Recommended Posts

Hello,
Can't find solution for my problem. I'm trying to add a custom class to the product card. When the product is out of stock I need the product card to have "opacity 0.5" (or be half transparent).

Is there a way to do so with the simple line of code? I assume it has something to do with the following coding...
{if $product.quantity > 0}{else} ... {/if}

Sample of what I'm trying to reach in the image attached..

Would appreciate community help.

Thanks.

sale-product.png

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