Custom error message on basket page

What I know how to do:

I have set up an observer to catch the event "Go to Checkout".Everything seems to work fine.I can make a check that I want and redirect back to the page with an error message.

What I don't know:

I want to have a better message than the error.Ideally I would like to make a propose to customer and return something like a table and a custom message and not the default error styled message.

Thanks in advance.


Just put in the error message whatever you want.

The template is this: app/design/frontend/base/default/template/core/messages.phtml and I don't see any reason to not just deliver whatever you want.

Similar questions

Showing recently viewed products on the basket page
Is it possible to show recently viewed products in the basket? i.e. a customer views product a, product b and product c. They add product b to their basket. When they view their basket I would like to show product a and product c underneath their basket.
Magento2 How to expand basket by default in order summary on checkout page?
on checkout page, can anyone help me, how do i by default expand product in order summary. Thanks
Set custom total row price in basket - Magento
I'm developing a B2B webshop in Magento. When adding a product to basket, it will call an external API to lookup discount based on the user, product, and quantity. Problem is that the API only returns the total discounted price. E.g. adding 10 items of $5 may return a total discountet price of $40. So ideally the shopping cart would show $5 x 10 = ...
Display message notification instead error message log Magento
In my cart observer, I block 1 item in the cart and then display a notification to the user something like "you could select just one item" the problem that it appears to be the error log Magento first then when I return to the home page. I find my message displayed. I just want to display it in my page and not also in the error log page or display...
Hide all success as well as error message message after some interval
I want to hide all success messages after some interval. I have added following code in messages.js but it will not work on Add to cart success message. In short it will not working on messages which come from Ajax call.
Magento 2 redirect back with message from controller, redirecting working fine but error message not showing
Messages do not appear after redirection. Tried many solutions but no luck. Here is the code I tried. I have created a fronted form with custom routing with URL params. And in sulkar_sktok_form.xml file into

Also ask

We use cookies to deliver the best possible experience on our website. By continuing to use this site, accepting or closing this box, you consent to our use of cookies. To learn more, visit our privacy policy.