class Custom_Module_Model_Observer { public function modifyQuote(Varien_Event_Observer $observer) { $quote = $observer->getEvent()->getQuote(); $quote->setData('custom_attribute', 'custom_value'); } }In this example, we’ve defined a custom observer method called modifyQuote(). This method receives the $observer parameter, which gives us access to the event object. We can then use the getQuote() method on the event object to access the current quote object. In this example, we’ve added a custom attribute to the quote object and set its value. The Varien_Event_Observer class is part of the Magento core library.