PricePerSecond Property



 
The PricePerSecond property contains the price per second.


Syntax

    SiteCashZone.PricePerSecond [=long]
    
Possible Values
    Long value that specifies or retrieves the price.

    The property is read/write.
Remarks
    This is the current price per second if the ChargeMode is not 3.
Examples
    The following example shows the real price per second of the last existing zone in an alert window.

    <SCRIPT TYPE="text/javascript">
    window.external.InitScriptInterface();
    if (SiteKiosk.Plugins("SiteCash").Zones.Count > 0)
    {
       lastIndex = SiteKiosk.Plugins("SiteCash").Zones.Count;
       lastZone = SiteKiosk.Plugins("SiteCash").Zones.Item(lastIndex);
       switch (lastZone.ChargeMode)
       {
          case 0:
            alert("This zone is for free");
            break;
          case 1:
            price = lastZone.PricePerSecond;
            alert("You pay per second: " + price);
            break;
          case 2:
            price = lastZone.PricePerSecond;
            alert("You get per second: " + price);
            break;
          case 3:
            cprice = SiteKiosk.Plugins("SiteCash").PricePerHour / 60;
            price = cprice * lastZone.Multiplier;
            alert("You pay per second: " + price);
            break;
       }
    }
    else alert("There are no zones available.");
    </SCRIPT>
    

Applies to
    SiteKiosk v6.0 (and later versions).

Back to top