_orderSummary = $orderSummary; } /** * @return array */ public function getOrderSummary() { return $this->_orderSummary; } public function isPaymentRequired() { $required = false; $summary = $this->getOrderSummary(); if ($summary && isset($summary['total']) && 0 != $summary['total']) { $required = true; }; return $required; } /** * Add type for service * * @param string $type * @param string $method * @param array $attribs * @return App_ECommerce_Checkout_Form_Service_Abstract * @throws Qs_Form_Exception */ protected function _addServiceType($type, $method, $attribs = array()) { $className = 'App_ECommerce_Checkout_Form_Service_Type_' . ucfirst($type) . '_' . ucfirst($method); if (class_exists($className)) { /** @var App_ECommerce_Checkout_Form_Service_Type_Abstract $classObject */ $classObject = new $className( $method . 'Methods', $this->getPluginLoader(self::DECORATOR), array('form' => $this) ); if (!$classObject instanceof App_ECommerce_Checkout_Form_Service_Type_Abstract) { throw new Qs_Form_Exception($className . ' must be instance of App_ECommerce_Checkout_Form_Service_Abstract'); } $classObject->addAttribs($attribs); foreach ($classObject->getElements() as $element) { /** @var Zend_Form_Element $element */ $element->setBelongsTo($method); } $this->_addDisplayGroupObject($classObject); } return $this; } /** * Return config object for checkout * * @param string $section * @return Zend_Config */ protected function _getConfig($section) { if ($this->_config === null) { $this->_config = Qs_Application::getConfig('ECommerce_Checkout'); } $sectionConfig = $this->_config->get($section); if ($sectionConfig !== false) { $sectionConfig = $sectionConfig->toArray(); } return $sectionConfig; } public function reinitData($data) { return $this; } }