Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Extending Product Item Fields / Attributes
 
mrfrench
Jr. Member
 
Avatar
Total Posts:  2
Joined:  2008-12-20
 

Hio Magento Community…

NOTE: Just to make sure I am clear on this, I don’t want to extend by adding another attribute with the “Add Attribute” function. I want this new attribute to apply to ALL items automatically just by installing the module and without the need for the person installing the module to configure the attribute.

Quick Question. Is there a simple way to extend item attributes for product items in your catalog?

Lets say I wanted to add another field directly below “Set Product as New to Date” called “Test” inside admin/catalog_product/edit/id/<ID>/.

Looking through docs and around I see that I can use something like this to extend it in the core.

$fieldset->addField('test''select', array(
          
'label'     => Mage::helper('myhelper')->__('Test'),
          
'name'      => 'test',
          
'values'    => array(
              array(
                  
'value'     => 1,
                  
'label'     => Mage::helper('myhelper')->__('Value 1'),
              ),

              array(
                  
'value'     => 2,
                  
'label'     => Mage::helper('myhelper')->__('Value 2'),
              ),

          ),
      ));

Now, I know I can go into the Core code and change things, but I want to extend item attributes using an extention. I do not want to modify any core code. Is there a specific class that I can extend to accomplish this?

Edit: Also, the going through the DB is a bit de-normalized from the way that I would normally do things..

What table stores the transactions? It looks like sales_order, but I just want to be 100% sure.

Keep up the good work,

French

 
Magento Community Magento Community
Magento Community
Magento Community
 
Discovery
Enthusiast
 
Total Posts:  767
Joined:  2007-12-29
 

Just add your attribute to your default attribute set.

 
Magento Community Magento Community
Magento Community
Magento Community
 
mrfrench
Jr. Member
 
Avatar
Total Posts:  2
Joined:  2008-12-20
 

Found this.

http://www.magentocommerce.com/wiki/doc/installing_custom_attributes_with_your_module

Answers my question. wink

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top