当前位置: 首页>>代码示例>>PHP>>正文


PHP Mage_Core_Block_Abstract::_toHtml方法代码示例

本文整理汇总了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;
 }
开发者ID:picode-eu,项目名称:nti_mage,代码行数:27,代码来源:Payment.php

示例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;
 }
开发者ID:onepica,项目名称:avatax,代码行数:19,代码来源:Available.php

示例3: _toHtml

 /**
  * get html output
  *
  * @return string
  */
 protected function _toHtml()
 {
     parent::_toHtml();
     return self::EVENTS_HTML_PLACEHOLDER;
 }
开发者ID:netresearch,项目名称:Mage-Devtool,代码行数:10,代码来源:Placeholder.php


注:本文中的Mage_Core_Block_Abstract::_toHtml方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。