单页结帐中缺少 Paypal 标签

发布于 2024-12-09 02:15:01 字数 175 浏览 0 评论 0原文

我刚刚从 magento 1.4.0 升级到 1.6。我有 2 种付款方式:贝宝和信用卡/借记卡。

我的问题是,虽然我在相关单选按钮旁边获取信用卡/借记卡文本,但在 Paypal 单选按钮旁边却没有获取任何 Paypal 文本(标签)。我在贝宝配置的标题中有一个描述,但没有被采纳。

谁能帮助我吗?谢谢!

I just upgraded from magento 1.4.0 to 1.6. I have 2 payment methods: paypal and credit/debit card.

My issue is that whilst I am getting the credit/debit card text next to the relevant radio button, I am NOT getting any paypal text (the label) next to the paypal radio button. I have a description in the title in paypal config but this is not getting picked up.

Can anyone help me? Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

苄①跕圉湢 2024-12-16 02:15:01

虽然这不是理想的答案,但这是我用来手动添加标签的快速修复方法。转到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 标题的方法。但以上是我发现有效的第一个快速修复方法。

Although this isn't the ideal answer, here's the quick fix I used to manually add in the label. Go to app/design/frontend/base/default/template/mark.phtml. I edited this file, simply adding a text label before the PayPal image:

<!-- 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 -->

Optionally, copy that file to app/design/frontend/default/yourtemplatedir/template/mark.phtml if you don't want your change to be overridden in the next upgrade.

The ideal solution would be to find the file that creates the label in the first place and make the change there. Also, using the method that gets the PayPal title set in the configuration setting. But the above is the first, quick fix I found that works.

为你鎻心 2024-12-16 02:15:01

我不想更改 mark.phtml 文件,而是避免显示该文件。

我将块 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();
}

添加我的自定义标题并删除标记文件。

Instead of changing the mark.phtml file, I prerer to avoid displaying that file.

I copied the block app\code\core\Mage\Paypal\Block\Standard\Form.php to my local (app\code\local\...) and changed

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();
}

to

... 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();
}

adding my custom title and removing the mark file.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文