0

error messages disappear quickly when updating quantities on the product detail page

I am using Magento 2.4.5 I have changed the code in the below files but there is no effect

/Magento_Ui/web/js/view/messages.js module-ui/view/frontend/web/template/messages.html

Magento_Customer/js/customer-data.js

could anyone please tell me how I can increase the time of error messages?

2 Answers 2

0

In this file vendor/magento/module-ui/view/frontend/web/js/view/messages.js you will find this code hideTimeout: 5000

Here 5000 = 5 seconds, so change accordingly and after that execute magento commands

7
0

magento245

onHiddenChange: function (isHidden) {
    // Hide message block if needed
    if (isHidden) {
        setTimeout(function () {
            $(this.selector).hide('blind', {}, this.hideSpeed);
        }.bind(this), this.hideTimeout);
    }
}

magento246

onHiddenChange: function (isHidden) {
    // Hide message block if needed
    if (isHidden) {
        setTimeout(function () {
            $(this.selector).hide('slow');
        }.bind(this), this.hideTimeout);
    }
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.