Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Adding to product pages - Fatal Error on Layout.php line 461
 
altapower
Jr. Member
 
Total Posts:  6
Joined:  2009-01-08
 

I’m trying to add tabs to the Modern Theme and am running into a couple of roadblocks. I’m following weckl’s directions here:
http://www.magentocommerce.com/boards/viewthread/19498/

Code and errors outline below.

Catalog.xml:

<action method="addTab" translate="title" module="catalog"><alias>included</alias><title>What's Included</title><block>catalog/product_view_included</block><template>catalog/product/view/Included.phtml</template></action>

Included.phtml /app/design/frontend/default/modern/template/catalog/product/view/ingredients/phtml

?>
<div class="product-specs">
<?php echo nl2br($this->getProduct()->getIncluded()) ?>
</div>

Inluded.php (block) /app/code /core/Mage/Catalog/Block/Product/View/Ingredients.php

class Mage_Catalog_Block_Product_View_Included extends Mage_Core_Block_Template
{
    
protected $_product null;

    function 
getProduct()
    
{
        
if (!$this->_product{
            $this
->_product Mage::registry('product');
        
}
        
return $this->_product;
    
}
}

Gives me this error:

class Mage_Catalog_Block_Product_View_Included extends Mage_Core_Block_Template { protected $_product = null; function getProduct() { if (!$this->_product) { $this->_product = Mage::registry(’product’); } return $this->_product; } } class Mage_Catalog_Block_Product_View_Included extends Mage_Core_Block_Template { protected $_product = null; function getProduct() { if (!$this->_product) { $this->_product = Mage::registry(’product’); } return $this->_product; } }
Fatal error: Class ‘Mage_Catalog_Block_Product_View_Included’ not found in /home/enertcom/public_html/app/code/core/Mage/Core/Model/Layout.php on line 461

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top