shungos Posted June 23, 2012 Share Posted June 23, 2012 Cool, thanks for the replies! Link to comment Share on other sites More sharing options...
KevinR Posted August 7, 2012 Share Posted August 7, 2012 Has anyone used this with 5.1.2 ? Anything I should know? Great module, thank you for donating your time and effort for this free module. Link to comment Share on other sites More sharing options...
w3phillyhost Posted August 16, 2012 Share Posted August 16, 2012 Hello, I'm having a bit of an issue installing it correctly. The affiliate coupon script displays to my clients, but the theme is not working at all. Am I doing something wrong? I uploaded everything in the correct places. Link to comment Share on other sites More sharing options...
supernix Posted September 12, 2012 Share Posted September 12, 2012 I would be interested in knowing if this works with the 5.1.2 version as well. Link to comment Share on other sites More sharing options...
joelpadua Posted October 15, 2012 Share Posted October 15, 2012 This module doesn't work in 5.1.2. Can you tell us if you are going to update your module? Give us some feedback please! Great Job by the way Link to comment Share on other sites More sharing options...
wsa Posted October 15, 2012 Share Posted October 15, 2012 What you mean i install right now? What error you got? Link to comment Share on other sites More sharing options...
supernix Posted October 15, 2012 Share Posted October 15, 2012 how many are using it? Link to comment Share on other sites More sharing options...
Ashley.S. Posted October 15, 2012 Share Posted October 15, 2012 I've used it for a while, and as far as I know there have been no issues with it at all... Link to comment Share on other sites More sharing options...
supernix Posted October 16, 2012 Share Posted October 16, 2012 I've used it for a while, and as far as I know there have been no issues with it at all... Are you using the WHMCS 5.1.2? Link to comment Share on other sites More sharing options...
Ashley.S. Posted October 16, 2012 Share Posted October 16, 2012 Are you using the WHMCS 5.1.2? Yes I am...why? Link to comment Share on other sites More sharing options...
supernix Posted October 16, 2012 Share Posted October 16, 2012 I just wondered if it was the latest version. I wanted to verify that it was still working in the latest version of WHMCS as I know the developer hasn't changed anything in quite some time. I sure hope he continues to develop it though. Link to comment Share on other sites More sharing options...
Daniel Posted October 16, 2012 Share Posted October 16, 2012 We're using it in 5.1.2 and it works fine. These modules are not actively developed anymore hence being made available free of charge. Link to comment Share on other sites More sharing options...
paperweight Posted November 13, 2012 Share Posted November 13, 2012 Hmmm... I struggled installing this for over a week. Everything seemed fine and perfect and I read and re-read this thread many times but nothing seemed to work. My problem was that everythign seemed to isntall fine, but nothing displayed on the user's affiliate.php page. I could add usable coupons in the admin area, but the user just saw nothing. I even "View Source" on the HTML page, but no code was there -- just disappeared. Then 5 minutes ago I made a slight change and things appeared. Here is what I did: I changed this: {if $affiliatelinkscode} <p><strong>{$LANG.affiliateslinktous}</strong></p> <p align="center">{$affiliatelinkscode}</p> {/if} <hr> <!-- BEGIN AFFILIATE COUPONS CODE --> {php} include('affcoupons.php'); {/php} <!-- END AFFILIATE COUPONS CODE --> {/if} to this: <p><strong>{$LANG.affiliateslinktous}</strong></p> <p align="center">{$affiliatelinkscode}</p> {/if} <hr> <!-- BEGIN AFFILIATE COUPONS CODE --> {php} include('affcoupons.php'); {/php} <!-- END AFFILIATE COUPONS CODE --> I only removed the first IF and the final /IF Any idea why that would work? I am only 5 minutes info configuring this now that it appears, so maybe I will find the solution why.... Link to comment Share on other sites More sharing options...
paperweight Posted November 14, 2012 Share Posted November 14, 2012 Never mind... I was stupid and I had some bad code... I fixed my issue above. This module is GREAT! I hired Frank earlier this year for some custom mod work and he did a very good job. Too bad he had to stop his WHMCS work Link to comment Share on other sites More sharing options...
paperweight Posted November 14, 2012 Share Posted November 14, 2012 1) Yes, using the code grants the creator (the affiliate) the credit. Ok, I have not been able to test this functionality because of the way my payment processor is setup. So I have a question: how much credit is the creator given? Does this default to the main "Affiliate Earning Percentage" set in the General Settings > Affiliates area? If so, does that mean if I set it to 10% in the "Affiliate Earning Percentage" then that works for the default WHMCS affiliate link code as well as the Coupon Code from Frank's module here? Link to comment Share on other sites More sharing options...
SuperShaz Posted March 30, 2013 Share Posted March 30, 2013 This is a great addon. I really love it but I have noticed that Landing Page option is not working. May be my own mistake. How can I make it work. Please help. Thanks! Link to comment Share on other sites More sharing options...
SuperShaz Posted March 30, 2013 Share Posted March 30, 2013 I figured it out. Actually WHMCS changed * so during upgrade it was over written. So I added this at the end of file after moved permanently header: ============================= // perform redirect header("HTTP/1.1 301 Moved Permanently"); $r = select_query("tblaffcouponslanding", "landing", array("aff_id"=>$aff)); $data = mysql_fetch_array($r); $landing = $data['landing']; header("HTTP/1.1 301 Moved Permanently"); if ($landing) { header("Location: $landing"); exit; } else { header("Location: ".$whmcs->get_config('Domain'),true,301); exit; } ============================= May be this will be helpful for new release or existing users of this great module. I really love it. Thanks again! Link to comment Share on other sites More sharing options...
Tomasz Posted April 26, 2013 Share Posted April 26, 2013 Hi, I have new 5.2.4 WHMCS. I installed the module like in the manual, I added the above code to *, I added a few coupons, but nothing is displayed in the client affiliate program page. Anyone know how to fix it? Best regards, Thomas Link to comment Share on other sites More sharing options...
AssociatedVOIP Posted May 21, 2013 Share Posted May 21, 2013 (edited) Great addon! Works in v. 5.2.5 ! Edited May 21, 2013 by AssociatedVOIP Link to comment Share on other sites More sharing options...
Tomasz Posted June 12, 2013 Share Posted June 12, 2013 yes, works, if you use a template "portal" for whmcs, then file afiliates.tpl must go to templates/portal/ to works Link to comment Share on other sites More sharing options...
pat_ads Posted November 12, 2013 Share Posted November 12, 2013 Never mind... I was stupid and I had some bad code... I fixed my issue above. This module is GREAT! I hired Frank earlier this year for some custom mod work and he did a very good job. Too bad he had to stop his WHMCS work Hi! Sorry to bring up such an old response, but exactly HOW did you solve the issue? I am using a custom affiliates.tpl file, so I've added the code at the bottom: {if $inactive} <p>{$LANG.affiliatesdisabled}</p> {else} <p align="center">{$LANG.affiliatesrealtime}</p> <table cellspacing="1" cellpadding="0" class="frame"><tr><td> <table width="100%" cellpadding="2"> <tr><td width="30%" class="fieldarea">{$LANG.affiliatesvisitorsreferred}</td><td width="20%">{$visitors}</td><td width="30%" class="fieldarea">{$LANG.affiliatescommissionspending}</td><td width="20%">{$pendingcommissions}</td></tr> <tr><td class="fieldarea">{$LANG.affiliatessignups}</td><td>{$signups}</td><td class="fieldarea">{$LANG.affiliatescommissionsavailable}</td><td>{$balance}</td></tr> <tr><td class="fieldarea">{$LANG.affiliatesconversionrate}</td><td>{$conversionrate}%</td><td class="fieldarea">{$LANG.affiliateswithdrawn}</td><td>{$withdrawn}</td></tr> </table> </td></tr></table> <p align="center"><strong>{$LANG.affiliatesreferallink}:</strong> <input type="text" size="60" value="{$referrallink}"></p> {if $withdrawrequestsent} <p align="center">{$LANG.affiliateswithdrawalrequestsuccessful}</p> {else} {if $withdrawlevel}<p align="center"><input type="button" value="{$LANG.affiliatesrequestwithdrawal}" onclick="window.location='{$smarty.server.PHP_SELF}?action=withdrawrequest'" class="buttonwarn" /></p>{/if} {/if} <p class="heading2">{$LANG.affiliatesreferals}</p> <table align="center" class="clientareatable" cellspacing="1"> <tr class="clientareatableheading"><td>{$LANG.affiliatessignupdate}</td><td>{$LANG.orderproduct}</td><td>{$LANG.affiliatesamount}</td><td>{$LANG.orderbillingcycle}</td><td>{$LANG.affiliatescommission}</td><td>{$LANG.affiliatesstatus}</td></tr> {foreach key=num item=referral from=$referrals} <tr class="clientareatableactive"><td>{$referral.date}</td><td>{$referral.service}</td><td>{$referral.amount}</td><td>{$referral.billingcycle}</td><td>{$referral.commission}</td><td>{$referral.status}</td></tr> {foreachelse} <tr class="clientareatableactive"><td colspan="6">{$LANG.affiliatesnosignups}</td></tr> {/foreach} </table> {if $affiliatelinkscode} <p><strong>{$LANG.affiliateslinktous}</strong></p> <p align="center">{$affiliatelinkscode}</p> {/if} <hr> <!-- BEGIN AFFILIATE COUPONS CODE --> {php} include('affcoupons.php'); {/php} <!-- END AFFILIATE COUPONS CODE --> {/if} Still, I cannot get anything to show up on the affiliate's page. Using 5.2.12 of WHMCS. Any thoughts or suggestions are appreciated! Link to comment Share on other sites More sharing options...
pat_ads Posted November 12, 2013 Share Posted November 12, 2013 OK, please ignore my last post, as I had forgotten to include the affcoupons.php file in my WHMCS folder. Once I did that, everything worked! Here's my latest challenge... When you look at my affiliates page, the formatting that is provided with this module does not seem to work. As you can see, none of the header styles or table styles that are defined in the code's "print" commands seem to be recognized. When I look at other sections of the affiliates.tpl file, the method for making text stylized and creating tables is very different. By inserting the affcoupons.php in my template, the script's output is just plain and not aligned properly. Below is what my affcoupons.php file tries to output (the part of the code that i believe displays the information): print "<p class=\"heading2\">Landing Page</p> <p class=\"heading3\" align=\"center\">$msg2</p> <form action=\"affiliates.php\" method=\"POST\" name=\"landingpage\"> <p align=\"center\"> This option will control where your referrals will be redirected after visiting your referral link.<br /> <input type=\"hidden\" name=\"cmd\" value=\"modlanding\"> Landing Page: <input type=\"text\" size=\"48\" name=\"landing\" value=\"$landing\"> <input type=\"submit\" name=\"Submit\" value=\"Modify\"></p></form>"; // Get Existing Coupons $coupon = array(); $sql = "SELECT p.code, p.type, p.value, p.uses, p.id FROM tblpromotions p, tblaffcoupons a WHERE a.aff_id = '$aff_id' AND a.coupon = p.id"; $data = mysql_query($sql); while ($r = mysql_fetch_array($data)) { $coupon[$r[4]]['code'] = $r[0]; $coupon[$r[4]]['type'] = $r[1]; $coupon[$r[4]]['value'] = $r[2]; $coupon[$r[4]]['uses'] = $r[3]; $coupon[$r[4]]['id'] = $r[4]; } print "<p class=\"heading2\">Your Coupons</p> <p class=\"heading3\" align=\"center\">$msg</p> <table align=\"center\" class=\"clientareatable\" cellspacing=\"1\">"; print "<tr class=\"clientareatableheading\"><td> </td><td>Coupon Code</td><td>Coupon Type</td><td>Coupon Value</td><td>Uses</td></tr>"; foreach ($coupon as $key => $val) { $code = $val['code']; $type = $val['type']; $value = $val['value']; $uses = $val['uses']; $id = $val['id']; print "<tr class=\"clientareatableactive\"><td><a href=\"affiliates.php?cmd=del&cid=$id\"><img src=\"templates/default/images/delete.png\"></a></td><td>$code</td><td>$type</td><td>$value</td><td>$uses</td></tr>"; } print "</table>"; print "<p class=\"heading2\">Add Coupons</p>"; print "<form action=\"affiliates.php\" method=\"POST\" name=\"addcoupons\"> <input type=\"hidden\" name=\"cmd\" value=\"add\"> <p align=\"center\">Coupon Code: <input type=\"text\" name=\"code\" value=\"\" size=\"30\"> Coupon Type: <select name=\"type\">"; $data = select_query("tblaffcouponsconf", "*", array()); while ($val = mysql_fetch_array($data)) { $type = $val['type']; $recurring = $val['recurring']; $value = $val['value']; $cycles = $val['cycles']; $appliesto = $val['appliesto']; $expirationdate = $val['expirationdate']; $maxuses = $val['maxuses']; $applyonce = $val['applyonce']; $newsignups = $val['newsignups']; $existingclient = $val['existingclient']; $label = $val['label']; $string = "$type@$recurring@$value@$cycles@$appliesto@$expirationdate@$maxuses@$applyonce@$newsignups@$existingclient"; $enc_string = base64_encode($string); print "<option value=\"$enc_string\">$label</option>"; } print "</select><input type=\"submit\" name=\"Submit\" value=\"Add\"></p></form>"; ?> Can anyone guide me to make the changes so that the headers, tables, buttons and whatever else looks like the rest of my affiliates.tpl page? Thanks in advance! Link to comment Share on other sites More sharing options...
HostT Posted December 19, 2013 Share Posted December 19, 2013 Well out of luck and just giving it a try, I was able to download the 1.2 version through the same link for 1.1, and went ahead and uploaded it to GitHub. I've just started working on updating this addon today, you can follow development or even contribute: https://github.com/tripflex/whmcs-affcoupons Master branch that is on there now has been modified to work with WHMCS 5.2.1+, if you are using WHMCS 5.1 or lower you must use the WHMCS-5.1 branch (will probably never be updated again): https://github.com/tripflex/whmcs-affcoupons/tree/WHMCS-5.1 There were some updated from 1.1 that I found when going through the code, but for the only real change i've found so far was the cookie ID from WHMCSAffiliateId to AffiliateId, which is referenced both in the * and hook file to check the promo code against affiliate id. This has already been updated on the master branch. Once I can test it on templates i'll update it to work with the newest version. I've got the beta 5.3 and * has stayed the same from 5.2, just need to do a little more testing. Enjoy. Link to comment Share on other sites More sharing options...
HostT Posted December 19, 2013 Share Posted December 19, 2013 GitHub master branch has been updated to fix formatting of template layout. OK, please ignore my last post, as I had forgotten to include the affcoupons.php file in my WHMCS folder. Once I did that, everything worked! Here's my latest challenge... Look at the github link in my earlier post, i've updated the latest version and fixed the template to use the new bootstrap formatting. Should work on the new templates. You must be using WHMCS 5.2+ Link to comment Share on other sites More sharing options...
Ashley.S. Posted December 19, 2013 Share Posted December 19, 2013 Glad to see that somebody decided to pick the module up and continue support for it Link to comment Share on other sites More sharing options...
Recommended Posts