Results 1 to 5 of 5

Thread: Affiliate Linking to group

  1. #1
    Join Date
    Mar 2012
    Location
    USA
    Posts
    11

    Default Affiliate Linking to group

    Has anyone tried editing the aff.php to link to a specific product category rather than an actual product id?

    I have 3 products under the same group and I want my affiliates to be able to be affiliated with either of the 3 products in that group.

    Any help would greatly be appreciated.

    Thank you,
    Robert

  2. #2
    Join Date
    Feb 2010
    Location
    United Kingdom
    Posts
    608

    Default

    you must be using a mod, the standard affiliate system doesnt link a specific product

  3. #3
    Join Date
    Mar 2012
    Location
    USA
    Posts
    11

    Default

    Hi disgruntled,

    I am not using a mod. I know you can link to a particular product in WHMCS. I need to link to the Group so an affiliate can get credit for either of the 3 products someone purchases.

    Here is what WHMCS Support says:

    Regrettably there isn't an option to link directly to a product group, only a specific product. However you should be able to customise the aff.php file yourself to achieve this.

    If you are unable to create a module yourself feel free to request a quotation from our community by posting in our Marketplace forum or oDesk group: http://forum.whmcs.com/forumdisplay.php?f=49
    Here is a link to my group I am trying to link too:

    https://rkswebdesigns.com/billing/cart.php?gid=10

  4. #4
    Join Date
    Mar 2012
    Location
    USA
    Posts
    11

    Default

    Never mind you everyone. I got it figured out. I edited my aff.php file and it is now working like I want it too.

    Original aff.php:

    if ($pid) {

    header("Location: cart.php?a=add&gid=$pid");

    exit;
    Changed to:

    if ($gid) {

    header("Location: cart.php?a=add&gid=$gid");

    exit;
    My Banner link looks like:

    <a href="https://mydomain.com/whmcs/cart.php?aff=015&gid=10"><img src="http://www.mydomain.com/banners/image.gif" width="468" height="60" border="0"></a>

  5. #5
    Join Date
    Feb 2010
    Location
    United Kingdom
    Posts
    608

    Default

    if you have unencrypted file aff.php, i am fairly certain that you are, from what i recall but i will check and drop back in, this file is not as standard an unencrypted file. i may be wrong and il get back to you because my aff.php is the default file no mod used.


    I stand corrected, oh and FYI you didnt need to overwrite that you could have expanded it like this.

    PHP Code:
    if ($pid) {    header("Location: cart.php?a=add&pid=$pid");    exit;
    }
    elseif (
    $gid) {
        
    header("Location: cart.php?gid=$gid");    exit;

    also the a=add makes no sense to your scenario because you cant add a product group to the cart currently, i cant see a reason why you would want to though so i doubt there will be a place for it in the future.

    your just directing to a product group, so all you need is the section i posted.

    Further more, you can be really smart.. and make sure the links dont look like affiliate links at all... use mod rewrite, you will need to edit the code to dynamically find the affiliate id from some over area, but you could have a link like this.

    http://example.com/whmcs/clientname/groupname

    This would allow you to check the database, pull the client affid and group id for the assignment of affiliate and then direct to group id.

    A more seo friendly url less likely to be seo penalised by the likes of google.
    Last edited by disgruntled; 06-26-12 at 08:14 PM.

Similar Threads

  1. Fixing Group Discount / No Group Products issues.
    By RavenMedia in forum Customisation & Integration Questions
    Replies: 3
    Last Post: 02-14-13, 05:41 PM
  2. Direct Order Affiliate Linking
    By Gareth-HFX in forum Feature Requests
    Replies: 9
    Last Post: 10-26-09, 12:29 AM