Contents
How to show success message in session Magento?
The above layout update will make use of the magento’s message template to display the messages. I hope this will help you fixing your issue. You can try below code to add success or error Messages.
What is the messagemanager object in Magento 2?
The messageManager object is responsible for messaging in Magento 2. It means that you need to get its instance to write messages. The preferred way is the following: you have to inject this class into your class by adding the following snippet to your __construct method:
Where are the addproduct and index pages in Magento?
Both the index and the addProduct pages are in MyAccount, if that has anything to do with it. The error message that it should show and redirect to the addProduct page is after the user clicks the submit button for the form. If it redirects to the index form, either success or failure messages will show.
How to display success or error message into home page?
Re: How can i display success or error message into home page in custom theme layout ? Messaging in Magento 2 is handled by a message manager object. So if you want to write messages, you need to get an instance of it. The prefered method is to inject this class into your class by adding this to your __construct method:
What’s the problem with Magento 2.0.2?
I’m getting a weird behavior using Magento 2.0.2, it’s described here as steps: On ‘Sign in’ front page, as customer if I type a wrong username/password I get redirected to the same page (normal) but Magento doesn’t display any error message (abnormal), I was expecting “Invalid login or password” from LoginPost.php .
Why do I get invalid login message in Magento?
Also, if the customer had in his car items from a previuos session, the orange square to the right of the cart icon doesn’t show any amount. Then, if I add any item to the cart I get the message ‘You added xxx to your shopping cart’ (normal) but not only this but also I get the previous ‘Invalid login’ message (abnormal).
@bb8d clearing cookies should be performed after upgrading. @sengaigibon there are two internal tickets that should solve your problem and will be delivered soon (MAGETWO-46014 and MAGETWO-49449) @sevos1984 cookies and local storage was cleaned.