Affiliate Manager System


Here is a Mini version of an Affiliate Manager System which should operate on a unix system.  It will;

Automatically creates a commission statement for your affiliates.  They simply enter their Affiliate ID and press submit.

Features:

See Demo:  http://www.promotees.com/cgi-bin/demos/testaffl.cgi

Get The Script:  http://www.angelfire.com/biz/promots/testaffl.txt (name this file testaffiliate.cgi) chmod 755

Get Test Dbase:  http://www.angelfire.com/biz/promots/testaffiliate.txt  (name this file testaffiliate.db) permission: rw r r

Note: When you have everything working you can rename your script to whatever you like. Make sure you also change the name in the path portion of the affiliate script.

The script can work with any flat_file database.  You will first need to be passing a refer id throughout your store.  Such as described in Bill Stephenson's Hack at;
 Affiliate WebStore for Macintosh Web Servers.  Note:  You can use this hack info even if you are not on a mac

I think people have been having trouble following bill's hack because of lack of documentation so I went back and checked my old file to see what was changed. I wrote this doc based on what I can tell he changed but I can't be held responsible if it doesn't work use this info at your own risk Bill's Hack Documentation

Then log your sales to a database inside the web_store_order_lib.pl for example;

   if ($sc_send_order_to_log =~ /yes/i) {
    open (ORDERLOG, ">>$sc_order_log_file");
    print ORDERLOG $sc_order_no;
    print ORDERLOG "|";
    print ORDERLOG $sc_tracking_msg;
    print ORDERLOG "|";
    print ORDERLOG $moddate;
    print ORDERLOG "|";
    print ORDERLOG $custemail;
    print ORDERLOG "|";
    print ORDERLOG $custname;
    print ORDERLOG "|";
    print ORDERLOG $order_subtotal;
    print ORDERLOG "|";
    print ORDERLOG $order_finaldiscount;
    print ORDERLOG "|";
    print ORDERLOG $order_final_tax;
    print ORDERLOG "|";
    print ORDERLOG $order_shipping;
    print ORDERLOG "|";
    print ORDERLOG $order_grandtotal;
    print ORDERLOG "|";
    print ORDERLOG $payment_type;
    print ORDERLOG "|";
    print ORDERLOG "|";
    print ORDERLOG $refer_id;
    print ORDERLOG "\n";
    close (ORDERLOG);
  }

 Your fields names may differ from mine above so change accordingly. Once you successfully logged your fields to a databaase it's time to setup the affiliate script. The script is fully documented. Be sure you change the fields in the affiliate script to match what you have in your web_store_order.pl file.

Please let me know what your think of this script.

There is also a full version that offers more options. Visit our main hacks page under ENHANCEMENT TOOLS for more details and to see demo.

Angela H.