Page 1 of 1

User gets error when viewing under (my downloads)

Posted: Wed Apr 15, 2009 11:13 pm
by halalan
I am testing v. 1.2.6 and after signing up as a customer then going into my account. I clicked on (my downloads) Note: I have not ordered any.

I got this error:

Code: Select all

Error: Unknown column 'o.order_status' in 'where clause'
Error No: 1054
SELECT COUNT(*) AS total FROM order_download od LEFT JOIN `order` o ON (od.order_id = o.order_id) WHERE o.customer_id = '3' AND o.order_status > '0' AND o.order_status_id = '5'
Possible bug...maybe

Re: User gets error when viewing under (my downloads)

Posted: Thu Apr 16, 2009 1:33 am
by Dayo
It is definitely a bug.

Confirmed it here as well.

Re: User gets error when viewing under (my downloads)

Posted: Fri Apr 17, 2009 12:21 am
by halalan
This had gotten posted as a bug on the tracking system link http://code.google.com/p/opencart/issues/list but now its gone.

Has it been corrected and if so...does someone have the fix ?? So, I can correct it with my current v1.2.6 test site!!

Re: User gets error when viewing under (my downloads)

Posted: Fri Apr 17, 2009 4:51 am
by phpuk
Hi,

Script: catalog/model/account/download.php

Replace:

Code: Select all

AND o.order_status > '0' AND o.order_status_id = '"
with:

Code: Select all

AND o.order_status_id > '0' AND o.order_status_id = '"
in all four instances of the sql statement.

Phil.

Re: User gets error when viewing under (my downloads)

Posted: Fri Apr 17, 2009 6:25 am
by halalan
That took care of it....appreciate it. I am sure it is already updated in the Main OpenCart download file v1.2.6 :)

Re: User gets error when viewing under (my downloads)

Posted: Fri Apr 17, 2009 6:30 am
by phpuk
No it's not but will be in next release.