Jump to content

Howto? Customize affiliate ID (auto increment)


wulfric

Recommended Posts

I just wanna change things up a bit to better compete against bluehost - an example partner affiliate link they use is: http://www.bluehost.com/track/username

 

Question: When next person activates affiliate, how do I make it so they are domain.com/aff(dot)php?aff=420

 

Right now, if someone activates the affiliate, they become number domain.com/aff(dot)php?aff=50 It looks like there is five tables, will I need to alter each of them?

 

ceBRzVM.png

 

Some neat ideas

• randomize affiliate ID #

• change pattern, from +1 each affiliate, to maybe +37 each activation

• tweak affiliate naming scheme to something like domain.com/****-{$client.id.firstname}

* = random acceptable numbers / letters

Link to comment
Share on other sites

tblaffiliates is the one to look at - the value of id in there will be used as the affiliateid in the others.... and I wouldn't suggest editing existing id values!

 

Alriiiiight!

 

To get the type of results I desire, do you recommend I alter table and do auto increment stuff?

 

X1QIMaj.png

 

56ELV0Z.png

 

I didn't make any tweaks yet, still learning.

Link to comment
Share on other sites

Some neat ideas

• randomize affiliate ID #

• change pattern, from +1 each affiliate, to maybe +37 each activation

you can specify next affiliate ID by running this SQL

$nextAffiliateID = {Last-Affiliate-ID} + 24;
ALTER TABLE `tblaffiliates` auto_increment = '$nextAffiliateID';

 

• tweak affiliate naming scheme to something like domain.com/****-{$client.id.firstname}

* = random acceptable numbers / letters

you can do that, I can think of simple way to do it using htaccess to handle it, and maybe actionhook/template edit to display the new format for affiliates to copy

Link to comment
Share on other sites

I ended up just clicking alter table, and typed in 24 and pressed enter. I hope I did it right. I made a (2) test account and activated affiliate, and it picked up on the number I expected. Thanks guys!

 

AVaWpp4.png

 

---

 

Thanks to your reply though, it pointed me into the right direction and I reckon I got the results I desired. Not sure why I was getting errors inside Adminer, I tried a couple of things, but none of them worked.

 

$nextAffiliateID = {Last-Affiliate-ID} + 24;
ALTER TABLE `tblaffiliates` auto_increment = '$nextAffiliateID';  

$nextAffiliateID = 55 + 55;
ALTER TABLE `tblaffiliates` auto_increment = '$nextAffiliateID';  

$nextAffiliateID = {55} + 214;
ALTER TABLE `tblaffiliates` auto_increment = '$nextAffiliateID';  

$nextAffiliateID = {Last-Affiliate-55} + 24;
ALTER TABLE `tblaffiliates` auto_increment = '$nextAffiliateID';  

$nextAffiliateID = 55 + 24; ALTER TABLE `tblaffiliates` auto_increment = '$nextAffiliateID';  

$nextAffiliateID = {Last-Affiliate-55} + 24;
ALTER TABLE `tblaffiliates` auto_increment = '$nextAffiliateID';  

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated