Skip to content

Instantly share code, notes, and snippets.

@nhp
Created April 23, 2013 07:30
Show Gist options
  • Save nhp/5441517 to your computer and use it in GitHub Desktop.
Save nhp/5441517 to your computer and use it in GitHub Desktop.
adding image attribute
<?php
$installer = $this;
$installer->startSetup();
$this->addAttribute(
'catalog_product',
'back_image',
array (
'group' => 'Images',
'type' => 'varchar',
'frontend' => 'catalog/product_attribute_frontend_image',
'label' => 'Back Image',
'input' => 'media_image',
'class' => '',
'source' => '',
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
'visible' => true,
'required' => false,
'user_defined' => false,
'default' => '',
'searchable' => false,
'filterable' => false,
'comparable' => false,
'visible_on_front' => false,
'unique' => false,
)
);
$installer->endSetup();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment