Search code examples
magentomodelentity-attribute-value

magento - how to add property to eav model when is inialized


i'm not able to add a property in _data array() to EAV model (extended Product Model) when it is initialized, for example by a collection call (Mage::getResourceModel('catalog/product_collection')).

I try to extend _construct() with setValue(), but not work and here _data is empty!

When _data is filled?

When i have the product model with _data setted and i can manipulate this in initialization phase?

I don't want an attribute setted in db, because this attribute is dynamic.

thx for replies! :)


Solution

  • You can always do it in the _load_after observer.