Magento 1.4.1.1 checkout problem with custom theme in magento 1.4.1.1 after selecting the payment method continue button doesnot work and onepage checkout become freezed.
If you are using Magento 1.4.1 or just upgraded any of your old Magento sites to the latest Magento version, then you may be getting a very weird error on your checkout page, that the checkout CONTINUE button on payment screen, either on Authorize.net or PayPal , just doesnt work.
The cause of this error is, Magento Team has introduced a new javascript file, which validates the credit card numbers, etc on the payment screen.
So, if you are using the default theme, then you should not get this problem.
But if you are using any custom theme, then you have to do some changes on your files.
Few symptoms of this problem is, you will see such errors,
Please verify the card with the issuer bank
or
Unable to initialize Express Checkout review.
or
CONTINUE button on Credit Card Form doesnt work.
I will give the instructions in details below, how to fix this issue :
Just add this js in your page.xml:
find <action method="addJs"><script>lib/ccard.js</script></action> under <block type="page/html_head" name="head" as="head">
replace it with
<action method="addJs"><script>prototype/prototype.js</script></action>
<action method="addJs" ifconfig="dev/js/deprecation"><script>prototype/deprecation.js</script></action>
<action method="addJs"><script>lib/ccard.js</script></action>
find <action method="addJs"><script>lib/ccard.js</script></action> under
<block type="page/html" name="root" output="toHtml" template="page/print.phtml">
<block type="page/html_head" name="head" as="head">
replace it with
<action method="addJs"><script>prototype/prototype.js</script></action>
<action method="addJs"><script>mage/translate.js</script></action>
<action method="addJs"><script>lib/ccard.js</script></action>
This must solve your complete problem .
But in case, its still not working, then here is another fix, which I got from another member from a forum,
I was experiencing the same issue: Nothing happens when you enter the credit card information and hit continue. After investigating with Firebug, it seemed that the method verifyCreditCard was not defined in validation.js.
You can fix this by pasting the following javascript code into validation.js under js->prototype in root folder:
/ Credit Card Validation Javascript
// copyright 12th May 2003, by Stephen Chapman, Felgall Pty Ltd
// You have permission to copy and use this javascript provided that
// the content of the script is not changed in any way.
function validateCreditCard(s) {
// remove non-numerics
var v = "0123456789";
var w = "";
for (i=0; i < s.length; i++) {
x = s.charAt(i);
if (v.indexOf(x,0) != -1)
w += x;
}
// validate number
j = w.length / 2;
k = Math.floor(j);
m = Math.ceil(j) - k;
c = 0;
for (i=0; i<k; i++) {
a = w.charAt(i*2+m) * 2;
c += a > 9 ? Math.floor(a/10 + a%10;) : a;
}
for (i=0; i<k+m; i++) c += w.charAt(i*2+1-m) * 1;
return (c%10; == 0);
}
Now you have to disable Mage_Centinel from backend system->configuration->advanced to make it work in mozilla and firefox.
But it will work on IE without disabling centinel module.
Thanks Buddy.
ReplyDeleteWorked like a charm for me.
I was using page.xml from ealier version that was not included lib/ccard.js .
To make it work make sure you have included all js files.
Thanks
Riti
thanks, you saved my life ...
ReplyDelete