I am having troubles overriding one of magento's core blocks.
The one I am interested with is Wishlist
. Module's default location is app/Core/Mage/Wishlist
. I tried following the instructions I've been given here by @Marius, but my block class still doesn't fire up.
I can clearly see in Administration panel that my module is Enabled
, so it must be some kind of typo in my configuration.
My entire config.xml
file has the following structure:
<?xml version="1.0" encoding="UTF-8"?>
<config>
<modules>
<Acme_Demo>
<version>1.0</version>
</Acme_Demo>
</modules>
<global>
<blocks>
<wishlist>
<rewrite>
<customer_wishlist>Acme_Demo_Block_Wishlist</customer_wishlist>
</rewrite>
</wishlist>
</blocks>
</global>
</config>
My configuration file in etc/modules
<Acme_Demo>
<active>true</active>
<codePool>local</codePool>
<depends>
<Mage_Wishlist />
</depends>
</Acme_Demo>
I only need to override the _prepareLayout()
method in my block, so it's a really basic class.
<?php
class Acme_Demo_Block_Wishlist extends Mage_Wishlist_Block_Customer_Wishlist {
protected function _prepareLayout() {
var_dump('I am loaded');
}
}
But magento still loads the default Mage_Wishlist_Block_Customer_Wishlist
. So I would really appreciate if anyone tells me what did I messed up?
-Update-
A bit more info - whatever I try do about this block class only, it does not get executed. I've succesfuly tried to override random parts of Wishlist
module - for example Wishlist/Model/Item.php
. Cache is cleared everytime I update my files. I have no idea what is going on here.