
Untitled
By: a guest on
May 21st, 2012 | syntax:
None | size: 0.77 KB | hits: 19 | expires: Never
<?php
$sizes = Mage::getModel('eav/entity_attribute_option')->getCollection()
->setStoreFilter()
->join('attribute','attribute.attribute_id=main_table.attribute_id', 'attribute_code');
foreach ($sizes as $item) {
if ($item->getAttributeCode() == 'size')
$sizeOptions[$item->getOptionId()] = $item->getValue();
}
//echo '<pre>' . print_r($sizeOptions, true) . '</pre>';
$this->addColumn('size', array(
'header' => Mage::helper('reports')->__('Product Size'),
'sortable' => false,
'index' => 'size',
'width' => '100px',
'type' => 'options',
'options' => $sizeOptions
));