Last active
July 5, 2020 11:29
-
-
Save shebin512/3b0858f97831a8107aeb to your computer and use it in GitHub Desktop.
Magento get current full Action controller name in Observer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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
@dave-swift I am using this but get the error:
When using this script:
My observer: