Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

IP_address_account_created ver. 1.0 module


ifteba

Recommended Posts

Hi,

 

I am sorry guys I have another problem. Please help me!! :oops: :cry: :onfire:

 

I have installed "IP_address_account_created ver. 1.0" module but when i go to my admin at my shopping cart is shows this error:

 

Customers  

1054 - Unknown column 'customers_info_ip_address_da_acc_cre' in 'field list'  

 

select customers_info_date_account_created as date_account_created, customers_info_date_account_last_modified as date_account_last_modified, customers_info_date_of_last_logon as date_last_logon, customers_info_number_of_logons as number_of_logons, customers_info_ip_address_da_acc_cre as ip_address_da_acc_cre, customers_info_ip_address_da_acc_last_mod as ip_address_da_acc_last_mod from customers_info where customers_info_id = '4'

 

Can anybody please help me with this. I would really appriciate it.

 

Thanks a lot guys.

Ifte

Link to comment
Share on other sites

Hi,

 

It looks like the original install script has a whitespace at the end of the column name:

ALTER TABLE `customers_info` ADD `customers_info_ip_address_da_acc_cre ` VARCHAR(50) NOT NULL;

 

Try to remove this whitespace on your database.

 

 

hope it helps

Claudio

Link to comment
Share on other sites

Thank you very much Claudio. You got it dude. thanks

 

Hi,

 

It looks like the original install script has a whitespace at the end of the column name:

ALTER TABLE `customers_info` ADD `customers_info_ip_address_da_acc_cre ` VARCHAR(50) NOT NULL;  

 

Try to remove this whitespace on your database.

 

 

hope it helps

Claudio

Ifte

Link to comment
Share on other sites

  • 8 months later...

Hello: I also tried this IP_address_account_created due to individuals creating fake accounts. However, I'm not getting any errors just that the IP's aren't showing up in the admin section when an account is created. Shows where they should be....but not there. I tested this myself by creating an account and shows nothing.

 

I've added everything there is to be added and changed what needed to be changed according to the instructions. Did it 2x to be sure I didn't miss anything.

 

Thanks.

Link to comment
Share on other sites

Has anyone ever got this to work properly??? Just wondering since I have had new accounts created by customers and IP's still aren't there. And I'm a little suspicious of 1 individual and would like to match it up with my tracking program.

 

This is what is added to the files:

 

1) Make two new fields in table customers_info:

ALTER TABLE `customers_info` ADD `customers_info_ip_address_da_acc_cre` VARCHAR(50) NOT NULL;

ALTER TABLE `customers_info` ADD `customers_info_ip_address_da_acc_last_mod` VARCHAR(50) NOT NULL;

 

2) Add language:

In /admin/includes/languages/customers.php (and whatever language you are using) add the following to the end:

define('TEXT_IPADDRESS_ACCOUNT_CREATED', 'IP Address:');//add by Jes Saxe 25 juni 03

define('TEXT_IPADDRESS_ACCOUNT_LAST_MODIFIED', 'IP Address:'); //added by Jes Saxe 25 juni 03

 

3) Change the /admin/customer.php file this way:

Around line 453:

Changed the following line:

 

$info_query = tep_db_query("select customers_info_date_account_created as date_account_created, customers_info_date_account_last_modified as date_account_last_modified, customers_info_date_of_last_logon as date_last_logon, customers_info_number_of_logons as number_of_logons from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . $customers['customers_id'] . "'");

 

to:

 

$info_query = tep_db_query("select customers_info_date_account_created as date_account_created, customers_info_date_account_last_modified as date_account_last_modified, customers_info_date_of_last_logon as date_last_logon, customers_info_number_of_logons as number_of_logons, customers_info_ip_address_da_acc_cre as ip_address_da_acc_cre, customers_info_ip_address_da_acc_last_mod as ip_address_da_acc_last_mod from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . $customers['customers_id'] . "'");

 

Around line 520:

Just below thes line:

$contents[] = array('text' => '<br>' . TEXT_DATE_ACCOUNT_CREATED . ' ' . tep_date_short($cInfo->date_account_created));

add

$contents[] = array('text' => '' . TEXT_IPADDRESS_ACCOUNT_CREATED . ' ' . $cInfo->ip_address_da_acc_cre);

 

Around line 522:

below this line:

$contents[] = array('text' => '<br>' . TEXT_DATE_ACCOUNT_LAST_MODIFIED . ' ' . tep_date_short($cInfo->date_account_last_modified));

add

$contents[] = array('text' => '' . TEXT_IPADDRESS_ACCOUNT_LAST_MODIFIED . ' ' . $cInfo->ip_address_da_acc_last_mod);

 

4) In /catalog/create_account_process.php:

 

Around line 14:

Just below this line:

require('includes/application_top.php');

add

//------BOF IP_Address BY Jes Saxe 25 juni 03---

if (getenv('HTTP_X_FORWARDED_FOR')) {

$ip=getenv('HTTP_X_FORWARDED_FOR');

}

else {

$ip=getenv('REMOTE_ADDR');

}

//----EOF IP_Address------

 

Around line 305:

Change the following line:

 

tep_db_query("insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('" . tep_db_input($customer_id) . "', '0', now())");

 

to:

 

tep_db_query("insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created, customers_info_ip_address_da_acc_cre) values ('" . tep_db_input($customer_id) . "', '0', now(), '" . $ip . "')"); //add IP by Jes Saxe 25 JUN03

 

 

5) In account_edit_process.php:

Around line 14:

 

Just below this line:

require('includes/application_top.php');

add

//------BOF IP_Address BY Jes Saxe 25 juni 03---

if (getenv('HTTP_X_FORWARDED_FOR')) {

$ip=getenv('HTTP_X_FORWARDED_FOR');

}

else {

$ip=getenv('REMOTE_ADDR');

}

//----EOF IP_Address------

 

 

Around line 299:

change the following line:

 

tep_db_query("update " . TABLE_CUSTOMERS_INFO . " set customers_info_date_account_last_modified = now() where customers_info_id = '" . tep_db_input($customer_id) . "'");

 

to:

 

tep_db_query("update " . TABLE_CUSTOMERS_INFO . " SET customers_info_date_account_last_modified = now(), customers_info_ip_address_da_acc_last_mod = '" . $ip . "' where customers_info_id = '" . tep_db_input($customer_id) . "'");//added IP by Jes Saxe 25 JUN03

 

 

 

Thanks!

Edited by only2empires
Link to comment
Share on other sites

  • 6 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...