decor Posted March 25, 2008 Share Posted March 25, 2008 I am setting up WHMCS after moving from CE, I currently use clixgalore 3rd party affiliate system and have a code that i need to integrate into WHMCS somewhere, the code is <!--begin clixGalore code, copyright 2002 --> <img src="https://clixGalore.com/AdvTransaction.aspx?AdID=XXXX&SV=<ORDER_VALUE>&OID=<ORDER_ID>" height="0" width="0" border="0"> <!--end clixGalore code ---> Where do i add this code ? and what are the variables i replace these with <ORDER_VALUE> = order $ value <ORDER_ID> = order id I intend to use the integrated affiliate program with my clients but the clix one with existing affiliates (who are not clients) thanks Ian 0 Quote Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted March 25, 2008 WHMCS CEO Share Posted March 25, 2008 You would need to add this into the template file templates/orderforms/cart/complete.tpl There is a section there {if $ispaid}{/if} which only runs if the checkout is fully complete so you would want to put it between that. You can use {$orderid} in the code and for the order value, would need to run some PHP code to query the database for it. Matt 0 Quote Link to comment Share on other sites More sharing options...
decor Posted April 6, 2008 Author Share Posted April 6, 2008 Thanks for that, any idea what the "would need to run some PHP code to query the database for it." would be? Thanks Ian 0 Quote Link to comment Share on other sites More sharing options...
decor Posted April 8, 2008 Author Share Posted April 8, 2008 Has anyone successfully integrated clixgalore affiliate program into WHMCS? I have added the code to the /templates/orderforms/cart/complete.tpl, and all 3 /templates/orderforms/boxes/order-complete.tpl, /templates/orderforms/default/order-complete.tpl and /templates/orderforms/singlepage/order-complete.tpl, and can not get any order acknowledgement, when i process a order General Settings are Auto Redirect on Checkout - Select to automatically redirect the user to the gateway Any Suggestions? Thanks Ian 0 Quote Link to comment Share on other sites More sharing options...
mattrobo Posted October 15, 2009 Share Posted October 15, 2009 Did you ever work this out? I am about to go down this path. Thanks Matthew 0 Quote Link to comment Share on other sites More sharing options...
mattrobo Posted October 16, 2009 Share Posted October 16, 2009 no need to answer I worked it out 0 Quote Link to comment Share on other sites More sharing options...
jamieaus Posted November 23, 2010 Share Posted November 23, 2010 no need to answer I worked it out Matt Any chance you could post the code for others to use. Thanks Jamie. 1 Quote Link to comment Share on other sites More sharing options...
mattrobo Posted November 23, 2010 Share Posted November 23, 2010 Wow that was a long time ago. I went back to a backup and saw the code I was playing aornd with there. I can see it is messy but it was about the time I got it to work - Shortly after I dumped it because I was not getting sales working properly.. some were missing in CG and I could not work out why. It is something to do with the way I was using WHMCS and the way in some cases it never returned back to this script. Now this is from the backup files. I have not looked at it since and I can see from the incomplete code it was not a final version... WARNING: The code mess is just too bad - this is all I could get from backup. Also be aware of template and version changes since then!!! But you can see what I was thinking. /templates/orderforms/boxes Complete.tpl {if $ispaid} <!-- Enter any HTML code which needs to be displayed once a user has completed the checkout of their order here - for example conversion tracking and affiliate tracking scripts --> {php} $invoiceid = $this->get_template_vars('invoiceid'); $gv_query1= "SELECT amount FROM tblinvoiceitems WHERE type='HOSTING' AND invoiceid=$invoiceid"; $gv_result1 = mysql_query($gv_query1); $array=mysql_fetch_assoc($gv_result1); {/php} <img src="https://www.clixGalore.com/AdvTransaction.aspx?AdID=xxxxxxx&SV={php} echo $array['amount']; {/php}&OID={php} echo $invoiceid; {/php}" height="0" width="0" border="0"> <!-- Google Code for Purchase Conversion Page --> </script> <script type="text/javascript" src="https://www.googleadservices.com/pagead/conversion.js"> </script> <noscript> <div style="display:inline;"> <img height="1" width="1" style="border-style:none;" alt="" src="https://www.googleadservices.com/pagead/conversion/1032447127/?value=$1&label=hdHQCN2nogEQl8mn7AM&guid=ON&script=0"/> </div> </noscript> 0 Quote Link to comment Share on other sites More sharing options...
jamieaus Posted November 24, 2010 Share Posted November 24, 2010 Matt Thanks, I am placing the code in the hooks folder but this gives me somewhere to start, Thanks Jamie. 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.