0

I want to know how to add a Magento EAV attributes to an existing group programmatically.

Can anyone share some information for adding attributes using install or upgrade script?

I have followed some tutorials but no results.

1 Answer 1

0

Souf,there are lot of code,are available here some link is below

[http://stackoverflow.com/questions/10147847/creating-attribute-sets-and-attributes-programmatically][1]
[http://www.magentocommerce.com/wiki/5_-_modules_and_development/catalog/programmatically_adding_attributes_and_attribute_sets][1]

Some upgrade of attribute

$installer = $this;
/* @var $installer Mage_Catalog_Model_Resource_Eav_Mysql4_Setup */

$installer->startSetup();
$installer->updateAttribute('catalog_product', 'price_view', 'used_in_product_listing', 1);
$installer->updateAttribute('catalog_product', 'shipment_type', 'used_in_product_listing', 1);
$installer->updateAttribute('catalog_product', 'weight_type', 'used_in_product_listing', 1);
$installer->endSetup();
Sign up to request clarification or add additional context in comments.

1 Comment

this is my question i used this code stackoverflow.com/questions/22409317/… is it wrong ?

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.