Helpcenter +918010117117 https://help.storehippo.com/s/573db3149f0d58741f0cc63b/ms.settings/5256837ccc4abf1d39000001/57614ef64256dc6851749879-480x480.png" [email protected] https://www.facebook.com/StoreHippohttps://twitter.com/StoreHippohttps://www.linkedin.com/company/hippoinnovations/https://plus.google.com/+Storehippo/posts
B4,309-10 Spaze iTech Park, Sector 49, Sohna Road, 122001 Gurgaon India
call to replace anchor tags contains '/admin' in href

Messages

The support of message notifications to the customers about the events have been provided by StoreHippo platform.

StoreHippo provides you with well-defined messages for all the important events. However, you can also add custom messages of your choice. 

Go to the Advance Settings > Messages section in StoreHippo Admin Panel to access messages.

How to add custom messages?

To add new custom messages, click on Add New button in the top right corner. The following form appears:

Name

The name of the message.

Message

The message that you want to display on the storefront.

How to add a message to the API response?

The messages can be added to the API response using hooks or in custom commands handler. Both the hooks and custom command provide a response object that has a method called addMessage. It takes 3 arguments which are message name, level and the parameters.

addMessage(msgname,level,[params]){

}

  1. msgnameThe message added to the admin panel.
  2. level: There are 3 levels that are supported as of now which are error, warning and success. This changes how the message would be shown to the user.
  3. params (Optional): If you want to send some custom data with the message, then you can send in this.

Example

function(req,res,next){
   if(!req.data.test){
      res.addMessage("mycustommessage","error");
   }
   next();
}
2022-07-28T22:12:30.242Z