Can anyone tell me how to sort the order of attribute sets when creating new products in Magento.

From question: How to sort the Attribute Set list on the Manage Products Grid dropdown menu? I can see how it is done for the manage product grid. But it is even more needed when creating new products


Ok, so once you've created the module described in the answer you posted you need to add the following:

Change the config.xml to the following:

<?xml version="1.0"?>

Then create the following file app/code/local/MyProject/Catalog/Block/Adminhtml/Catalog/Product/Edit/Tab/Settings.php

class MyProject_Catalog_Block_Adminhtml_Catalog_Product_Edit_Tab_Settings 
    extends Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Settings
    public function _prepareForm()
        $form = new Varien_Data_Form();
        $fieldset = $form->addFieldset('settings', array('legend'=>Mage::helper('catalog')->__('Create Product Settings')));

        $entityType = Mage::registry('product')->getResource()->getEntityType();

        $fieldset->addField('attribute_set_id', 'select', array(
            'label' => Mage::helper('catalog')->__('Attribute Set'),
            'title' => Mage::helper('catalog')->__('Attribute Set'),
            'name'  => 'set',
            'value' => $entityType->getDefaultAttributeSetId(),
            'values'=> Mage::getResourceModel('eav/entity_attribute_set_collection')
                ->setOrder('attribute_set_name', 'asc')

        $fieldset->addField('product_type', 'select', array(
            'label' => Mage::helper('catalog')->__('Product Type'),
            'title' => Mage::helper('catalog')->__('Product Type'),
            'name'  => 'type',
            'value' => '',
            'values'=> Mage::getModel('catalog/product_type')->getOptionArray()

        $fieldset->addField('continue_button', 'note', array(
            'text' => $this->getChildHtml('continue_button'),

  • actually I did not manage to make it work my creating a module as suggested in the linked thread. I can only make it work by changing the file app/code/core/Mage/Adminhtml/Block/Catalog/Product/Grid.php as descibed. Using magento – lalord May 14 '16 at 8:50

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.