call to replace anchor tags contains '/admin' in href

Editing Notifications

StoreHippo allows you to edit the content of the notifications and modify them as per your brand requirement.

Handlebars

StoreHippo uses Handlebars as the programming language for notifications. For more details, please refer handlebarsjs.

Simple Usage

Handlebars templates look like regular HTML, with embedded handlebars expressions. A handlebars expression is{{,some contents, followed by a }}.

<div class="entry">
  <h1>{{title}}</h1>
  <div class="body">
    {{body}}
  </div>
</div>

Handlers

Handlers allow you to execute some logic on the data. StoreHippo provides a number of built-in handlers in addition to the ones provided with Handlebars.

Built-in Handlers on Storehippo

Currency

It is used to display the default currency symbol of the store. If any currency is not selected, then Rs will be displayed. 

Example 

{{currency 'Rs' order.total}}

Date

It returns the format of the date.

Examples

{{date order.created_on}} 
{{date order.created_on 'dd/mm/yy'}}

You can show the date in three formats:

  • data-month-year: dd/mm/yy 
  • month-date-year: mm/dd/yy
  • year-month-date: yy/mm/dd

 You can also display the date/Time in Indian Standard Timezone :

 {{date created_on 'dd-MMMM-yy'}}

resolveStorePath

It returns the full CDN path of the image path.


Example

{{resolveStorePath product.images[0}.image}}

compare

It is used to check a particular condition.


Example

{{#compare order.total "1000" operator=">"}}  {{/compare }}

resolveCdnPath

It returns thecdnpath that is used to display the store logo.


Example

{{resolveCdnPath store.logo}}

Math Handlers

plus

How to add and show the sum of two numbers.


Example

{{plus order.total 1000}}

minus

How to show the difference of two numbers


Example

{{minus order.total 1000}}

Conditionals and Looping handlers

each

Iterate through items in an array

{{#each order.items}}
   {{this.name}}
   {{this.price}}
{{/each}}

if 

It is used to check if the value exists.


Example

{{#if order.items.length}} {{/if}}
2020-01-29T11:10:53.643Z