haspo Posted October 21, 2016 Share Posted October 21, 2016 (edited) Hi, I think its not a big problem, but here we go. I've created a module and added it to admin meniu. There I'm showing one table from database, but the problem is that I need that table to be with specific order. There are two columns "reservation_date" and "reservation_time". The date should be with orderway "DESC" and time should be ordering by "ASC" way. But how to accomplish that? All I got now is this: $this->_orderBy = 'a.reservation_date'; $this->_orderWay = 'DESC'; But I also need to order by time. PLEASE HELP ME!! I think its not difficult, but I can't find an answer for a whole day! Edited October 21, 2016 by haspo (see edit history) Link to comment Share on other sites More sharing options...
haspo Posted October 21, 2016 Author Share Posted October 21, 2016 anyone? please help :/ Link to comment Share on other sites More sharing options...
rocky Posted October 22, 2016 Share Posted October 22, 2016 It's not possible using PrestaShop's helper classes. It seems you'll have to override the AdminController::getList function. I see the ORDER BY part on line 3213: $sql_order_by = ' ORDER BY '.((str_replace('`', '', $order_by) == $this->identifier) ? 'a.' : '').$order_by.' '.pSQL($order_way). 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now