Waverider Systems

http://www.WaveriderSystems.com

Perlshop 4 Currency Converter Plugin
Version 1.0

This plugin requires Perlshop 4.5.01 or later.


Overview:

This plugin converts currency from one form to another (i.e. USD to EUR, etc).

NOTE: Your web server must have the Finance::Currency::Convert::Yahoo Perl library module installed in order to use this Perlshop plugin.


Installation Procedure:

  1. Place the PS_CurrencyConverter.pm file into the same web server directory as your perlshop.cgi file.
  2. Give the PS_CurrencyConverter.pm file the same file permissions as your perlshop.cgi file.
  3. Add the Currency Converter plugin to the plugin registration table in your ps.cfg file.

Example plugin registration table before adding the Currency Converter plugin:

# Plugin modules.  See the external documentation for details.
%plugins =
(
    # Calendar example plugin
    'calendar'  => 
    {
        'program'    => 'ps_plugin_gencal.pl'
    }
);

Example plugin registration table after adding the Currency Converter plugin:

# Plugin modules.  See the external documentation for details.
%plugins =
(
    # Currency Converter plugin
    'currency_converter'    =>
    {
    'module'    =>    'PS_CurrencyConverter.pm',
    'event'     =>    'currency_converter',
    'display'   =>    'no'
    },

    # Calendar example plugin
    'calendar' => 
    {
        'program'   =>     'ps_plugin_gencal.pl'
    }
);


Using the Currency Converter plugin:

This plugin is called directly from within your catalog web pages. The plugin may be called as many times as needed within a given catalog web page.

The plugin is used as follows:

<!--#plugin currency_converter amount from to format-->

Where:

Examples:

  1. This call will convert $1 US dollar into Canadian dollars:
    <!--#plugin currency_converter 1 USD CAD-->
  2. This call will convert $3.25 US dollars into Euros:
    <!--#plugin currency_converter 3.25 USD EUR-->
  3. This call will convert $10 Canadian dollars into Mexican pesos:
    <!--#plugin currency_converter 3.25 CAD MXN-->