Question

How to add attributes set column to

category products grid under

Catalog -> Manage Categories -> Category_to_be_edited

I've added a special price since it was already available in the collection.

But I need to have the attribute set also

can someone help?

Was it helpful?

Solution

In the same module that you used for special price (explained here) you can add you attribute set also.
Just add this to the collection init ->addAttributeToSelect('attribute_set_id') and the corresponding column in _prepareColumns().

$sets = Mage::getResourceModel('eav/entity_attribute_set_collection')
            ->setEntityTypeFilter(Mage::getModel('catalog/product')->getResource()->getTypeId())
            ->load()
            ->toOptionHash();
    $this->addColumnAfter('set_name',
        array(
            'header'=> Mage::helper('catalog')->__('Attrib. Set Name'),
            'width' => '100px',
            'index' => 'attribute_set_id',
            'type'  => 'options',
            'options' => $sets,
    ), 'name'); 
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top