How do i update/change the sort order for existing product attribute using upgrade scripts?

I want to change the order in which the product attributes are listed in the admin. Is there any other way to do that through upgrade scripts

1 Answer 1


Use bellow update scripts


class Attribute
    public function index()    

        $installer = new Mage_Eav_Model_Entity_Setup('core_setup');
        $installer->updateAttribute('catalog_product','name', array(''),null,2); //entity Type Id, Attribute id or Attribute code, field, value = null, sortOrder = null)

$obj = new Attribute();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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