I am doing a magento customaization site, I need to add the products addtional attributes like it's type,version etc .I am new to magento , How can i add the new custom block to product details page. I have created a module , and i am using below coding.
app\code\local\SmartGrowth\CompatibleWith\Block\compatible.php
class SmartGrowth_CompatibleWith_Block_CompatibleWith extends Mage_Catalog_Block_Product_View
{
protected function _prepareLayout()
{
//$this->getProduct()->setName($this->getProduct()->getPrice());
$this->getProduct()->setName($this->getProduct()->getShortDescription());
parent::_prepareLayout();
}
}
I have used the below coding in _prepareLayout() but it seem to be repeat the block 5 times and the location of the block appeared is a probs
$block = $this->getLayout()->createBlock(
'Mage_Core_Block_Template',
'my_block_name_here',
array('template' => 'catalog/product/compatiblewith.phtml')
);
$this->getLayout()->getBlock('content')->append($block);
Please help how can i do this , I am new to magento , Any help will be appreciated.