In a little generic exporter I am currently writing I am exporting all products and their attributes that reside in the
For some attributes, it is necessary to translate their integer value into their frontend value (manufacturer, brand ...).
The best way I found to do that so far is this:
However, for all attributes that do not have a frontend value, a FATAL ERROR is thrown:
Call to a member function getSource() on boolean in app/code/core/Mage/Catalog/Model/Product.php on line 1385
It seems that this happens whenever I try to check if this attribute has a frontend value to display. However, I cannot seem to determine if I have to check any frontend value without the FATAL ERROR.
I'd prefer not to tinker with the error settings of my script or install a custom FATAL ERROR handler to catch just this error. I hope that there's a way without iterating over all attributes first, then reading the values for the attribute from the product instead of just iterating over the data array.