Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This is possible with writing your own custom module. I did it to add a tooltip-option to an attribute.</p> <p>You can use the <code>adminhtml_catalog_product_attribute_edit_prepare_form</code>-event to add a field with your observer:</p> <pre><code>$fieldset = $observer-&gt;getForm()-&gt;getElement('base_fieldset'); $fieldset-&gt;addField('tooltip', 'text', array( 'name' =&gt; 'tooltip', 'label' =&gt; Mage::helper('catalog')-&gt;__('Tooltip'), 'title' =&gt; Mage::helper('catalog')-&gt;__('Tooltip') )); </code></pre> <p>This adds the extra field to the attribute-edit screen. Next up is to make sure the property gets saved when editing your attribute. This can be done in your installer script with something like:</p> <pre><code>$installer-&gt;getConnection()-&gt;addColumn( $installer-&gt;getTable('catalog/eav_attribute'), 'tooltip', array( 'type' =&gt; Varien_Db_Ddl_Table::TYPE_TEXT, 'nullable' =&gt; true, 'comment' =&gt; 'Tooltip' ) ); </code></pre> <p>You also have to make sure your <code>Model/Resource/Setup</code>-class extends <code>Mage_Eav_Model_Entity_Setup</code> instead of <code>Mage_Core_Model_Resource_Setup</code>.</p> <p>Now, at this point, you can save your custom attribute property. Next step is to display it on the frontend. This can be done fairly easy, just by simple Magento templating 101:</p> <p>For example, in <code>catalog/product/view/type/options/configurable.phtml</code> in the <code>foreach()</code>-loop, place something like this, to display the tooltip:</p> <pre><code>echo $_attribute-&gt;getProductAttribute()-&gt;getTooltip(); </code></pre> <p>That's nice...</p> <p><strong>Update:</strong> Since I got some questions about this subject by e-mail, I decided to write a more detailed blog post about it. You can read it here: <a href="http://gielberkers.com/add-custom-properties-magento-attributes/" rel="noreferrer">http://gielberkers.com/add-custom-properties-magento-attributes/</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload