Skip to content

Instantly share code, notes, and snippets.

@erictrn
Forked from shebin512/observer.php
Created May 7, 2018 03:55
Show Gist options
  • Save erictrn/89dde9f628b3f9f4e7c98285ed046f57 to your computer and use it in GitHub Desktop.
Save erictrn/89dde9f628b3f9f4e7c98285ed046f57 to your computer and use it in GitHub Desktop.
Magento get current full Action controller name in Observer
<?php
/*
* Get full Action controller name in Observer
*/
$request = Mage::app()->getRequest();
$module = $request->getControllerModule();
$module_controller = $request->getControllerName();
$module_controller_action = $request->getActionName();
$fullActionName = $module."_".$module_controller."_".$module_controller_action;
echo $fullActionName;
Mage::log($fullActionName, null,'custom.log');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment