Getting all options of a specific magento configurable product attribute is fairly easy:
getAttribute('catalog_product', 'color');
foreach ($attribute->getSource()->getAllOptions(true) as $option) {
echo $option['value'] . ' ' . $option['label'] . "n";
}
?>
get options and their values which are applicable to a particular configurable product
getTypeInstance(true)->getConfigurableAttributesAsArray($product);
$attributeOptions = array();
foreach ($productAttributeOptions as $productAttribute) {
foreach ($productAttribute['values'] as $attribute) {
$attributeOptions[$productAttribute['label']][$attribute['value_index']] = $attribute['store_label'];
}
}
?>
(Visited 57 times, 1 visits today)