I created a multiselect attribute with label featuredetails
.
I created a static block and called the feature.phtml
file(a newly created phtml file) in it like:
<div id="tab3" class="tab">
<p>{{block type="core/template" template="catalog/product/view/feature.phtml"}}</p>
</div>
The content of the phtml file is:
<?php
$_prodID = Mage::registry('current_product')->getId();
$_product = Mage::getModel('catalog/product')->load($_prodID );
?>
<div class="feature">
<?php
$Feature = explode(",",$_product->getResource()
->getAttribute('featuredetails')->getFrontend()
->getValue($_product));
foreach($Feature as $key => $value): ?>
<a href="<?php echo $_product->getProductUrl() ?>" ?>
<?php echo "<img src='".Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA)."/wysiwyg/".trim($value).".png'/>"; ?>
</a>
<?php endforeach; ?>
</div>
The content of the block will map the attributes with the media images.
But am getting error like: Fatal error: Call to a member function getFrontend() on boolean
Help me to resolve this error.