ZenCart Ecommerce Store: Web Page Redirect Loop Error, CEON advshipper
During verifying some upgrades I had made to a ZenCart store I ran into some issues during checkout with a couple accounts. The issue was that my browser would get caught in a redirect loop after I added contents to my shopping cart and then attempted to checkout. At first I thought the issue may be with the checkout_process.php file as it was one of the files I had upgraded recently though after a more troubleshooting I determined this was not the case.
Locating the Issue:
I ended up enabling the Debug Error Logging Utility, which is a ZenCart addon, to locate the issue. Once this addon was enabled I got more information from the myDEBUG logs that were generated into the cache directory. They pointed me to CEON’s advshipper module, or the Advanced Shipper Module, as the root of the issue. I was confused because I had not installed this module recently and it had not been upgraded at all. There were some files that touched shipping templates and the checkout process that had been upgraded so I thought it might be related to these. I did however realize that I had not tested a full checkout before the upgrade so this could have been an issue all along.
Explanation of the Issue:
After making a duplicate copy of the store I checked in the ZenCart store admin and sure enough the advshipper module had only been configured for certain countries. The account shipping address I was attempting to checkout with was not one of these countries. In testing I added a shipping zone for the country of the account and was able to checkout without issue. It would be nice if countries that did not have shipping zones were handled a little more gracefully however you can simply resolve this by creating a default zone that catches all countries but doesn’t provide a shipping rate.
A note about browsers and running into redirect loop errors. In my case Internet Explorer reported no error and simply displayed a blank web page instead of notifying me of the error. After a certain number of redirects both Safari and FireFox displayed that there was a redirect loop and to contact the web site administrator to notify them of the issue. I was able to gather even more information using the FireFox extension called FireBug.
If you run into this issue during checkout with a ZenCart store and you have the CEON advshipper module installed simply check the shipping zones to make sure the shipping address of the account you are checking out with is installed.