Hello Developers,
i am running opencart 1.5.6 store. how can we show customer ip in new account alert email? just like below
A new customer has signed up:
Web Site: my store
First Name: Jacques
Last Name: Kallis
Customer Group: Default
E-Mail: jacques@kallis.com
Telephone: 00336513343445
IP : 192.169.132.23
please help me on this.
thanks in advance.
regards
Steve
Hi Steve,
catalog/model/account/customer.php
around line 69
Find:
$message .= $this->language->get('text_telephone') . ' ' . $data['telephone'] . "\n";
Add after:
$message .= "\n\nSender's IP Address: {$_SERVER['REMOTE_ADDR']}";
Thanks,
Robert
catalog/model/account/customer.php
around line 69
Find:
$message .= $this->language->get('text_telephone') . ' ' . $data['telephone'] . "\n";
Add after:
$message .= "\n\nSender's IP Address: {$_SERVER['REMOTE_ADDR']}";
Thanks,
Robert
Hi Steve,
Try this:
catalog/model/account/customer.php
around line 69
Find:
$message .= $this->language->get('text_telephone') . ' ' . $data['telephone'] . "\n";
Add after:
$message .= "\n\nSender's IP Address: {$_SERVER['REMOTE_ADDR']}";
Thanks,
Robert
Try this:
catalog/model/account/customer.php
around line 69
Find:
$message .= $this->language->get('text_telephone') . ' ' . $data['telephone'] . "\n";
Add after:
$message .= "\n\nSender's IP Address: {$_SERVER['REMOTE_ADDR']}";
Thanks,
Robert
Hi Steve,
Happy to help
!
Also you can use a simple trick to know the location details of your new customer by adding below script:
Find:
$message .= "\n\nSender's IP Address: {$_SERVER['REMOTE_ADDR']}";
Add after:
$message .= "\n\n Country Detected: http://www.geoiptool.com/en/?IP={$_SERVER['REMOTE_ADDR']}";
And simply just click on the link created to see details of the location.
You can change "Country Detected" with "Location Details" or whatever you like.
Robert
----------------------------------------------------------------------------------------------------------
http://www.balicigarettes.com
http://www.baligiftware.com
Happy to help

Also you can use a simple trick to know the location details of your new customer by adding below script:
Find:
$message .= "\n\nSender's IP Address: {$_SERVER['REMOTE_ADDR']}";
Add after:
$message .= "\n\n Country Detected: http://www.geoiptool.com/en/?IP={$_SERVER['REMOTE_ADDR']}";
And simply just click on the link created to see details of the location.
You can change "Country Detected" with "Location Details" or whatever you like.
Robert
----------------------------------------------------------------------------------------------------------
http://www.balicigarettes.com
http://www.baligiftware.com
Omg
I am about to ask you this. You offered quickly.
thank you Robert.
i am just getting output like this
Sender's IP Address: 31.185.63.255
Country Detected: http://www.geoiptool.com/en/?IP= 31.185.63.255
Is there any way to output the exact country name instead of Url? like this
Country Detected: UK
regards
Steve
I am about to ask you this. You offered quickly.
thank you Robert.
i am just getting output like this
Sender's IP Address: 31.185.63.255
Country Detected: http://www.geoiptool.com/en/?IP= 31.185.63.255
Is there any way to output the exact country name instead of Url? like this
Country Detected: UK
regards
Steve
Who is online
Users browsing this forum: Semrush [Bot] and 17 guests