Page 1 of 1

1.2.9 order filter by name

Posted: Wed Jul 22, 2009 12:26 am
by booksandtoys
When I try to filter my orders by name, I get the following error:

Error: Unknown column 'o.firstname' in 'where clause'
Error No: 1054
SELECT COUNT(*) AS total FROM `order` WHERE order_status_id > '0' AND CONCAT(o.firstname, ' ', lastname) LIKE '%tracy%'

Can anyone help?

Re: 1.2.9 order filter by name

Posted: Wed Jul 22, 2009 1:02 am
by Daniel
remove the .o in the query

i think i fixed this in 1.3.0

Re: 1.2.9 order filter by name

Posted: Fri Jul 24, 2009 8:18 am
by WCNZ
Daniel's right: Here's how you do it

1: Open admin > model > customer > order.php
2: Go to line 148
3: change this part:

$sql .= " AND CONCAT(o.firstname, ' ', lastname)

to this

$sql .= " AND CONCAT(firstname, ' ', lastname)

That fixes the filter by name error. ;)