There is already a ready store on opencart 3.

The problem is that sometimes in the item card, when adding a product to the cart, alerts of this type pop up http://prntscr.com/ng3z67 .

They do not affect the performance in any way and everything works correctly.

The second problem is that if the product has the required options and they are not specified, then after clicking the "add to cart" button the page reloads.

In common.js, I commented out the following:

In the add function:

if (json['redirect']) { location = json['redirect']; } 

In the add, update, and delete functions:

 alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); 

How to completely disable the error output in the alert on the whole site in any incomprehensible situations and remove the page reload?

    1 answer 1

    From personal experience with opencart : I did a search on the project and all the alert () translated into console.log () / console.dir () . So you do not lose mistakes, easier to debug. Of course, this should be done with a full understanding of what is happening.