Macromap Object

The Macromap object allows to specify template variables and expand input strings with their current values.

Members Table

    The following table lists the members provided by the Macromap object.

    Methods Description
    Expand Expands current template text with template variables.
    Get Gets a template variables value.
    Set Defines a new or updates an existing template variable.

    This object has some predefined auto-updating template variables:
    $(Date)           current date
    $(Time)           current time
    $(ComputerName)   terminal name
    $(ComputerGuid)   computers unique identifier
    $(SenderEmail)    senders email address
    $(Sales)          accumulated sales since session start
    $(Balance)        sessions current balance
    $(CurrencySymbol) symbol of current currency
    The ReceiptSettings Object provides a TemplateText Property which takes advantage of them.
    The following example shows how to format text with the help of the Macromap object.

    <SCRIPT TYPE="text/javascript">
    var SiteCash = SiteKiosk.Plugins('SiteCash');
    if (SiteCash.Enabled)
       var Macromap = SiteCash.Macromap;
       Macromap.Set("RemainingSurftime", SiteCash.RemainingSurftime);
       alert(Macromap.Expand("You currently have a balance"
           + " of $(CurrencySymbol) $(Balance), allowing you"
           + " to surf $(RemainingSurftime) seconds."));

Applies to
    SiteKiosk v7.2 (and later versions).

Back to top