Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Point me in the right direction, unknown columns.


pinkstarsunshine

Recommended Posts

Posted

Hi!

 

I have some db questions/problems. I'm on 2.2ms2.

 

The last contrib I installed was XML Tracking Contrib. Works great. But when I go to my admin panel and try to access my PayPal Ipn orders, I get this:

 

 

1054 - Unknown column 'o.paypal_ipn_id' in 'where clause'

 

select count(*) as total from paypal_ipn as p, paypal_ipn_orders as po, orders as o where p.paypal_ipn_id = po.paypal_ipn_id AND po.paypal_ipn_id = o.paypal_ipn_id AND o.paypal_ipn_id = p.paypal_ipn_id

 

[TEP STOP]

 

 

 

 

Also when I do a test checkout... on the Confirm Order, I get this on the checkout_process.php:

 

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

 

insert into orders (customers_id, 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, date_purchased, orders_status, currency, currency_value) values

[TEP STOP]

 

 

The order can not go through, this error comes up.

Can someone please point in the right direction here? If it is an sql problem what should I edit/add/do?

 

Any info is greatly appreciated, thanks.

Posted

1) field paypal_ipn_id does not exist in the orders table:

 

a) have you named it correctly ? a spelling mistake would cause this error

b ) if the field does not exist at all - did you run the sql with the contrib ?

 

 

2) same issue

Your online success is Paramount.

Posted

When you installed the contribution, did you overwrite existing files with ones from the contrib, or did you hand edit the files needed? (i haven't used that contrib, so I am not familiar with how the contrib is actually added)

 

If you did have PayPal IPN installed, and you overwrote some files, maybe you removed functionality that you previously had with this contrib addition.

It would appear to be some files that you edited/overwrote in the admin section based on your comments.

 

If the contrib rewrote a table in the database, maybe it did a "drop" of the table, and then added it back, but without your previous changes for the PayPal IPN contrib?

Was there a sql file or commands/queries you had to load/run/add manually to your database?

 

Good Luck!

Posted

I believe I overwrote the orders table when I uploaded this orders.sql file....

 

 

This is the orders.sql file, I uploaded..there is no customers-company or paypal_ipn_id:

 

 

DROP TABLE IF EXISTS orders;

CREATE TABLE orders (

orders_id int(11) NOT NULL auto_increment,

customers_id int(11) NOT NULL default '0',

customers_name varchar(64) NOT NULL default '',

customers_street_address varchar(64) NOT NULL default '',

customers_suburb varchar(32) default NULL,

customers_city varchar(32) NOT NULL default '',

customers_postcode varchar(10) NOT NULL default '',

customers_state varchar(32) default NULL,

customers_country varchar(32) NOT NULL default '',

customers_telephone varchar(32) NOT NULL default '',

customers_email_address varchar(96) NOT NULL default '',

customers_address_format_id int(5) NOT NULL default '0',

delivery_name varchar(64) NOT NULL default '',

delivery_street_address varchar(64) NOT NULL default '',

delivery_suburb varchar(32) default NULL,

delivery_city varchar(32) NOT NULL default '',

delivery_postcode varchar(10) NOT NULL default '',

delivery_state varchar(32) default NULL,

delivery_country varchar(32) NOT NULL default '',

delivery_address_format_id int(5) NOT NULL default '0',

payment_method varchar(32) NOT NULL default '',

cc_type varchar(20) default NULL,

cc_owner varchar(64) default NULL,

cc_number varchar(32) default NULL,

cc_expires varchar(4) default NULL,

last_modified datetime default NULL,

date_purchased datetime default NULL,

orders_status int(5) NOT NULL default '0',

orders_date_finished datetime default NULL,

ups_track_num varchar(18) default NULL,

comments text,

currency char(3) default NULL,

currency_value decimal(14,6) default NULL,

PRIMARY KEY (orders_id)

) TYPE=MyISAM;

 

I guess it dropped tables i needed. I honestly know nothing about mysql. I had managed to do something before that made my paypal ipn work..... but trying to fix the 'customers_company'.. i re-uploaded the orders.sql and lost that change i made :(

 

How do I re-add the tables, if that is what i need to do?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...