Step 1: Mage::dispatchEvent(’my_event’); Step 2: link method MyEvent to event “my_event” in your module’s config.xml file Observer.php public function MyEvent(Varien_Event_Observer $observer) { Mage::getSingleton(’customer/session’)->setData(’my_event’, ‘results’); } } Step 3: $result = Mage::getSingleton(’customer/session’)->getData(’my_event’));
Posted on August 14, 2017, 3:40 pm, by admin, under
Tips.
$quote = Mage::getModel(’sales/quote’)->loadByIdWithoutStore($quoteId); instead of $quote = Mage::getModel(’sales/quote’)->load($quoteId); because the regular Mage_Sales_Model_Quote::load() function automatically attaches the current storeview to load the quote object. In this case the storeview is admin, which means no results will be found for the quote id and the returned object is empty.