Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I took a look in the class loading, and it doesn't look like there is a clean solution. The relevant classname loading code is this:</p> <pre><code> if (isset($this-&gt;_classNameCache[$groupRootNode][$group][$class])) { return $this-&gt;_classNameCache[$groupRootNode][$group][$class]; } ... if (isset($config-&gt;rewrite-&gt;$class)) { $className = (string)$config-&gt;rewrite-&gt;$class; </code></pre> <p>So it looks like there is no such thing as a rewritten-rewrite. The one that gets put into the configuration array is the one that gets loaded, and once cached it simply gets returned as requested. I don't see an easy way to hack the cache, either. You could try to get precedence for your module (by renaming it alphabetically, I assume), but that's a total hack and likely to fail mysteriously later on. That kills the config possibilities.</p> <p>Also obnoxious: it looks like Magento only requests that grid in two places, within <code>Mage_Adminhtml_Block_Catalog_Product</code> (which you can easily override), but also in <code>Mage_Adminhtml_Catalog_ProductController</code> (d'oh!). Depending on your use case, consider overriding the catalog product block and replacing the <code>_prepareLayout()</code> function with your own. If you want to override the controller as well, you'll want to create your own controller (which descends from <code>Mage_Adminhtml_Catalog_ProductController</code>) and define a rewrite within your configuration to direct <code>admin/catalog/product/grid</code> to your action. A pain, but at least accomplishes your goal.</p> <p>Hope that helps,</p> <p>Joe</p>
 

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