Magento onepage签出中缺少Paypal标签
我刚从magento 1.4.0升级到1.6。我有两种付款方式:贝宝和信用卡/借记卡 我的问题是,当我在相关单选按钮旁边获得信用卡/借记卡文本时,我在paypal单选按钮旁边没有获得任何paypal文本(标签)。我在paypal配置的标题中有一个描述,但这没有得到重视Magento onepage签出中缺少Paypal标签,magento,paypal,Magento,Paypal,我刚从magento 1.4.0升级到1.6。我有两种付款方式:贝宝和信用卡/借记卡 我的问题是,当我在相关单选按钮旁边获得信用卡/借记卡文本时,我在paypal单选按钮旁边没有获得任何paypal文本(标签)。我在paypal配置的标题中有一个描述,但这没有得到重视 有人能帮我吗?谢谢 虽然这不是理想的答案,但下面是我用来手动添加标签的快速修复方法。转到app/design/frontend/base/default/template/mark.phtml。我编辑了此文件,只需在PayPal图
有人能帮我吗?谢谢 虽然这不是理想的答案,但下面是我用来手动添加标签的快速修复方法。转到
app/design/frontend/base/default/template/mark.phtml
。我编辑了此文件,只需在PayPal图像之前添加一个文本标签:
<!-- PayPal Logo -->
Credit Card / PayPal <img src="<?php echo $this->escapeHtml($this->getPaymentAcceptanceMarkSrc())?>" alt="<?php echo Mage::helper('paypal')->__('Acceptance Mark') ?>" class="v-middle" />
<a href="<?php echo $this->getPaymentAcceptanceMarkHref()?>" onclick="javascript:window.open('<?php echo $this->getPaymentAcceptanceMarkHref()?>','olcwhatispaypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, ,left=0, top=0, width=400, height=350'); return false;"><?php echo Mage::helper('paypal')->__('What is PayPal?') ?></a>
<!-- PayPal Logo -->
信用卡/PayPal escapeHtml($this->getPaymentAcceptanceMarkSrc())?>“alt=”“class=“v-middle”/>
如果不希望在下一次升级中覆盖更改,也可以将该文件复制到app/design/frontend/default/yourtemplatedir/template/mark.phtml
理想的解决方案是首先找到创建标签的文件,然后在那里进行更改。此外,使用在配置设置中获取PayPal标题集的方法。但以上是我发现的第一个有效的快速修复方法。虽然这不是理想的答案,但这是我用来手动添加的快速修复方法标签。转到
app/design/frontend/base/default/template/mark.phtml
。我编辑了这个文件,只需在PayPal图像之前添加一个文本标签:
<!-- PayPal Logo -->
Credit Card / PayPal <img src="<?php echo $this->escapeHtml($this->getPaymentAcceptanceMarkSrc())?>" alt="<?php echo Mage::helper('paypal')->__('Acceptance Mark') ?>" class="v-middle" />
<a href="<?php echo $this->getPaymentAcceptanceMarkHref()?>" onclick="javascript:window.open('<?php echo $this->getPaymentAcceptanceMarkHref()?>','olcwhatispaypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, ,left=0, top=0, width=400, height=350'); return false;"><?php echo Mage::helper('paypal')->__('What is PayPal?') ?></a>
<!-- PayPal Logo -->
信用卡/PayPal escapeHtml($this->getPaymentAcceptanceMarkSrc())?>“alt=”“class=“v-middle”/>
如果不希望在下一次升级中覆盖更改,也可以将该文件复制到app/design/frontend/default/yourtemplatedir/template/mark.phtml
理想的解决方案是首先找到创建标签的文件并在那里进行更改。另外,使用在配置设置中获取PayPal标题集的方法。但以上是我发现的第一个有效的快速修复方法。我不更改
标记.phtml
文件,而是避免显示该文件
我将blockapp\code\core\Mage\Paypal\block\Standard\Form.php
复制到我的本地(app\code\local\…
)并进行了更改
protected function _construct()
{
$this->_config = Mage::getModel('paypal/config')->setMethod($this->getMethodCode());
$locale = Mage::app()->getLocale();
$mark = Mage::getConfig()->getBlockClassName('core/template');
$mark = new $mark;
$mark->setTemplate('paypal/payment/mark.phtml')
->setPaymentAcceptanceMarkHref($this->_config->getPaymentMarkWhatIsPaypalUrl($locale))
->setPaymentAcceptanceMarkSrc($this->_config->getPaymentMarkImageUrl($locale->getLocaleCode()))
; // known issue: code above will render only static mark image
$this->setTemplate('paypal/payment/redirect.phtml')
->setRedirectMessage(
Mage::helper('paypal')->__('You will be redirected to the PayPal website when you place an order.')
)
->setMethodTitle('') // Output PayPal mark, omit title
->setMethodLabelAfterHtml($mark->toHtml())
;
return parent::_construct();
}
到
添加自定义标题并删除标记文件。我希望避免显示该文件,而不是更改
标记.phtml
文件
我将blockapp\code\core\Mage\Paypal\block\Standard\Form.php
复制到我的本地(app\code\local\…
)并进行了更改
protected function _construct()
{
$this->_config = Mage::getModel('paypal/config')->setMethod($this->getMethodCode());
$locale = Mage::app()->getLocale();
$mark = Mage::getConfig()->getBlockClassName('core/template');
$mark = new $mark;
$mark->setTemplate('paypal/payment/mark.phtml')
->setPaymentAcceptanceMarkHref($this->_config->getPaymentMarkWhatIsPaypalUrl($locale))
->setPaymentAcceptanceMarkSrc($this->_config->getPaymentMarkImageUrl($locale->getLocaleCode()))
; // known issue: code above will render only static mark image
$this->setTemplate('paypal/payment/redirect.phtml')
->setRedirectMessage(
Mage::helper('paypal')->__('You will be redirected to the PayPal website when you place an order.')
)
->setMethodTitle('') // Output PayPal mark, omit title
->setMethodLabelAfterHtml($mark->toHtml())
;
return parent::_construct();
}
到
添加自定义标题并删除标记文件。似乎与软件开发无关。我也有同样的问题。它确实与软件开发b/c有关。解决方案很可能是挖掘Magento的代码以添加标签。似乎与软件开发无关。我也有同样的问题。它确实与软件开发b/c有关,解决方案很可能是挖掘Magento的代码以添加标签。