Prints the notifications that are automatically generated by MyCashflow based on customer actions and the status of the online store.
Kuvaus
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.
Näkyvyys
Toimii näkyvyydessä: globaali
It is possible to use global visibility tags in any page template and within 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.
Sallitut arvot: stringE.g.
{Notifications(group: 'Cart')}name:The identifier of a single notification to be printed
See the notification table for allowed values.
Sallitut arvot: stringE.g.
{Notifications(name: 'CartUpdated')}return:Defines the output format of the tag.
Sallitut arvot:- html (default value)
- 'json':
E.g.
{Notifications(return: 'json')}before: / after:With these two attributes, you can define content that is output before or after the content produced by the tag.
Allowed values:text that may contain HTML and Interface markup.
E.g.
before:'<p>This markup appears before the tag's own content.</p>'.after:'<p>This appears after the tag's own content.</p>'
If the tag does not produce any content, the content of the
beforeandafterattributes will also not be displayed.escape:Adds escape characters to the content printed by the tag, making it easier to use the content in JavaScript code or JSON objects.
Sallitut arvot:- true: the attribute adds escape characters before quotation marks
- false: the attribute does nothing
- json: the attribute adds escape characters to the output, allowing the content to be used in JSON markup.
or:Defines alternative content that is displayed if the tag itself does not produce any content.
Allowed values:text that may contain HTML and Interface markup.
E.g.
or:'Content not found.'
