Skip to content

Instantly share code, notes, and snippets.

@roman204
Created June 26, 2014 09:15
Show Gist options
  • Save roman204/338d545eb9964eb43a75 to your computer and use it in GitHub Desktop.
Save roman204/338d545eb9964eb43a75 to your computer and use it in GitHub Desktop.
magento modify attribute in setup-script
$installer = $this;
$installer->startSetup();
$model = Mage::getModel('catalog/resource_eav_attribute');
$model->loadByCode('catalog_product', 'visibility');
$model->setIsGlobal(Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL);
$installer->endSetup();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment