space Baylys
Just practicing to pass the Turing test.
space
space
space
space
Developer for Hire!
space
addedValues Plugin
space

Home

What's new

Bayly.Root

Cornershop Plugin

space

Installing Cornershop

Configuring Cornershop

The Cornershop Macros

Cornershop RPChandlers

The Forex Plugin

space
space

Forex Home

Forex Preferences

Forex Configuration

Forex RPChandlers

space

The ShopFitter Plugin

Building a Shop with Metadata

Reference Sites and Links

Affiliates

callbacks

Career

edutools Root

Enhancements

Interests

linguist Plugin

Manila

Patches

Patches by Group

Papers

Sales

Sign My Guestbook

User(land) Relations.

Contact Address

Search Baylys

urlchains

space
Join Now
Login
space space space

The Forex Plugin

Forex is part of the cornershop root. It allows the Managing Editor of a website to create and maintain a table of exchange rates. Its use is entirely optional, the cornershop plugin as shipped does not make reference to forex macros or scripts.

Each entry in the table is indexed by its country code , which is meant to suggest a 2 character letter code, such as US, EU, etc. There is no practical limit on the number of currencies supported.

3 RPC entry points are supported, see Forex RPChandlers.

Values in the table of a website, are accessed using 2 macros.

currencyConvert(amount, toCurrency, fromCurrency = "NZ")

This macro returns the product of the amount and the exchange rate for conversion between fromCurrency and toCurrency as a number - it does the conversion.

currencyConvertString(amount, toCurrency, fromCurrency = "NZ")

This macro returns the product of the amount and the exchange rate for conversion between fromCurrency and toCurrency as a string with the formatting and currency symbol defined on the configuration page.