I am trying to show an attribute(Text area) in product page. My phtml file to call the attribute is description.phtml :
<?php $_description = $this->getProduct()->getDescription(); ?>
<?php if ($_description): ?>
<h2><?php echo $this->__('Details') ?></h2>
<div class="std">
<?php echo $this->helper('catalog/output')->productAttribute($this->getProduct(), $_description, 'description') ?>
</div>
<?php endif; ?>
And I create a static block with this code:
<div id="tab1" class="tab active">
<p> {{block type="core/template" template="page/description.phtml"}<p>
</div>
Then I called my static block in view.phtml like this:
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('product_details_tab')->toHtml() ?>
where the identifier of the static block is product_details_tab.
Instead of displaying the value given in the attribute field, It is displaying error like:
Fatal error: Call to a member function getDescription() on null.
Help me to resolve this. Where have I went wrong?