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
Use bellow update scripts
<?php
require_once('app/Mage.php');
Mage::app('default');
class Attribute
{
public function index()
{
$installer = new Mage_Eav_Model_Entity_Setup('core_setup');
$installer->startSetup();
$installer->updateAttribute('catalog_product','name', array(''),null,2); //entity Type Id, Attribute id or Attribute code, field, value = null, sortOrder = null)
$installer->endSetup();
}
}
$obj = new Attribute();
$obj->index();
?>