Note that there are some explanatory texts on larger screens.

plurals
  1. POMagento rewrite block doesn't work
    primarykey
    data
    text
    <p>I need to override a method in a Magento core file, I am pretty sure I have done it the correct way and it is working on someone else's machine, but it's just not working on my own machine. We have the same environment. It's pretty weird I couldn't find out why and I have checked the file permissions, still don't see any light in solving the problem. Wonder has anyone run into the same problem? I am running 1.7</p> <p>Many thanks!</p> <p>--Update--</p> <p>My custom block class (app/code/local/Company/Cms/Block/Page.php)</p> <pre><code>require_once("Mage/Cms/Block/Page.php"); class Company_Cms_Block_Page extends Mage_Cms_Block_Page { protected function _prepareLayout() { // my code } } </code></pre> <p>app/code/local/Company/Cms/etc/config.xml</p> <pre><code>&lt;?xml version="1.0"?&gt; &lt;config&gt; &lt;modules&gt; &lt;Company_Cms&gt; &lt;version&gt;0.0.1&lt;/version&gt; &lt;/Company_Cms&gt; &lt;/modules&gt; &lt;global&gt; &lt;blocks&gt; &lt;cms&gt; &lt;rewrite&gt; &lt;page&gt;Company_Cms_Block_Page&lt;/page&gt; &lt;/rewrite&gt; &lt;/cms&gt; &lt;/blocks&gt; &lt;/global&gt; &lt;/config&gt; </code></pre> <p>app/etc/modules/Company_Cms.xml</p> <pre><code>&lt;?xml version="1.0"?&gt; &lt;config&gt; &lt;modules&gt; &lt;Company_Cms&gt; &lt;active&gt;true&lt;/active&gt; &lt;codePool&gt;local&lt;/codePool&gt; &lt;/Company_Cms&gt; &lt;/modules&gt; &lt;/config&gt; </code></pre> <p>This custom module isn't being executed at all as nothing changes unless I change code in core block class.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload