having this code:
$this->helper('catalog/image')->init($_product, 'slider_img')->resize(400,300)
how to check if the 'slider_img' exists?
was easy:
if ($_product->getSliderImg())
UPDATE:
Found a better way to avoid any image exception using try/catch:
try {
$product_img = $this->helper('catalog/image')->init($_product, 'header_slider_img')
}
catch (Exception $e) {
Mage::log('Image '.$e->getMessage(), null, 'image_exception.log');
}
if ($_product->getSliderImg() != 'no_selection')
would be more proper for first solution, as image never returns false from what I know.