shoggy24 Posted January 31, 2008 Share Posted January 31, 2008 I like the line that reads This order form is provided in a secure environment and to help protect against fraud your current IP address (x.x.x.x) is being logged In the default template, which is located in order-stepone.tpl but i use the single order page and i want it to display on that page when the client is placing the order. So i copied the code to order-steptwo.tpl in singlepage folder. The message is diplayed like This order form is provided in a secure environment and to help protect against fraud your current IP address () is being logged with no IP address showing is there something i am missing or need to do for the IP address to display. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Developer WHMCS Andrew Posted January 31, 2008 WHMCS Developer Share Posted January 31, 2008 I think the IP address template variable is only available on step 1. You *may* be able to edit step 1 to pass through the IP address as a hidden field and show that on step 2? but that is only an idea 0 Quote Link to comment Share on other sites More sharing options...
shoggy24 Posted January 31, 2008 Author Share Posted January 31, 2008 Thanks J, That kinda sucks though, since i use the single product order link, which starts at step 2. I would think it makes more sense to have the message display all through the ordering process and not just the first step. 0 Quote Link to comment Share on other sites More sharing options...
JasonO Posted February 2, 2008 Share Posted February 2, 2008 In the place of the IP variable in the line, can you use your own. $_SERVER['REMOTE_ADDR'] That variable will have the viewers IP Address 0 Quote Link to comment Share on other sites More sharing options...
Jordan Posted February 2, 2008 Share Posted February 2, 2008 This is more intricate than what you may want need, but nonetheless: {php} if ($_SERVER['HTTP_X_FORWARDED_FOR']) { $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; if (strstr($ip, ', ')) { $ips = explode(', ', $ip); $ip = $ips[0]; } $host = @gethostbyaddr($ip); } else { $ip = $_SERVER['REMOTE_ADDR']; if (strstr($ip, ', ')) { $ips = explode(', ', $ip); $ip = $ips[0]; } $host = @gethostbyaddr($ip); } {/php} Your IP has been logged to prevent fraudulent signups Host/IP: {php}echo $host{/php}/{php}echo $ip{/php} Date/Time: {$todaysdate} {php}echo date("H:i:s");{/php} This is just what I had been using for my old order forms before this was an added variable. 0 Quote Link to comment Share on other sites More sharing options...
shoggy24 Posted February 3, 2008 Author Share Posted February 3, 2008 Jason, when i tried your code the page wouldnt load at all, maybe i am missing something. Jordan in order to use your method do i have to create a file using the first code (in your posting above) and then paste the second code in my tpl file. If so where in the second code do i reference the file created. 0 Quote Link to comment Share on other sites More sharing options...
Jordan Posted February 3, 2008 Share Posted February 3, 2008 You just copy and paste. The first box of code is wrapped in {php}{/php}. You can just include that in the order form's template file. 0 Quote Link to comment Share on other sites More sharing options...
JasonO Posted February 4, 2008 Share Posted February 4, 2008 Jason, when i tried your code the page wouldnt load at all, maybe i am missing something. Jordan in order to use your method do i have to create a file using the first code (in your posting above) and then paste the second code in my tpl file. If so where in the second code do i reference the file created. Sorry, I didn't really complete the code. {php}echo $_SERVER['REMOTE_ADDR'];{/php} That should display it. 0 Quote Link to comment Share on other sites More sharing options...
joe123 Posted February 4, 2008 Share Posted February 4, 2008 Use this instead <img align="left" src="images/gateways/padlock.gif" border="0" alt="Secure Transaction" style="padding-right: 10px;" /> {$LANG.ordersecure} (<strong>{$smarty.server.REMOTE_ADDR}</strong>) {$LANG.ordersecure2} 0 Quote Link to comment Share on other sites More sharing options...
JasonO Posted February 5, 2008 Share Posted February 5, 2008 Cool. I've not had the time to look at Smarty much at all so i'm not 100% sure of what it is capable of (I just know its capable of quite a bit) - I really should start looking into learning it now that I am using WHMCS. 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.