renaud2263 Posted January 31, 2018 Share Posted January 31, 2018 Hi everybody, In my __construct() I have this request: $this->_select = 'a.*, DATE(a.dlc) AS dlc, pl.name AS pname'; $this->_join = ' INNER JOIN `'._DB_PREFIX_.'product_lang` pl ON (pl.`id_product` = a.`id_product` AND pl.`id_lang` = '.(int)$this->context->language->id.')'; $this->_orderBy = 'a.id_product'; $this->_orderWay = 'ASC'; $this->_group = 'GROUP BY a.id'; My simple question: I would like to order by a.id_product AND another field. I tried many ways but always return error bad request. How can I do ? Link to comment Share on other sites More sharing options...
NemoPS Posted February 1, 2018 Share Posted February 1, 2018 I think it's just not possible with the helper, I have never seen it used with multiple columns. You can try with an array, but I haven't see it used like that Link to comment Share on other sites More sharing options...
renaud2263 Posted February 1, 2018 Author Share Posted February 1, 2018 Hello, I've ever tried with an array, without success. So in this configuration, how can I formulate my request ? Something like $this->query = "SELECT ........" ? Link to comment Share on other sites More sharing options...
NemoPS Posted February 2, 2018 Share Posted February 2, 2018 Honestly I believe it's not possible, I searched through the controllers and all of them use that pattern (yeah, it sucks...) Link to comment Share on other sites More sharing options...
NemoPS Posted February 2, 2018 Share Posted February 2, 2018 What do you mean? You can access orders by using Order::getOrdersWithInformations() 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