Hiding the size or color attribute when they are out of stock

You can hide the size attributes on the Product/Catalog Detail page if the attribute is out of stock, you can modify it for color as well. You could take this code and modify it for other similar functions.

**note** Most likely this code will only work with Advanced Tier or higher ProStores sites.
**note** This snippet of code ONLY works on the Product/Catalog Detail template. You will need to do some editing with the Add to Cart template as well as the Detail template to get this code to work properly.

Size 

12 thoughts on “Hiding the size or color attribute when they are out of stock”

  1. Thats a good observation, I hadn’t thought of that so I’ve looked it up and I cannot tell you for sure because I don’t have access to a business level account.

    But! Most likely you are correct, if the business level accounts don’t have attributes with quantities then this code wouldn’t apply/work.

    I note the post to reflect this. 🙂

    Thanks!

  2. is there any way to hide the “add to cart” button, even when quatity says “0”? want to display the product info but need to disable the “add to cart” feature. help! any ideas?

    • Hmm, that would require creating a if statement that determined if the total of all attributes = 0 then hide the add to cart button or display an alternate graphic.

      That would take some time and probably some custom coding, right now my schedule doesn’t really have spot in it to create something like that.

      But if you spend some time in the SSML reference guide I get you could create it. 🙂

      Thanks for reading!!
      Matt

Leave a Comment