I am trying to override magento Mage \ Catalog \ controllers \ ProductController.php with a module. In my module, I try this:
\ etc. \ config.xml
<global>
<rewrite>
<aion_fbpage_catalog_productcontroller>
<from><![CDATA[#^catalog/product/#]]></from>
<to>fbpage/catalog_product/</to>
</aion_fbpage_catalog_productcontroller>
</rewrite>
</global>
<frontend>
<routers>
<fbpage>
<use>standard</use>
<args>
<module>Aion_FbPage</module>
<frontName>fbPage</frontName>
</args>
</fbpage>
</routers>
</frontend>
\ controllers \ Catalog \ ProductController.php
<?php
require_once "Mage/Catalog/controllers/ProductController.php";
class Aion_FbPage_Catalog_ProductController extends Mage_Catalog_ProductController
{
}
And when I try to get to my product to see what rewriting does, I get this error:
Fatal error: call getMetaTitle () member function for non-object in C: \ XAMPP \ HTDOCS \ igneum \ application \ code \ kernel \ Mage \ Directory \ Block \ Product \ view.php on line 56
I get the same error message if I do nothing in my class
source
share