Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

IP on customers Orders


Guest

Recommended Posts

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.

Link to comment
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 ;)

Link to comment
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

Link to comment
Share on other sites

  • 3 weeks later...

Sorry about the confusion....I have updated the instructions to more clearly explain how to add the customer_ip_address field to the database.

 

here is the new contribution:

http://www.oscommerce.com/community/contributions,1198

-Richard

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

Where would I be without the Forums?!?!

Link to comment
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?!?!

Link to comment
Share on other sites

  • 1 month 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...