Latest Posts »
Latest Comments »
Popular Posts »

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

Written by Matt on July 16, 2008 – 2:30 pm

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.


<td>
  <font face="arial,helv" size="2"><b>Size</b>&nbsp;
    <select name="size">
      <ss:foreach item="attr" within="$product.attributes">
        <ss:if test="$attr.quantity <> 0">
          <option value="$attr.size"><ss:value source="$attr.size"/></option>
        </ss:if>
      </ss:foreach>
    </select>
  </font>
</td>
Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Google
  • Slashdot
  • StumbleUpon
  • Propeller
  • Live
  • Technorati
  • Facebook
  • YahooMyWeb
  • LinkedIn
  • TwitThis
  • E-mail this story to a friend!
  • Print this article!

Tags: , , , ,
Posted in ProStores Coding, Tips |

2 Comments to “Hiding the size or color attribute when they are out of stock”

  1. ericyay Says:

    Does this only really apply to Advanced Tier Prostores?

  2. Matt Says:

    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!

Leave a Comment