Hiding the size or color attribute when they are out of stock
Written by Matt on July 16, 2008 – 2:30 pmYou 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>
<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>
Tags: attributes, coding, product detail template, prostores, Tips
Posted in ProStores Coding, Tips |















July 16th, 2008 at 3:54 pm
Does this only really apply to Advanced Tier Prostores?
July 16th, 2008 at 4:01 pm
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!