Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/magento/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/user-interface/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Magento:购物车,付款方式订购_Php_Magento - Fatal编程技术网

Php Magento:购物车,付款方式订购

Php Magento:购物车,付款方式订购,php,magento,Php,Magento,我运行的是1.9.x,有3种不同的支付方式,亚马逊支付、贝宝快捷、sage支付和继续购物按钮。在购物车页面上,我试图重新排序这些在结帐类型中的显示方式 我目前有以下我认为是默认的 <ul class="checkout-types"> <li><?php if($this->getContinueShoppingUrl()): ?> <button type="butt

我运行的是1.9.x,有3种不同的支付方式,亚马逊支付、贝宝快捷、sage支付和继续购物按钮。在购物车页面上,我试图重新排序这些在结帐类型中的显示方式

我目前有以下我认为是默认的

<ul class="checkout-types">
        <li><?php if($this->getContinueShoppingUrl()): ?>
                                <button type="button" title="<?php echo $this->__('Continue Shopping') ?>" class="button btn-continue btn-inline" onclick="setLocation('<?php echo $this->getContinueShoppingUrl() ?>')"><span><span><?php echo $this->__('Continue Shopping') ?></span></span></button>
                            <?php endif; ?></li>
        <?php foreach ($this->getMethods('top_methods') as $method): ?>
            <?php if ($methodHtml = $this->getMethodHtml($method)): ?>
             <li><?php echo $methodHtml; ?></li>
            <?php endif; ?>
        <?php endforeach; ?>
        </ul>

  • 将以下内容添加到签出布局可排序问题

    before="checkout.cart.methods.amazonpayments_pay.top"
    
    getMethods($name)
    方法实际上将用于对布局文件中的配置进行排序

    作为布局中的别名
    top\u methods
    的一个示例,它将从系统中的XML文件中查找该句柄上的所有更新,对于PayPal,它将是,考虑到RWD是您正在使用的软件包:
    app/design/frontend/rwd/default/layout/paypal.xml

    这是它的xml块部分:

        <block type="paypal/express_shortcut" name="checkout.cart.methods.paypal_express.top" before="checkout.cart.methods.onepage.top" template="paypal/express/shortcut.phtml">
            <action method="setIsQuoteAllowed"><value>1</value></action>
            <action method="setShowOrPosition"><value>after</value></action>
        </block>
    
    因此,总而言之,您需要做的是浏览您正在使用的支付方法的XML布局文件,然后。如果启用了缓存,则需要刷新它,并且应该得到预期的结果

    例如:

        <block type="core/text_list" name="checkout.cart.top_methods" as="top_methods" translate="label">
                <label>Payment Methods Before Checkout Button</label>
                <block type="checkout/onepage_link" name="checkout.cart.methods.onepage.top" template="checkout/onepage/link.phtml" after="-" />
        </block>