Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7879761
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:58:38+00:00 2026-06-03T03:58:38+00:00

I’m using Magento, and I want to rewrite Mage_Catalog_Block_Product_Price, but a community codePool module

  • 0

I’m using Magento, and I want to rewrite Mage_Catalog_Block_Product_Price, but a community codePool module has already rewritten that block. I know that in my xml, I need

<config>
    <global>
        <blocks>
            <WHAT_GOES_HERE?>
                <rewrite>
                    <product_price>Display_Price_Block_Product_Price</product_price>
                </rewrite>
            </WHAT_GOES_HERE?>
        </blocks>

But I’m not sure what should be placed into the classgroup node (which i’ve labeled WHAT_GOES_HERE?) The community module makes no <[classgroup]> declaration, so I’m not sure what should go in the node I’m missing.

Thanks in advance for any help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T03:58:40+00:00Added an answer on June 3, 2026 at 3:58 am

    All of the configuration XML is merged into a single DOM structure in a way that means colliding xpaths will have their text values overridden. An example:

    This community module is currently rewriting the resolved classname via configuration:

    <config>
        <global>
            <blocks>
                <catalog>
                    <rewrite>
                        <product_price>Community_Module_Block_Example_Price</product_price>
                    </rewrite>
                </catalog>
            </blocks>
        </global>
    </config>
    

    The framework invokes block classes using Mage_Core_Model_Layout::createBlock(), with the argument in this case being catalog/product_price (note how those two strings map to the configuration). The community module is changing the classname which is calculated from this information, and pointing it to the classname specified i.e. Community_Module_Block_Example_Price. That classname is then fed to PHP new to invoke a class.

    What you need to do is copy this exact configuration to your module config – specifying your block classname – and (important!) make sure that the following occur:

    1. your configuration is loaded after the community module’s configuration, and
    2. that your class extends from the community module’s class.

    How do you make sure that your module configuration is loaded after the community module? Just open the community module’s declaration file in app/etc/modules, note the node name under the <modules> node (in the example above, would almost certainly be Community_Module), and then in your module declaration file (also in app/etc/modules), add this to your module declaration:

    <depends>
        <Community_Module /> <!-- e.g. -->
    </depends>
    

    HTH

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I've got a string that has curly quotes in it. I'd like to replace
I want to construct a data frame in an Rcpp function, but when I
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.