2

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?

3

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'); 
  • you're a PRO man! Thank you very much! how could i get to know about the attributes that can be added to filter the collection? eg.: addAttributeToSelect('attribute_set_id') – Shathish May 14 '13 at 9:11
  • 1
    You can basically add any attribute to the collection. Just get the attribute code from Catalog->Attributes->Manage attributes. Then just add the grid column with the correct type. The type depends on the attribute type. It can be text, options (for dropdowns and you need to specify a set of options), number, currency (for prices), and many others. – Marius May 14 '13 at 9:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.