Page 1 of 1

[opencart4.0.0.0] alert is not working

Posted: Thu Jun 30, 2022 3:08 pm
by arhatron
After trying, I found the problem is common.js

Code: Select all

alert(1);
// Alert Fade
var alert = function () {
    window.setTimeout(function() {
        $('.alert-dismissible').fadeTo(1000, 0, function() {
            $(this).remove();
        });
    }, 7000);
}
alert(2);

$(document).ready(alert);
$(document).on('click', 'button', alert);
Before the var, alert, ok. After that, not ok. How to make normal alert work?

Re: [opencart4.0.0.0] alert is not working

Posted: Thu Jun 30, 2022 7:40 pm
by JNeuhoff
This one of many OpenCart 4.0.0.0 bugs. You shouldn't use OpenCart 4.0.0.0 for a live site yet.
The quickest way to fix it is by commenting out the var alert = function () {...} function in the common.js.

Or have you tried the latest fix: https://github.com/opencart/opencart/co ... b87514cc88 ?