Prints the notifications that are automatically generated by MyCashflow based on customer actions and the status of the online store.

Description

This tag is required. If you don't include the tag in your store theme, it'll be much more difficult to use and maintain your online store.

You can limit the number of notifications that should be printed by using the group and name attributes.

By default, the tag prints all notifications produced during page loading.

The output format of the tag can be set as HTML or JSON by using the return attribute.

See also the description of notifications produced by MyCashflow.

Syntax

{Notifications(
    group: string,
    name: string,
    return; string
)}

Scope

Required scope: globaali

Tags with global scope can be used on any template and in any tag.

Examples

{Notifications(
    name: 'LoginFailed'
)}

{Login(
    before: '<h1>Log in</h1>'
)}

In the example, the {Notifications} tag is used for displaying errors that occurred during customer login.

The login form can be printed by using the {Login} tag.

Attribuutit

group:

The identifier of the notification group to be printed

See the notification group table for allowed values.

Allowed values: string

E.g. {Notifications(group: 'Cart')}

name:

The identifier of a single notification to be printed

See the notification table for allowed values.

Allowed values: string

E.g. {Notifications(name: 'CartUpdated')}

return:

Defines the output format of the tag.

Allowed values:
  • html (default value)
  • json

E.g. {Notifications(return: 'json')}

after/before:

By using the after and before attributes you can define content that is output either after or before the tag's output.

Allowed values:The HTML and Interface markup

E.g.

  • before: '<p>Tämä merkkaus näkyy ennen tagin omaa sisältöä.</p>'
  • after: '<p>Tämä taas näkyy tagin oman sisällön jälkeen.</p>'

If the tag does not produce any content, neither the content of the after and before attributes will be output.

escape:

Adds an escape character before quotation marks in the output.

The attribute makes it easier to process the tag-produced content when using JavaScript.

Allowed values:true/false. The default value is false.

or:

Defines alternative content that is displayed if the tag itself does not produce any content.

Allowed values:The HTML and Interface markup

E.g. or:'Sisältöä ei löytynyt.'