loadLayout(); $block = $this->getLayout()->createBlock('Mage_Core_Block_Template','droppoints',array('template' => 'pacsoft/droppoints.phtml','reference name' => 'left')); $this->getLayout()->getBlock('content')->append($block); $this->renderLayout(); } public function getDroppointsFromPostalCodeAction() { $this->getResponse()->setHeader('Content-type', 'text/json; charset=UTF-8'); $params = $this->getRequest()->getParams(); if(isset($params['postalCode']) && $params['postalCode'] && isset($params['countryCode']) && $params['countryCode']) { $result = Mage::getModel('pacsoft/droppoint')->getDroppointJson($params['postalCode'],$params['countryCode']); $this->getResponse()->setBody($result); } else { $result = json_encode($params); $this->getResponse()->setBody($result); } } public function updateAction() { $event = new Varien_Object(); $quote = Mage::getModel('checkout/cart')->getQuote(); $event->setQuote($quote); Mage::getModel("pacsoft/observer")->saveData($event); } }