Download & Extend

Add support for customizable affiliate URL schemes

Project:Ubercart Affiliate v2
Version:6.x-2.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

This patch allows for site administrators to change the affiliate links from the current affiliate/[uid] scheme to [anything]/[uid].

The patch simply adds variable_get('uc_affiliate2_path', 'affiliate'); anywhere this menu item is defined or referred to. This allows the site administrator to change this variable in the settings.php file by adding a line similar to the following:

<?php
$conf
['uc_affiliate2_path'] = 'my_affiliate_path';
?>

There is not currently an interface to change this path. This is somewhat intentional because you wouldn't want an administrator to change this accidentally and destroy all of the current incoming links to a site.

AttachmentSize
uc_affiliate2_config_menu.patch3.06 KB

Comments

#1

What can I say? You rock.

I will have this integrated as soon as possible.

#2

+1 this feature would be really handy.

The code in the patch looks good to me.

#3

Status:needs review» fixed

In CVS.

#4

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

#5

Category:feature request» bug report
Status:closed (fixed)» needs work

I'm not sure if I should post this here or not. I'm using the new variable to redefine the affiliate links on a brand new site, but it's not working.

If I use the default "affiliate/[uid]" link, referrals are tracked correctly. If I add the variable definition to the settings.php file, the new affiliate url produces a "404 - page not found" error.

For instance, my settings.php file includes the line:
$conf['uc_affiliate2_path'] = 'referral';

Yet, when I use this in an affiliate link, such as www.sitename.com/referral/32, I get a 404 error.

This is important for me, mostly because many in my market do not want to be seen as promoting affiliate programs, and would much rather have links that say "referral" or "recommends" rather than "affiliate".

Any idea what could be wrong here and how to fix it?

Thanks.

#6

You need to clear your menu cache after changing the link.

#7

Thanks. That did it. Sorry for the erroneous bug report.
Perhaps the installation instructions should be updated to make this clear?

#8

Status:needs work» fixed

That sounds good.

#9

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.