Custom EAV Frontend Input Renderer
Handy for adding an attribute to a product or category which needs a custom frontend input type.
Related cards:
Custom Admin Grid Column Renderer
When you need to display an image in a column, or format a value in a particular way, you can use a custom renderer to present the data differently.
Config Controller Definition (Frontend & Admin)
Frontend With Route:
<config>
<frontend>
<routers>
<namespace_module>
<use>standard</use>
<args>
<module>Namespace_Module</module>
...
Config Event Observer Definition (Frontend, Admin & Global)
Frontend:
<config>
<frontend>
<events>
<the_name_of_the_event_to_observe>
<observers>
<namespace_module>
<class>namespace_module/obser...
Config Layout Definition (Frontend & Admin)
Frontend:
<config>
<frontend>
<layout>
<updates>
<namespace_module>
<file>namespace-module.xml</file>
</namespace_module>
</up...
Removing Custom Attributes Across Multiple Products
If you have custom attributes named the same across multiple products, you
wish to remove said attributes, this might come in useful. The SQL below restricts
the removal of the attributes to a certain attribute set name, but you can remove
this is...
Creating an EAV Entity
Overview
A overview for those familiar with making flat models:
- Your config is standard, your table name takes the form of the base (entity) table
- You name your resource models as normal (so by class name, you can't tell the difference b...
Config Setup Definition (EAV & Flat)
EAV:
<config>
<global>
<resources>
<namespace_module_setup>
<setup>
<module>Namespace_Module</module>
<class>Mage_Eav_Model_Entity_Setup</...
EAV Tables
A list of EAV tables and their purpose.
|----------------------------+-------------------------------------------------------------------------------------|
| Table | Contains ...
Custom Cache Type Definition
Adding this XML will cause an additional entry to appear in the Magento Cache Management screen.
<global>
<cache>
<types>
<your_cache_type module="your_module" translate="label description">
...
Add comment to form input in admin
$afterElementHtml = '<p class="nm"><small>' . ' this is the hint! ' . '</small></p>';
$linkFieldset->addField('field_name', 'text', array(
'after_element_html' => $afterElementHtml,
));
![](http://mikewhitby.co.uk/makandra-tr...