www.ap-mg.com Posted March 6, 2012 Share Posted March 6, 2012 I was told that this can be done, but I haven't figured it out and was hoping to get some help from the community. Thank you in advance for your time. What I am trying to accomplish is : Summary I have several associations that want to sign up with our affiliate plan so they can advertise a preferred hosting rate for their members. I know how to setup affiliates in the system, as well as additional pages. I would like to setup a Cart page for each affiliate so I can customize it specifically for them so when they refer their members, their member's see the Associations logo and company brand colors etc.. Technical Help Needed Once I create the additional Cart page, how do I redirect the affiliate to specific page I created based on their affiliate ID? Thank you again for your time. I am a novice programmer at best, but am a quick study - any help would be hugely appreciated. Best regards, Charles 0 Quote Link to comment Share on other sites More sharing options...
laszlof Posted March 6, 2012 Share Posted March 6, 2012 best bet would be to not create new pages, but add conditionals in the display of the cart. For example, if you want to display association1.jpg image for affiliate id 100, and association2.jpg image for affiliate id 200. You'd do something like this in the template file: {if $smarty.cookies.WHMCSAffiliateID eq '100'} <img src="images/association1.jpg" /> {elseif $smarty.cookies.WHMCSAffiliateID eq '200'} <img src="images/association2.jpg" /> {else} <!-- Display no image for other affiliates or non-affiliates. --> {/if} 0 Quote Link to comment Share on other sites More sharing options...
www.ap-mg.com Posted March 6, 2012 Author Share Posted March 6, 2012 Frank: That was exactly what I needed - you are the man! Now, where do I add the code? Charles 0 Quote Link to comment Share on other sites More sharing options...
www.ap-mg.com Posted March 6, 2012 Author Share Posted March 6, 2012 Frank: That was exactly what I needed - you are the man! Now, where do I add the code? Charles Frank: Light bulb moment - would I just add this code where I want the image to show up? 0 Quote Link to comment Share on other sites More sharing options...
laszlof Posted March 6, 2012 Share Posted March 6, 2012 Frank: Light bulb moment - would I just add this code where I want the image to show up? Thats correct. You'd modify the templates where you want to display custom information, and add the conditional where you want it to display. The variable assumes that someone went to your site using the "http://www.yoursite.com/*?aff=111" URL link for affiliates. This sets a cookie on their machine to track the affiliate. 0 Quote Link to comment Share on other sites More sharing options...
www.ap-mg.com Posted March 6, 2012 Author Share Posted March 6, 2012 Frank: You are indeed King for the Day! Thank you - have a great week. 0 Quote Link to comment Share on other sites More sharing options...
zomex Posted March 6, 2012 Share Posted March 6, 2012 best bet would be to not create new pages, but add conditionals in the display of the cart. For example, if you want to display association1.jpg image for affiliate id 100, and association2.jpg image for affiliate id 200. You'd do something like this in the template file: {if $smarty.cookies.WHMCSAffiliateID eq '100'} <img src="images/association1.jpg" /> {elseif $smarty.cookies.WHMCSAffiliateID eq '200'} <img src="images/association2.jpg" /> {else} <!-- Display no image for other affiliates or non-affiliates. --> {/if} Great job, that code will definitely come in handy some time. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.