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

Rewrite class not working #SOLVED# (see topic)
 
Syndia
Member
 
Total Posts:  38
Joined:  2008-04-01
Netherlands, The
 

Hello,

I’m trying to rewrite the navigation class, but don’t work.
The config.xml is included, so far it’s working, but the rewrite rule is not working.

This is what I have:

<?xml version="1.0"?>
<config>
    <
modules>
        <
Pricoll_Navigation>
            <
version>0.1.0</version>
        </
Pricoll_Navigation>
    </
modules>

     <
blocks>
        <
catalog>
                        <!-- try 
top.menu -->
            <
rewrite>
                <
top.menu>Pricoll_Catalog_Block_Navigation</top.menu>
            </
rewrite>
                        <!-- try 
topMenu -->
            <
rewrite>
                <
topMenu>Pricoll_Catalog_Block_Navigation</topMenu>
            </
rewrite>
        </
catalog>
    </
blocks>
</
config>

Information about my class:
magento\app\code\local\Pricoll\Catalog\Block\Navigation.php
Class name: Pricoll_Catalog_Block_Navigation

I tried many ways in my config.xml but can’t get it working.

Is there someone who want to help me?

Ok solved the problem, here for others who are searching for an answer.

I have changed the config.xml to:

<?xml version="1.0"?>
<config>
    <
modules>
        <
Pricoll_Navigation>
            <
version>0.1.0</version>
        </
Pricoll_Navigation>
    </
modules>

    <global>
         <
blocks>
            <
catalog>
                <
rewrite>
                    <
navigation>Pricoll_Catalog_Block_Navigation</navigation>
                </
rewrite>
            </
catalog>
        </
blocks>
    </global>
</
config>

Regards

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