Magento - getting category custom attribute value -
how current custom category attribute value in product list view? i'm trying this
$attribute = mage::getmodel('catalog/category')->getattributes();
and see it's there how it? custom attribue name catalog_pdf
also tryed in way, nothing:
$attribute = mage::getmodel('catalog/category')->getattribute('catalog_category','catalog_pdf');
this should work. if int product list should have current category in
mage::registry('current_category');
so this:
$category = mage::registry('current_category'); if ($category){ //this necessary in case in product listing is's not category $value = $category->getdata('catalog_pdf');//catalog_pdf attribute code //or //$value = $category->getcatalogpdf(); }
Comments
Post a Comment