Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Error in admin


Recommended Posts

I am getting this error when I try to update a product. What would cause this???


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


update products_description set products_quantity = '10', products_model = 'ST01BEDCleo', products_price = '169.7642', products_date_available = null, products_weight = '0.00', products_status = '1', products_tax_class_id = '1', manufacturers_id = '', products_image = 'cleo.jpg', products_last_modified = now() where products_id = '624' and language_id = '1'



Link to comment
Share on other sites

I don't know about the above but you can work around it by copying everything(product desc. etc) into notepad, deleting your product then creating it again from scratch with your new product quantity.


If this is happening for all your products then it is probably because one of your files in admin or somewhere is corrupt.


If you figure out which file, make a backup, then upload a fresh copy.



Menou and unome

Link to comment
Share on other sites

There is no products_length in any of my sql tables. What is this for? It isn't included in a stock install either. I am unsure how this came about because every contribution that I have added, I have gone through and made sure of changes to admin and sql tables.

Link to comment
Share on other sites

I'm sorry - I meant products_quantity (not products_length). That SQL error is saying there is no field called products_quantity in your field_list table which is why it's likely that a contribution has not been correctly installed.

Link to comment
Share on other sites

In a default osCommerce install these are the 'products' tables:


CREATE TABLE products (
 products_id int NOT NULL auto_increment,
 products_quantity int(4) NOT NULL,
 products_model varchar(12),
 products_image varchar(64),
 products_price decimal(15,4) NOT NULL,
 products_date_added datetime NOT NULL,
 products_last_modified datetime,
 products_date_available datetime,
 products_weight decimal(5,2) NOT NULL,
 products_status tinyint(1) NOT NULL,
 products_tax_class_id int NOT NULL,
 manufacturers_id int NULL,
 products_ordered int NOT NULL default '0',
 PRIMARY KEY (products_id),
 KEY idx_products_date_added (products_date_added)

DROP TABLE IF EXISTS products_attributes;
CREATE TABLE products_attributes (
 products_attributes_id int NOT NULL auto_increment,
 products_id int NOT NULL,
 options_id int NOT NULL,
 options_values_id int NOT NULL,
 options_values_price decimal(15,4) NOT NULL,
 price_prefix char(1) NOT NULL,
 PRIMARY KEY (products_attributes_id)

DROP TABLE IF EXISTS products_attributes_download;
CREATE TABLE products_attributes_download (
 products_attributes_id int NOT NULL,
 products_attributes_filename varchar(255) NOT NULL default '',
 products_attributes_maxdays int(2) default '0',
 products_attributes_maxcount int(2) default '0',
 PRIMARY KEY  (products_attributes_id)

DROP TABLE IF EXISTS products_description;
CREATE TABLE products_description (
 products_id int NOT NULL auto_increment,
 language_id int NOT NULL default '1',
 products_name varchar(64) NOT NULL default '',
 products_description text,
 products_url varchar(255) default NULL,
 products_viewed int(5) default '0',
 PRIMARY KEY  (products_id,language_id),
 KEY products_name (products_name)

DROP TABLE IF EXISTS products_notifications;
CREATE TABLE products_notifications (
 products_id int NOT NULL,
 customers_id int NOT NULL,
 date_added datetime NOT NULL,
 PRIMARY KEY (products_id, customers_id)


If you don't have all of those then the database did not install correctly.



Link to comment
Share on other sites

Yes, that's what I don't understand Rhea. I have exactly those tables. It seems as tho osc is checking the products_description table for what is actually in the products table. This only happens when I go to try to make changes to a product.

Link to comment
Share on other sites

  • 2 weeks later...

Ok, I found the problem. In Header Tags Contribution, there was a line of code that duplicated and wasn't removed in the last update. I commented it out and voila.....now I can update products.

Link to comment
Share on other sites


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

  • Create New...