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

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -