while working on OPC i found that i should let you know that another reason for the Invalid carier or Invalid country is that AJAX response may return a http code 500 as defined in onepage.js :
- Code: Select all
{
if (xmlhttp2.readyState==4 && xmlhttp2.status==500)
{
// here is the response from request
var resp = xmlhttp2.responseText;
if (resp != null)
{
resp+='<input type="hidden" name="invalid_country" value="invalid_country" />';
setShippingHtml(resp);
}
}
}
This issue can potentionally happen when your server is way too busy and your host blocks your customer's requests and returns error 500. OPC sets "invalid country" input tag which should get changed on the next address change. Ajax can cause more queries toward the server and threfore if you are experiencing error 500 during the high season on your site, you should be considering either change of hosting or ask for more similtaneous connections (maxrequests, etc..). Error 500 can also occur if your hosting does nore support .htaccess files outside the root and you may remove the .htaccess from the js directory /components/com_onepage/assets/js/.htaccess (used to to stop caching of onepage.js after OPC update)
You can comment the fail safe code above in /components/com_onepage/assets/js/onepage.js
- Code: Select all
...
if (xmlhttp2.readyState==4 && xmlhttp2.status==500)
{
// do nothing
}
...