Jump to content
Sign in to follow this  
Guest

IP on customers Orders

Recommended Posts

Guest

Hello all,

 

I just tried to install this contribution and i am a bit confuse.

I may be dumb, someone tell me but the installation guide even though seem reonnable ..I DONT THINK IT MAKES SENSE AT ALL....

 

I get this error in my sql that says this :

 

Error

SQL-query : [Edit]

 

customer_ip_address TYPE=varchar Length=15.

 

MySQL said:

 

You have an error in your SQL syntax near 'customer_ip_address TYPE=varchar Length=15.' at line 1

 

Back

 

Now in my store when i placed the test order i got this error too:

 

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

 

 

Now ...In the installation guide it says this:

 

We must first add a new field to the table orders in your osCommerce db (this is easiest with phpMyAdmin). I created the field customer_ip_address TYPE=varchar Length=15.

 

 

What is it that i am missing that i need to do right?

 

Thanks for reading my post.

Share this post


Link to post
Share on other sites

use phpmyadmin and put this in the SQL query:

 

ALTER TABLE orders ADD customer_ip_address VARCHAR( 15 ) NOT NULL;


Robert

 

We all need to learn it once, how hard it may seem when you look at it, also you will master it someday ;)

Share this post


Link to post
Share on other sites

If you added the field and still have an error, check the field does not have a space before or after its name.

Share this post


Link to post
Share on other sites
Guest

I wanted to say Thanks for the two kind people that responded to my post.

Linda and Robert.

 

God Bless

Share this post


Link to post
Share on other sites
I wanted to say Thanks for the two kind people that responded to my post.

Linda and Robert.

 

God Bless

 

Hopefully one of those solutions lead you in the right direction to get this fixed ... :D

Share this post


Link to post
Share on other sites
Guest

Yes, I was able to have it work with the solution i received from the two of you.

 

Thanks a lot for your time and help.

Share this post


Link to post
Share on other sites

Here is what I added:

 

2) OK, now the fun part. What we want to do is to grab the user's ip address when an order is made and tie it to the order. The purpose is so that you could come back and say, for example, order XXX was made from ip address blah.blah.blah.blah.

 

 

We must first add a new field to the table orders in your osCommerce db (this is easiest with phpMyAdmin). I created the field customer_ip_address TYPE=varchar Length=15.

 

-Using phpMyAdmin you want to choose the table "orders" from the list of tables on the left of the screen that should show up once you log into your database.

 

-Once you have clicked on "orders" all of the fields within that table will show up in a list on the right, along with some tabs at the top of this list. To insert the new field click on the "insert" tab. This will display an editable list of the feilds in your "orders" table.

 

-Go to the bottom of this list, choose the radio button labled "Go back to previous page" and click "go"

 

-This will take you back to your feild listing for the table "orders". Go to the bottom of this page and next to where it says "Add new feild: 1 At End of Table" click "go".

 

-Here you will enter "customer_ip_address" underneath feild. Choose VARCHAR as the type and "15" as the length/values. Leave everything else as it is and click save. This has created the feild "customer_ip_address" in the table "orders".


-Richard

---------------------------------------------------

Where would I be without the Forums?!?!

Share this post


Link to post
Share on other sites
Guest

is there a way to display to display the ip on the customers invoice?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×