Sep 11, 2008
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)".
[ Leave a Comment ]
Jul 29, 2008
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 ]