本文整理汇总了PHP中Mage_Core_Block_Abstract::_toHtml方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Core_Block_Abstract::_toHtml方法的具体用法?PHP Mage_Core_Block_Abstract::_toHtml怎么用?PHP Mage_Core_Block_Abstract::_toHtml使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Core_Block_Abstract
的用法示例。
在下文中一共展示了Mage_Core_Block_Abstract::_toHtml方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _toHtml
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;
}
示例2: _toHtml
/**
* 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;
}
示例3: _toHtml
/**
* get html output
*
* @return string
*/
protected function _toHtml()
{
parent::_toHtml();
return self::EVENTS_HTML_PLACEHOLDER;
}