sim.plified.com

Chris Pollock

Chris Pollock - web developer (PHP/mySQL & ASP.NET)
undivided… my thoughts on world, family, church, business, technology and Jesus Christ (all in all)

Magento: Jump back to Payment Screen when Payment Declined

On my installation of Magento, I wanted to return the user to the payment screen when their card was declined.  This is a bit of a hack, but it does work.  I simply inserted some custom JavaScript into the opcheckout.js file which is located in /skin/frontend/default/default/js/

I searched my error message for the word "declined" and based on that, push the user back to the payment screen just before showing the alert box.

if (msg.indexOf("declined") > -1)
{
     checkout.accordion.openSection('opc-payment');
}

I insert this around line 760, right before the "alert(msg)".

 

Technorati Tags:

[ Leave a Comment ]

Magento Custom.css

I am making the switch to Magento.  In the process I'm sure I'll be learning a lot.  I'm going to be posting what I learn here for a couple of reasons:

1. for my own documentation, so I can look back and see what I did
2. for your instruction, if you run into the same problem I did I hope this helps.

Custom.css is not included by default.

Add the following line to your page.xml

<action method="addCss"><stylesheet>css/custom.css</stylesheet></action>

Then you will need to update your cache

Go to the Admin.  Click System >> Cache Management.  Select "Refresh" from the list and click save in the upper right. 

At this point, any changes you see in custom should start appearing in you site.

[ Leave a Comment ]

,

Things I see

IMG_0805IMG_0804IMG_0750IMG_0749IMG_0805IMG_0804IMG_0799IMG_0793IMG_0789IMG_0775IMG_0772IMG_0768IMG_0764IMG_0762IMG_0761

Chris Pollock

Web Developer - proficient in both PHP and ASP.NET.
Rochester, New York

View my web developement site.

View Chris Pollock's LinkedIn profile

My Pictures

IMG_0805IMG_0804IMG_0750IMG_0749IMG_0805IMG_0804IMG_0799IMG_0793IMG_0789IMG_0775IMG_0772IMG_0768IMG_0764IMG_0762IMG_0761