
Here's my site url: http://www.sensibletshirts.com. Its still under construction. Whenever I go to the checkout/cart page and if i click on any links or buttons before the page is fully loaded, a javascript alert box shows up saying "Error". I'm also attaching a picture of the same. Can someone please help me with it? Thank you. 

Attachments
error.jpg (92.18 KiB) Viewed 1493 times
I know it's a very old question, found it when I was looking for the solution of this same issue. I have now fixed it on my store and posting solution here so that other people can be benefited with it.
To block this irritating alert coming on your store, just include below script in your website header.
<script>
(function() {
var new_alert = window.alert;
window.alert = function(str) { //str variable return content which is passed to be shown in alert
str1 = str.replace(/(\r\n|\n|\r)/gm,""); //Removing line break from string
if (str1 !="error"){ //show alert only if content is not equal to 'error'
new_alert(str);
}
else{
// do nothing
}
};
})();
</script>
If you are wondering what it does:
It replaces default alert function of javascript and don't show alert when its content is 'error'.
To block this irritating alert coming on your store, just include below script in your website header.
<script>
(function() {
var new_alert = window.alert;
window.alert = function(str) { //str variable return content which is passed to be shown in alert
str1 = str.replace(/(\r\n|\n|\r)/gm,""); //Removing line break from string
if (str1 !="error"){ //show alert only if content is not equal to 'error'
new_alert(str);
}
else{
// do nothing
}
};
})();
</script>
If you are wondering what it does:
It replaces default alert function of javascript and don't show alert when its content is 'error'.
its really great solution for the problem. I appreciate your effort
But i am wondering how does that error occur when it is not there in default opencart installation.
asking for information.
But i am wondering how does that error occur when it is not there in default opencart installation.
asking for information.
Who is online
Users browsing this forum: No registered users and 112 guests