1
votes

I have a magento website with credit card and paypal express checkout enabled as payment methods, but on my shopping cart the Paypal Express checkout button is shown on TOP of the "proceed to checkout" button, I want this to be the other way around.

I have changed the "sort" order of both methods on the "payment methods" section but that didn't work.

How can I accomplish this?

2
What exaclty you want to accomplish please elaborate.your question is not clear.aton1004
@aton1004: On my shopping cart page, on the checkout buttons that are displayed under the totals, I want the "Proceed to checkout" button to be on TOP of the "Checkout with paypal" button.Ox3

2 Answers

2
votes

If you only want to change the position of the buttons than that will not be a great deal. I meant to say that it is pretty easy.You will only need to change the position of the block.

Go to the layout file i.e paypal.xml which is located in "app/design/frontend/base/default/layout/paypal.xml".Here you should search for the code snippet

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

Here change the "before" text to "after".Now you can check on frontend and you may see that the paypal button shows after proceed to checkout button.

One suggestion of mine is not to make changes to the core file.First overide the paypal.xml file to your own theme and then make changes to it.It is the best practice.

Hope this will help.

0
votes

In addition to the answer by @aton1004, I needed another line of XML to move the word '- OR -' which continued to appear below the PayPal button (obviously once the PayPal button is the bottom option, the word 'OR' needed to appear above the PayPal button.) Hence the final XML block in my paypal.xml was:

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