本文整理汇总了PHP中Mage_Payment_Block_Form_Cc::_prepareLayout方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Payment_Block_Form_Cc::_prepareLayout方法的具体用法?PHP Mage_Payment_Block_Form_Cc::_prepareLayout怎么用?PHP Mage_Payment_Block_Form_Cc::_prepareLayout使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Payment_Block_Form_Cc
的用法示例。
在下文中一共展示了Mage_Payment_Block_Form_Cc::_prepareLayout方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _prepareLayout
protected function _prepareLayout()
{
if (Mage::app()->getLayout()->getBlock('head')) {
Mage::app()->getLayout()->getBlock('head')->addLinkRel('stylesheet', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css');
Mage::app()->getLayout()->getBlock('head')->addCss('css/payfort/merchant-page.css');
Mage::app()->getLayout()->getBlock('head')->addJs('payfort/payfort_fort.js');
}
return parent::_prepareLayout();
}
示例2: _prepareLayout
/**
* Insert module's javascript on rendering, only if it wasn't inserted before
* @return Mage_Core_Block_Abstract
*/
protected function _prepareLayout()
{
//adicionaremos o JS do pagseguro na tela que usará o bloco de cartao logo após o <body>
$head = Mage::app()->getLayout()->getBlock('after_body_start');
if ($head && false == $head->getChild('js_pagseguro')) {
$scriptBlock = Mage::helper('ricardomartins_pagseguro')->getPagSeguroScriptBlock();
$head->append($scriptBlock);
}
return parent::_prepareLayout();
}
示例3: _prepareLayout
protected function _prepareLayout()
{
//pega public key para settar no aquivo mercadopago.js
$model = Mage::getModel('mercadopago/custom_payment');
$public_key = $model->getConfigData('public_key');
//init js no header
$block = Mage::app()->getLayout()->createBlock('core/text', 'js_mercadopago');
$block->setText(sprintf('
<script type="text/javascript">var PublicKeyMercadoPagoTransparent = "' . $public_key . '";</script>
<script type="text/javascript" src="%s"></script>', Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS, true) . 'mercadopago/mercadopago.js'));
$head = Mage::app()->getLayout()->getBlock('after_body_start');
if ($head) {
$head->append($block);
}
return parent::_prepareLayout();
}
示例4: _prepareLayout
protected function _prepareLayout()
{
// Mage::app()->getLayout()->getUpdate()->addHandle('pagseguro');
//adicionaremos o JS do pagseguro na tela que usará o bloco de cartao logo após o <body>
$scriptblock = Mage::app()->getLayout()->createBlock('core/text', 'js_pagseguro');
$scriptblock->setText(sprintf('
<script type="text/javascript">var RMPagSeguroSiteBaseURL = "%s";</script>
<script type="text/javascript" src="%s"></script>
<script type="text/javascript" src="%s"></script>
', Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK, true), Mage::helper('ricardomartins_pagseguro')->getJsUrl(), Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS, true) . 'pagseguro/pagseguro.js'));
$head = Mage::app()->getLayout()->getBlock('after_body_start');
// Mage::app()->getLayout()->getBlock('head')->addJs('pagseguro/pagseguro.js');
if ($head) {
$head->append($scriptblock);
}
return parent::_prepareLayout();
}