Magento Checkout Redirects Back to Cart Page
Recently we had the task of transferring a Magento Installation over from a CPanel server to a Plesk server. The transfer would have been rather textbook if not for the failure on the onepage checkout after the transfer was complete.
Symptom:
After transferring to the new server, when placing an order the checkout page would always redirect to the cart page rather than complete the order. No error messages or exceptions displayed by Magento.
What Happened Next?
The logs, always the logs. Actually no, we wasted a little time checking nothing had been hard coded into the javascript files used by the one page checkout, as we had not created it originally. That was to no avail, so then we checked the logs and found the following in var/log/system.log:
[code]2011-05-30T21:55:20+00:00 ERR (3): Notice: Use of undefined constant MCRYPT_BLOWFISH - assumed 'MCRYPT_BLOWFISH' in /www/domain.com/httpdocs/lib/Varien/Crypt/Mcrypt.php on line 56
2011-05-30T21:55:20+00:00 ERR (3): Notice: Use of undefined constant MCRYPT_MODE_ECB - assumed 'MCRYPT_MODE_ECB' in /www/domain.com/httpdocs/lib/Varien/Crypt/Mcrypt.php on line 60[/code]
Instantly twigged that php5-mcrypt was not installed on the server. As Magento was not installed via the installer and transfered instead this was not spotted sooner.
Installed php5-mcrypt and the onepage checkout worked once again. Another successful transfer. Another happy client.
If you have the same issue, around a year ago we coincidently wrote a blog post on how to install php5-mycrypt on a linux server. It may be some use to you in this situation.
6 comments
But in our installation we have found the same thing as onepage checkout redirecting to cart page again i checked my phpinfo and found mcrypt is enabled.
Our installation was working fine but eventually it started throwing some error (Exception) across the whole store please help me in this as i have completely off after trying 1000E times for the solution
Paste the exception your seeing + a tail of your system.log file to pastebin and put the link here and we can take a look into what may be causing your issue.
Cheers
I reached your site while trying to find a solution for our issue, but it seems that your solution didn't work for us! Our problem is the same, after Placing Order, costumer is redirected to Cart, rather than completing the order. What is weird is that evertyhing was working fine, and suddenly this problem started to happen. Could you take a look for us, please?
http://pastebin.com/i1qSEjvw Thank you very much!
Do you have any alterations to your checkout or any other extensions installed, even if not related to the checkout process?
Cheers
This post has 7 feedbacks awaiting moderation...