Waverider Systems
http://www.WaveriderSystems.com
Perlshop 4 Affiliate CSV Plugin
Version 1.1
This plugin requires Perlshop 4.3.00 or later.
--------------------------------------------------------------------------------------
Installation Procedure:
1. Place the PS_Affiliate_CSV.pm file into the same web server directory as your perlshop.cgi file.
2. Give the PS_Affiliate_CSV.pm file the same file permissions as your perlshop.cgi file.
3. Add the Affiliate plugin to the plugin registration table in your ps.cfg file.
Example plugin registration table before adding the Affiliate 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 Affiliate plugin:
# Plugin modules. See the external documentation for details.
%plugins =
(
# Affiliate plugin
'affiliate' =>
{
'module' => 'PS_Affiliate_CSV.pm',
'event' => 'after_enter_shop|after_place_order',
'display' => 'no',
'period' => 'month',
'subdirectory' => 'affiliate_data'
},
# Calendar example plugin
'calendar' =>
{
'program' => 'ps_plugin_gencal.pl'
}
);
--------------------------------------------------------------------------------------
Optional ps.cfg Affiliate CSV plugin configuration settings:
'period'
This value is optional, and has four possible settings. Possible values are 'day', 'month', 'quarter', and 'year'. See below for details.
'subdirectory'
This value is optional, and is used to specify the subdirectory that will be used to hold the affiliate data tracking files. If this option is left out, the affiliate data tracking files will be stored in same directory as the perlshop.cgi file.
--------------------------------------------------------------------------------------
Using the Affiliate CSV plugin:
Once installed, this plugin will be automatically used by Perlshop. No catalog page modifications are required.
All site hits from affiliates will be stored in file affiliate_hits.csv. Column values are:
- Affiliate ID
- Invoice ID
- Date and Time
All sales from affiliates will be stored in file affiliate_sales.csv. Column values are:
- Affiliate ID
- Invoice ID
- Date and Time
- Item subtotal
--------------------------------------------------------------------------------------
Affiliate CSV File Names
By default, the Affiliate Site Hit tracking file will be named 'affiliate_hits.csv', and the Affiliate Sales Tracking file will be named 'affiliate_sales.csv'.
If the plugin 'period' parameter is set to 'year', the default affiliate data file names will have the current year added to them. Example: 'affiliate_sales_2000.csv'
If the plugin 'period' parameter is set to 'month', the default affiliate data file names will have the current year and month added to them. Example: 'affiliate_hits_2001_01.csv'
If the plugin 'period' parameter is set to 'day', the default affiliate data file names will have the current year, month, and day added to them. Example: 'affiliate_hits_2001_01_27.csv'
If the plugin 'period' parameter is set to 'quarter', the default affiliate data file names will have the current year and business quarter added to them. Example: 'affiliate_sales_2000_q3.csv'
--------------------------------------------------------------------------------------
How your Affiliates link to your site:
Your Affiliates must link to your store using a URL of the following form:
http://www.yoururl.com/yourcgipath/perlshop.cgi?action=enter&thispage=somepage.html&order_id=!ORDERID!&affid=affiliate_id
Where:
- 'yoururl' is replaced with the actual URL for your site
- 'yourcgipath' is replaced by whatever your ISP has required of you
- 'somepage' is replaced by the actual name of your store entry page file
- 'affiliate_id' is replaced by the Affiliate ID value you've assigned to that affiliate
The Affiliate plugin will also work with QuickBuy mode. To do this, simply replace the 'enter' action with 'quickbuy'.
The Affiliate plugin may also be combined with the optional 'enteraction' parameter. See the on-line documentation for details.