Community Add-Ons
Order IP Recorder v1.0
for osCommerce Online Merchant v2.2
This is a simple mod used to record and store the IP address for each order placed on your site. I know there are a few mods out there that do exactly what this does, but after coming across a few non-working and/or sloppy mods for this, I gave up and decided to write my own from scratch.
Quick rundown of how it works:
(1) The customer's IP is grabbed during the checkout process
(2) The customer is informed that their IP has been recorded for security purposes at the checkout confirmation page
(3) The IP is stored along with the rest of the info for that particualr Order ID
(4) The IP is displayed in Admin -> Customers -> Orders -> ... Select an order and click 'Edit' and it will be displayed along with the rest of the info
There won't be a support thread b/c I don't believe one is needed. This is a very basic mod with a very basic function. If you can't get this one to work w/o help, you might as well just give it up. ;)
More efficient and clear way. of the Installtion Steps.
Have Fun And thanks to Acheron and all the good work
Max Hasson
Correction to file: catalog/admin/orders.php
#Joseph
*********************************************SMALL FIX FOR ORDER IP RECORDER*********************************************
Open catalog/admin/includes/classes/order.php file
IP Address: xxx.xxx.xxx.xxx ISP: xxx.xxx
Now you can see "ISP:" with information.
Find:
$order_query = tep_db_query("select customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status,ipaddy, ipisp last_modified from " . TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'");
Replace with:
$order_query = tep_db_query("select customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status,ipaddy, ipisp, last_modified from " . TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'");
(Optional)
if you don't want to display message about ip address and isp address like this IP Address: xxx.xxx.xxx.xxx ISP: xxx.xxx, than in catalog/checkout_process.php , use this way
Than find:
<tr>
<td class="main">
<?php echo HEADING_IPRECORDED_1;
$ip_iprecorded = YOUR_IP_IPRECORDED;
$isp_iprecorded = YOUR_ISP_IPRECORDED;
$ip = $HTTP_SERVER_VARS["REMOTE_ADDR"];
$client = gethostbyaddr($HTTP_SERVER_VARS["REMOTE_ADDR"]);
$str = preg_split("/./", $client);
$i = count($str);
$x = $i - 1;
$n = $i - 2;
$isp = $str[$n] . "." . $str[$x]; ?>
<?php echo "<div align="justify"><font size=".1">$ip_iprecorded: $ip<br>$isp_iprecorded: $isp"; ?></div>
</td>
</tr>
And replace with:
<tr>
<td class="main">
<?php
$ip_iprecorded = YOUR_IP_IPRECORDED;
$isp_iprecorded = YOUR_ISP_IPRECORDED;
$ip = $HTTP_SERVER_VARS["REMOTE_ADDR"];
$client = gethostbyaddr($HTTP_SERVER_VARS["REMOTE_ADDR"]);
$str = preg_split("/./", $client);
$i = count($str);
$x = $i - 1;
$n = $i - 2;
$isp = $str[$n] . "." . $str[$x]; ?>
</td>
</tr>
That's All...
(No file included into zip file.)
Now IP is clickable and with one click you can check the ip address at www.showmyip.com. Full package.
This is optional to use for the Fancier incvoice and packingslips
Can also be used with stock osC invoice and packingslip
Thanks for this great contrib all credit goes to the orginal author/s
This is a full package
An extra comma in this instructions file on line 136 after ipaddy, ipisp
made some problem in admin edit orders.
The error looked like this:
<><><><>
1064 - You have an error in your SQL syntax near 'from orders where orders_id = '88'' at line 1
+
More adjustments to the Multilanguage issue
:-) Have Fun And thanks to all the good work
Gil Dvir
ISRAEL
Por si alguien no lo sabe, esta contribución sirve para guardar la ip del cliente a la hora de hacer el pedido, la guarda mientras hace el pedido y luego se puede ver desde la administración.
Este archivo simplemente es una traducción de la instalación y traducción del idioma.
Update a sql file:
ALTER TABLE `orders` ADD `payment_id` VARCHAR(15) NOT NULL;
In Catalog/admin/includes/classes/order.php
the is a line:
$order_query = tep_db_query("select customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status, last_modified, customers_id, ipaddy, ipisp, payment_id from " . TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'");
I didn't had a table with Payment_ID
So maybe other people have the same problem. I'm a rookie, so this is something what i noticed and i want to help.
Greate Contribution BTW, Thanx allot guys !!
I just made the checkout_confirmation.php page 100% multilingual.
Add this code instead of the one suggest in the install instructions to have a nice link to a excellent Whois for a lot of information on the IP.
Enjoy
AHHHH.....OOPS someone forgot to fetch the values from the database so that orders can display it (all along in all versions) This is a FULLY working 2.2 Milestone 2 Version which logs and shows the Ip address AND the ISP of the customer. Can i get a thank you?? HE HE
In Milestone 2.2 I tried to add support for resolving the ISP of the user; however, it only works on the order confirmation page. It does not show up in orders in admin. Would love for someone to pick this up and correct it. LOL if this doesn't get corrected, at least it may deter fraud.
Minor "ddd" Bugfix
and repackage of file
All credit goes to Acheron
Nice mod Acheron!
Thanks
After the mod, IP was recorded in Admin -> Customers -> Orders ->. However, don't see the notification on the checkout confirmation page that was supposed to inform customer their IP has been recorded for security puroposes.
-----------------------------------------------
By: Sam Nheik
http://www.fabulousite.com
Correction has been made as follow.
And now you will see this message that said:
"Your IP ( 63.191.1.1.00 ) has been recorded for security purposes" when customer get to the point at checkout_confirmation.php page.
By: Sam Nheik
http://www.fabulousite.com
Ive attached a edited Install.txt. because the traceroute addition code was missing the <td> and </td> tags.
Thanks Acheron for a great contribution, good work
Rodent and others, the addition works fine withouth the attached files so just follow the instructions in Install.txt and you are fine.
Hi,
thanks for this great mod,
one question though:
in the Traceroute Addom, there are 2 php files included:
BK_orders.php
and
orders.php
what about them?
copy them anywhere or just delete them?
thanks
alex
ps: nevermind the attached file, had to attach anything
I accidentally left in 'ddd' text on /admin/orders.php from a test file. It wouldn't affect functionality, you would just have 'ddd' outputted next to IP: in admin. Remove it yourself or d/l this install.txt (hey, had to attach something)
Not really an add-on but I couldn't think of anything better to call it. :P This small modification is beyond simple but is offered for those who know next-to-nothing about modding their own site.
This is a simple addition to the small mod I created. It uses an outside source to run the traceroute as a trace would put a strain on your server if done directly. The IP displayed in the order will now be an underlined link. When clicked, it will open a traceroute in a new window.
This is a simple mod used to record and store the IP address for each order placed on your site. I know there are a few mods out there that do exactly what this does, but after coming across a few non-working and/or sloppy mods for this, I gave up and decided to write my own from scratch.
Quick rundown of how it works:
(1) The customer's IP is grabbed during the checkout process
(2) The customer is informed that their IP has been recorded for security purposes at the checkout confirmation page
(3) The IP is stored along with the rest of the info for that particualr Order ID
(4) The IP is displayed in Admin -> Customers -> Orders -> ... Select an order and click 'Edit' and it will be displayed along with the rest of the info
There won't be a support thread b/c I don't believe one is needed. This is a very basic mod with a very basic function. If you can't get this one to work w/o help, you might as well just give it up. ;)
