1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
app/code/community/Ess/M2ePro/Block/Adminhtml/Ebay/Listing/View/Ebay/Grid app/code/community/Ess/M2ePro/Block/Adminhtml/Ebay/Listing/Product protected function _prepareCollection(){ $collection->addAttributeToSelect('asset_type'); } protected function _prepareColumns(){ $attribute = Mage::getModel('eav/config')->getAttribute('catalog_product', 'asset_type'); $options = array(); foreach( $attribute->getSource()->getAllOptions(false, true) as $option ) { $options[$option['value']] = $option['label']; } $this->addColumn('asset_type',array( 'header'=> Mage::helper('M2ePro')->__('Dept.'), 'width' => '150px', 'index' => 'asset_type', 'type' => 'options', 'options' => $options, 'sortable' => false, )); $sets = Mage::getResourceModel('eav/entity_attribute_set_collection') ->setEntityTypeFilter(Mage::getModel('catalog/product')->getResource()->getTypeId()) ->load() ->toOptionHash(); $this->addColumn('set_name', array( 'header'=> Mage::helper('M2ePro')->__('Attrib. Set Name'), 'width' => '100px', 'index' => 'attribute_set_id', 'type' => 'options', 'options' => $sets, 'sortable' => false, ), 'name'); } |