Tips & Tricks
-
Jan 18
2012 -
Simulate / fake a module
I found that I needed to trick Magento into thinking it’s using one of it’s own core modules instead of a custom one, when I needed to retain certain URL-s instead of using my own module’s controller. So, to hack Magento so that it returns it’s own core module with
select all$this->getUrl('*/*/*');
you shoud utilize this code on the controller level ideally:
select all$this->getRequest()->setRouteName('catalog');
Where “catalog” is the core module you want to fake.
No comments yet

