0

I need to call function in observer by controller function. How I do this. Please explain with example.

closed as unclear what you're asking by Rohit Kundale, Qaisar Satti, Marius Feb 24 '16 at 6:05

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

2

You can instantiate a controller anywhere with

$controller = Mage::getControllerInstance(
'The_Controller_Class',
Mage::app()->getRequest(),
Mage::app()->getResponse());

To tell if this is the best way, I would need to know more about your use case

  • welcome, happy to help :) – Shakir Khan Feb 24 '16 at 6:31
  • @ShakirKhan How can we do the same on Magento 2? Can you please help? – manini Nov 23 '17 at 6:05

Not the answer you're looking for? Browse other questions tagged or ask your own question.