I just came across the question How to override product search result block and my immediate reaction was "this has to be a duplicate".

But any question I found about the topic was something along the lines of "I tried to rewrite this particular block, this is my config, why doesn't it work" and depending on which mistake has been made the answers are different. None of these are a good fit for a canonical question, even if the question is edited to be more general.

In short, I'm looking for a question like this How to Override Core Block, Model and controller in Magento2 for Magento 1 - is there already something on StackExchange?

If not, I am willing to write one with added bounty to answer all these questions one and for all.

I am aware of the famous inchoo blog post but cannot close questions as duplicate for that :)

2 Answers 2


If the goal of this is to close / mark future questions as duplicate then I would suggest that we avoid it. For instance are you going to cover every possible type of rewrite? What happens when someone wants to rewrite an Abstract class?

I personally (not speaking for the mod team) foresee too many possibilities to be canonical (and concise) and as I suspect the goal will be to detract these questions from being asked again.

  • 1
    The standard use case should be enough, but fully explained. For special cases like rewriting abstract classes there already are other questions. But any question "how do I rewrite class X" that's not a special case could be closed as duplicate to a canonical question. In some cases maybe with a comment which part of the given configuration is wrong. Aug 26, 2016 at 13:46
  • Fabian, this may be a perfect candidate for the new Stack Overflow Magento Docs (beta) system that was recently launched - stackoverflow.com/documentation/magento Sep 12, 2016 at 23:41

I like the idea.

My only concern is only regarding the fact that this is a broad question.

What about creating 3 different questions / answers for models / controllers / blocks (helpers ?) ?

I'm willing to help if you need a hand.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .