On the catalog grid page, I want to output all filterable attribute values for each product. For example: If the price is filterable in the layered navigation, the attribute value associated with the product would be output (£0.00 - £999.99, £20,000 and above, etc).
I have the start of something but can't work out how to filter by product only and grab the value:
$_productId = $_product->getProductId();
$product = Mage::getModel('catalog/product')->load($productId);
$attributes = $product->getAttributes();
foreach ($attributes as $attribute) {
echo $attribute->getAttributeCode();
}
This just seems to output every attribute code on every product.
This is how I think it should be represented in terrible pseudocode:
get allProductAttributes
foreach allProductAttributes as attribute
if attribute->isFilterable
echo attribute->getAttributeValue
endif
endforeach
Thanks