hello, I just migrated all my data from oscommerce to opencart. In my admin on the opencart when I go to my customer list they are listed in order of first name alphabetically. Is there a way to get them to be listed by last name? Also, how about getting the date to be formatted mm/dd/yyyy also. I'm not used to dd/mm/yyyy. (VER 1.5.1)
Rob
Rob
Last edited by custompilotshirts on Mon Sep 26, 2011 5:13 am, edited 2 times in total.
open: admin/model/sale/customer.php
find
change to
find
Code: Select all
if (isset($data['sort']) && in_array($data['sort'], $sort_data)) {
$sql .= " ORDER BY " . $data['sort'];
} else {
$sql .= " ORDER BY name";
}
Code: Select all
if (isset($data['sort']) && in_array($data['sort'], $sort_data)) {
$sql .= " ORDER BY " . $data['sort'];
} else {
$sql .= " ORDER BY c.lastname";
}
This is strange, but in addition to the change above, you also need to do this change
open: admin/controller/sale/customer.php
find:
change to
open: admin/controller/sale/customer.php
find:
Code: Select all
if (isset($this->request->get['sort'])) {
$sort = $this->request->get['sort'];
} else {
$sort = 'name';
}
Code: Select all
if (isset($this->request->get['sort'])) {
$sort = $this->request->get['sort'];
} else {
$sort = 'c.lastname';
}
@uksb: sir, I want to list latest customers on top or first in the list so how do I change this in oc-2.0.3.1, now it is sorting by customer name which is senseless.uksitebuilder wrote:Just changing the controller file should work
Thank You for your time.
Regards,
Sun Systems
Industrial Electronics and Instrumentation
Who is online
Users browsing this forum: No registered users and 4 guests