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'];
        }
    }
?>
 
No comments:
Post a Comment