[M235, v2.2.4] How to increase the amount of time the error message is displayed?

Created by Aiden Hua, Modified on Thu, 06 Jul 2023 at 02:52 PM by Aiden Hua

QUESTION:

Would it be possible to increase the amount of time that the error message is displayed (or make it stay permanent) as lots of customer are complaining that they don't get to see it properly as they are using mobile devices for orders and missing the message when credit card declined.

 

SOLUTION:

 I would like to share you the solution of increasing the amount of time that the error message is displayed below:

 

- In the file: app/code/Bss/OneStepCheckout/view/frontend/requirejs-config.js, please add this part in the mixins

'Magento_Ui/js/view/messages': 

{      'Bss_OneStepCheckout/js/view/messages-mixin': true }


like this:


 

- In path app/code/Bss/OneStepCheckout/view/frontend/web/js/view/messages-mixin.js, please add the file: messages-mixin attached below

Here is the result: https://www.loom.com/share/900fcec179294dcdb0188c2ea1565ded 


- If you want to change the amount of time that the error message is displayed, please modify in this part: modify in this code part below: (1000 = 1s) 

 


If you need any further assistance, please feel free to contact us.

Please visit our site for more useful Magento 2 Extensions: https://bsscommerce.com/magento-2-extensions.html

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article