mikebt Posted July 31, 2010 Posted July 31, 2010 This is some error at account history, order information. 1054 - Unknown column 'os.downloads_flag' in 'where clause' select date_format(o.date_purchased, '%Y-%m-%d') as date_purchased_day, opd.download_maxdays, op.products_name, opd.orders_products_download_id, opd.orders_products_filename, opd.download_count, opd.download_maxdays from orders o, orders_products op, orders_products_download opd, orders_status os where o.customers_id = '20' and o.orders_id = '8' and o.orders_id = op.orders_id and op.orders_products_id = opd.orders_products_id and opd.orders_products_filename != '' and o.orders_status = os.orders_status_id and os.downloads_flag = '1' and os.language_id = '1' Something about downloads? I do have a downloadable store. Anyone have an idea what this means?
MrPhil Posted July 31, 2010 Posted July 31, 2010 Does your orders_status table include the field downloads_flag? If you upgraded from osC 2.2 RC1 or earlier, you skipped the step where the field is added to the table: orders_status_id int DEFAULT '0' NOT NULL, language_id int DEFAULT '1' NOT NULL, orders_status_name varchar(32) NOT NULL, public_flag int DEFAULT '1', downloads_flag int DEFAULT '0', PRIMARY KEY (orders_status_id, language_id), KEY idx_orders_status_name (orders_status_name)
mikebt Posted July 31, 2010 Author Posted July 31, 2010 Does your orders_status table include the field downloads_flag? If you upgraded from osC 2.2 RC1 or earlier, you skipped the step where the field is added to the table: orders_status_id int DEFAULT '0' NOT NULL, language_id int DEFAULT '1' NOT NULL, orders_status_name varchar(32) NOT NULL, public_flag int DEFAULT '1', downloads_flag int DEFAULT '0', PRIMARY KEY (orders_status_id, language_id), KEY idx_orders_status_name (orders_status_name) All I did was download the osc 2.2 then purchased a templete for my store. What should I do and where so I find out if I need to include this field?
Guest Posted July 31, 2010 Posted July 31, 2010 Mike, If the template you purchased is NOT V2.2 RC2a, you will have to manually upgrade the site to RC2a. You will find upgrade instructions in the .zip file of V2.2 RC2am however it may be more difficult because of your custom template. Chris
mikebt Posted August 1, 2010 Author Posted August 1, 2010 Mike, If the template you purchased is NOT V2.2 RC2a, you will have to manually upgrade the site to RC2a. You will find upgrade instructions in the .zip file of V2.2 RC2am however it may be more difficult because of your custom template. Chris Yes the template was OsCommerce 2.2 RC2a, however, I still don't understand why I am having these errors.
MrPhil Posted August 1, 2010 Posted August 1, 2010 Does your orders_status table match what I showed before? If not, something went wrong somewhere, and you have an older database layout that doesn't match the code. When you purchased a template, were you supposed to apply it to a freshly installed 2.2 RC2a, or is it an "all in one" turnkey installation? If the latter, it's the seller's responsibility to bring their code and installation up to date. "osc 2.2" says nothing -- that version has been around for 7 or 8 years. "osC 2.2 RC2a" is the latest (2.5 years old, and woefully out of date and unmaintained, but that's the best there is, unless you want to do manual fixes).
mikebt Posted August 4, 2010 Author Posted August 4, 2010 Does your orders_status table match what I showed before? If not, something went wrong somewhere, and you have an older database layout that doesn't match the code. When you purchased a template, were you supposed to apply it to a freshly installed 2.2 RC2a, or is it an "all in one" turnkey installation? If the latter, it's the seller's responsibility to bring their code and installation up to date. "osc 2.2" says nothing -- that version has been around for 7 or 8 years. "osC 2.2 RC2a" is the latest (2.5 years old, and woefully out of date and unmaintained, but that's the best there is, unless you want to do manual fixes). This template was suppose to be up to date and it is. Here's what I did. I started all over without applying the template that I purchased and I tested my store again and STILL I saw the error. So it is not the template at all. Now I know it is oscommerce files itself. I downloaded the oscommerce-2.2rc2a.zip and installed it correctly and did my test then after that, I still got that same error. Does anyone know how could I fix this?
mikebt Posted August 4, 2010 Author Posted August 4, 2010 Does your orders_status table include the field downloads_flag? If you upgraded from osC 2.2 RC1 or earlier, you skipped the step where the field is added to the table: orders_status_id int DEFAULT '0' NOT NULL, language_id int DEFAULT '1' NOT NULL, orders_status_name varchar(32) NOT NULL, public_flag int DEFAULT '1', downloads_flag int DEFAULT '0', PRIMARY KEY (orders_status_id, language_id), KEY idx_orders_status_name (orders_status_name) what line would I find this? I am checking in the orders status and I dont see this
MrPhil Posted August 4, 2010 Posted August 4, 2010 It's not code. It's the definition of a MySQL table. Go into phpMyAdmin (or whatever other tool you have for playing in your database) and examine the defined structure of the orders_status table. If it's missing the downloads_flag field, add it as shown. Note that if a database structure update was missed in one place, there could very well be other places where updates are missing (this may not be the last such problem you see).
mikebt Posted August 5, 2010 Author Posted August 5, 2010 It's not code. It's the definition of a MySQL table. Go into phpMyAdmin (or whatever other tool you have for playing in your database) and examine the defined structure of the orders_status table. If it's missing the downloads_flag field, add it as shown. Note that if a database structure update was missed in one place, there could very well be other places where updates are missing (this may not be the last such problem you see). Yes, It was that the downloads_flag int DEFAULT '0'was not in my table and after I added it the error is gone, however, I dont see any links to download. The items in my store shows a status of delivery as if I am shipping something off and it is only a downloadable store. Theres something else that I need to change in order to have my store based only on downloads.
MrPhil Posted August 5, 2010 Posted August 5, 2010 Search around. There are several settings you need to do, somewhere, to enable digital downloads in osC. Then, each downloadable product must be configured. Just adding the field to the table, by default every product has a flag of 0, which I presume means "not downloadable". Somewhere in product administration there is a button to enable downloads for that product. I don't know whether you already have the appropriate links in the database, or need to (re)enter them.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.