Need to modify affiliate URL + few lines of code

Discussion in 'Programming' started by Jetheat, Aug 20, 2007.

  1. #1
    This is a few simple lines of code for someone who knows what they are doing.

    This is what I need done.

    I will be running an affiliate program on my site.

    Affiliates will refer customers to my site via their affiliate link which will be in this format:
    https://paydotcom.com/r/xxxxx/yyyyy/zzzzz

    xxxxx = product ID
    yyyyy = Affiliate ID
    Zzzzz = campaign ID (doesn’t have to be there).


    I have two offers on my sales page:
    Product A
    Product B

    Affiliates will refer people to my site via an affiliate link for product A.
    My product A ID is 18597

    My product B ID is 18678

    The Affiliate ID is whatever they have chosen.

    So when they refer someone to my site, their affiliate link will look like this:
    https://paydotcom.com/r/18597/Jetheat/123456

    The digits at the end signify their campaign number but that doesn’t matter.

    This is what I need done.

    When a visitor comes to my site via an affiliate link, they will come through a link which is really only promoting product A, because I haven’t made product B public to affiliates yet.

    But if the visitor buys product B instead of product A, I don’t want the affiliate to lose their commission.

    So what I need done is simply a modification of the affiliate URL (somehow) or some other solution which will give the affiliate credit for the sale of product B if that is the product which is sold.

    In other words, the affiliate url should somehow be modified to:
    https://paydotcom.com/r/18678/Jetheat

    Please note: the product ID has changed. The affiliate ID remains the same and the last part of the affiliate Url has been taken out since that’s not too important.

    So, can you figure out a way to give credit to the affiliate regardless of which product is sold?


    Thanks,

    JH
     
    Jetheat, Aug 20, 2007 IP