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
private function get_callstack() { | |
$dt = debug_backtrace(); | |
$cs = array(); | |
foreach ($dt as $t) { | |
$cs[] = $t['file'] . ' line ' . $t['line'] . ' calls ' . $t['function'] . "()" ; | |
} | |
return $cs; | |
} | |
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
public function yourMethod($observer) | |
{ | |
if ($condition) { | |
$request = Mage::app()->getRequest(); | |
$request->initForward() | |
->setControllerName('controllername') | |
->setModuleName('modulename') | |
->setActionName('actionname') | |
->setDispatched(false); |
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
$request = Mage::app()->getRequest(); | |
$action = $request->getActionName(); | |
Mage::app()->getFrontController()->getAction()->setFlag($action, Mage_Core_Controller_Varien_Action::FLAG_NO_DISPATCH, true); |
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
Packaging.prototype.sendCreateLabelRequest = Packaging.prototype.sendCreateLabelRequest.wrap(function(parentMethod){ | |
//replace the original method here with your own stuff | |
console.log('we have overridden their function'); | |
parentMethod(); | |
}); |
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
<depends> | |
<dependent_field_name>value_we_are_looking_for</dependent_field_name> | |
</depends> |
NewerOlder