<img src="abc.png" />
    
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 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();
}​
2018-10-15T05:57:17.248Z