我刚刚从magento 1.4.0升级到1.6。我有两种付款方式:paypal和信用卡/借记卡。PayPal标签丢失在onepage结帐
我的问题是,虽然我得到相关单选按钮旁边的信用卡/借记卡文本,但我没有收到贝宝单选按钮旁边的任何贝宝文本(标签)。我在paypal配置的标题中有一个描述,但是这没有得到提取。
任何人都可以帮助我吗?谢谢!
我刚刚从magento 1.4.0升级到1.6。我有两种付款方式:paypal和信用卡/借记卡。PayPal标签丢失在onepage结帐
我的问题是,虽然我得到相关单选按钮旁边的信用卡/借记卡文本,但我没有收到贝宝单选按钮旁边的任何贝宝文本(标签)。我在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 -->
可选,将该文件复制到app/design/frontend/default/yourtemplatedir/template/mark.phtml
,如果你不想让你的变化将在未来升级覆盖。
理想的解决方案是找到创建标签的文件,并在那里进行更改。此外,使用在配置设置中获取PayPal标题的方法。但以上是我发现的第一个快速解决方案。
而不是更改mark.phtml
文件,我prerer以避免显示该文件。
我复制块app\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();
}
到
... the same
...
$this->setTemplate('paypal/payment/redirect.phtml')
->setRedirectMessage(
Mage::helper('paypal')->__('You will be redirected to the PayPal website when you place an order.')
)
->setMethodTitle('Paypal (my title)');
return parent::_construct();
}
加入我的自定义标题和移除标记文件。
似乎与软件开发无关。 – Rob
我有同样的问题。它确实涉及软件开发b/c该解决方案很可能挖掘到Magento的代码来添加标签。 –