【问题标题】:Magento: Move Paypal Express button on shopping cartMagento:移动购物车上的 Paypal Express 按钮
【发布时间】:2014-10-23 03:10:57
【问题描述】:

我有一个启用信用卡和 paypal 快递结帐作为付款方式的 magento 网站,但在我的购物车上,Paypal Express 结帐按钮显示在“继续结帐”按钮的顶部,我希望这个反过来。

我已在“付款方式”部分更改了这两种方法的“排序”顺序,但这不起作用。

我怎样才能做到这一点?

【问题讨论】:

  • 你想完成什么exaclty请详细说明。你的问题不清楚。
  • @aton1004:在我的购物车页面上,在显示在总计下方的结帐按钮上,我希望“继续结帐”按钮位于“使用贝宝结帐”按钮的顶部。

标签: magento paypal magento-1.8


【解决方案1】:

如果您只想更改按钮的位置,那将没什么大不了的。我的意思是说这很简单,你只需要改变方块的位置。

转到布局文件,即paypal.xml,它位于“app/design/frontend/base/default/layout/paypal.xml”。在这里你应该搜索代码sn-p

<reference name="checkout.cart.methods">
            <block type="paypal/express_shortcut" name="checkout.cart.methods.paypal_express.bottom" before="-" template="paypal/express/shortcut.phtml">
                <action method="setIsQuoteAllowed"><value>1</value></action>
            </block>
        </reference>

这里将“之前”文本更改为“之后”。现在您可以在前端检查,您可能会看到在继续结帐按钮后显示 paypal 按钮。

我的一个建议是不要对核心文件进行更改。首先将 paypal.xml 文件覆盖为您自己的主题,然后对其进行更改。这是最佳实践。

希望这会有所帮助。

【讨论】:

    【解决方案2】:

    除了@aton1004 的回答之外,我还需要另一行 XML 来移动继续出现在 PayPal 按钮下方的单词“- OR -”(显然,一旦 PayPal 按钮是底部选项,单词 'OR ' 需要出现在 PayPal 按钮上方。)因此,我的 paypal.xml 中的最后一个 XML 块是:

    <reference name="checkout.cart.methods">
        <block type="paypal/express_shortcut" name="checkout.cart.methods.paypal_express.bottom" after="-" template="paypal/express/shortcut.phtml">
            <action method="setIsQuoteAllowed"><value>1</value></action>
            <action method="setShowOrPosition"><value>before</value></action>
        </block>
    </reference>
    

    【讨论】:

      猜你喜欢
      • 2016-09-14
      • 2015-11-13
      • 2016-09-28
      • 2011-10-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-04-01
      • 1970-01-01
      相关资源
      最近更新 更多