protected function _toHtml() { $standard = Mage::getModel('ep/initialize'); $code = 'payment_block_' . $standard->getCode(); $html = parent::_toHtml(); $html .= '<p class="redirect-payment">' . $this->__('Sunteţi redirecţionat către modulul de plată, unde veţi putea introduce detaliile cardului dvs pentru a putea finaliza tranzacţia.') . "</p>"; $html .= '<form name="' . $code . '" id="' . $code . '" method="POST" action="' . $standard->getUrl() . ($this->getNewwindow() ? ' target="' . strtoupper($code) . '"' : '') . '">'; $formFields = $standard->getCheckoutFormFields(); if (is_array($formFields)) { foreach ($formFields as $field => $value) { if (is_array($value)) { if (count($value)) { foreach ($value as $subvalue) { $html .= '<input type="hidden" name="' . $field . '[]" value="' . $subvalue . '" />' . "\n"; } } } else { $html .= '<input type="hidden" name="' . $field . '" value="' . $value . '" />' . "\n"; } } } $html .= '<p class="redirect-payment-button"><button type="submit">' . $this->__('Finalizează comanda') . '<sup>*</sup></button></p> <p class="redirect-payment"><sup>*</sup>' . $this->__('Daca nu sunteti redirectionat automat apasati "Finalizeaza comanda" pentru a putea finaliza tranzactia.') . '</p></form>' . "\n"; if ('www' == substr($_SERVER['HTTP_HOST'], 0, 3)) { $html .= '<script type="text/javascript">document.getElementById("' . $code . '").submit();</script>'; } return $html; }
/** * Overriding parent to insert session message block if an address has been validated. * * @return string */ protected function _toHtml() { $additional = parent::_toHtml(); if ($this->getAddress()->getAddressNormalized()) { $notice = Mage::helper('avatax/config')->getOnepageNormalizeMessage(Mage::app()->getStore()); if ($notice) { Mage::getSingleton('core/session')->addNotice($notice); $additional .= $this->getMessagesBlock()->getGroupedHtml(); } } elseif ($this->getAddress()->getAddressNotified()) { $additional .= $this->getMessagesBlock()->getGroupedHtml(); } return $additional; }
/** * get html output * * @return string */ protected function _toHtml() { parent::_toHtml(); return self::EVENTS_HTML_PLACEHOLDER; }