Jump to content

Problems making Affiliate URL link to Promotional Code


paperweight

Recommended Posts

The default Affiliate system is good but it does not allow users to get a discount if they click through an affiliatre's link. So on this page http://docs.whmcs.com/Affiliates it shows how to link to a product. Instead I tried linking to a Promo Code so that all affilaites automatically have a promo they can gove to their users. For example, my affiliate gets $25 for joining my program, and their users get a 25% discount when they buy my product, and the affiliate also gets 10% of their purchase... so everythign seems setup correctly, and here is the affiliate code:

 

{$referrallink}&promocode=This-Is-The-Name-Of-The-Promo

 

and that correctly shows as:

http://domain.com/*?aff=006&promocode=This-Is-The-Name-Of-The-Promo

 

However, when an user clicks the link above, they are not given a cookie for that promo. If I manually enter on the Shopping Cart "This-Is-The-Name-Of-The-Promo" they are given the discount, but they are not given this as a cookie... am I missing something or does WHMCS not have this functionality? It seems like ti should, but I am doing something wrong?

Link to comment
Share on other sites

Thanks for your comments and advice. For the 1st option, I am unclear how I can push all affiliates' links to the same promotion. These are not individual affiliates' promotions, but rather site-wide promotions...

 

Here is what I need to do:

 

Currently WHMCS seems to only give the affiliate commission if someone buys a product via the affiliates' link. But the buyer gets nothing special, correct? There is no way by default to give the buyer, for example, a 30% discount if they click the affiliates' link. There is only a way to give, for example, an affiliate 10% if a buyer buys anything... right?

 

So what I want to do is this:

1) Give all affiliates $10 when they join the affiliate program.

2) Then give all affiliates 20% of the first purchase a buyer buys when they click the affiliate's link.

3) Finally, I want to give the buyer a 15% discount on the product they buy when they click the affiliate's link.

 

Currently, WHMCS only handles #1 and #2, correct? But WHMCS does not provide a way to handle #3. So I was hoping to give affiliates a way to do all the above by appending the same "promocode" to the end of their * links like this:

 

http://domain.com/*?aff=006&promocode=This-Is-The-Name-Of-The-Promo
http://domain.com/*?aff=15&promocode=This-Is-The-Name-Of-The-Promo
http://domain.com/*?aff=2965&promocode=This-Is-The-Name-Of-The-Promo
http://domain.com/*?aff=345345&promocode=This-Is-The-Name-Of-The-Promo
etc. etc.

 

I tested this and the browser does not seem to place a cookie on the buyer's computer to remeber that they are owed a discount for the "promocode=This-Is-The-Name-Of-The-Promo"...... it would also be nice if the promocode was remembered for 90 days too, but that is not so important.

 

Any idea how to make that work? Tks for your ideas~

Link to comment
Share on other sites

Ok, I solved this. I created a new cookie in aff.app that is placed on the user's computer when they click the link. Then viewcart.tpl calls that cookie in the promocode textfield when they checkout.

 

However, the user still needs to click the submit button on the promocode to apply the code. It would be much better if I could find a way to place the promocode in the URL like &promocode=XXXXXXX when they go to the shopping cart.... Any idea how to automatically place that and retrieve that info from the cookie?

Link to comment
Share on other sites

try to use .htaccess redirect method? If Affiliate ID/URL match then redirect to your selected product with your promocode?

 

That's a good idea and I may use it in the future, but I do not need the users to go immediately to the checkout when they click an affiliate link. I would rather they come to the frontpage so they can view services, etc.

 

I am thinking if there is a way for the URL to add &promocode=XXXXXX to the cart.php later ifWHMCS read the cookie that we placed fro *. I will keep researching and let you know if I find something....

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