si.lithium Posted March 21, 2016 Share Posted March 21, 2016 Hey Folks, in the Backend there's the option, to define only one default sort-criteria for products, e.g. "Price". Is there a way, to define a second parameter, e.g. ...SORT BY 'PRICE', 'Reference'...so if two products have the same price, they will be sorted by the second criteria e.g. the reference-number. I've already tried to change the SQL-Statement in the Controllers, but the frontend is ignoring the second criteria. If there is any possibility, to give a second criteria, the customer would be very happy and pay some money for your solutions. We're waiting happily for some offers (effort, price). Thanks in advance. Best regdards, Matthias Link to comment Share on other sites More sharing options...
tuk66 Posted March 21, 2016 Share Posted March 21, 2016 In the Category::getProducts function, try to change: $sql .= ' ORDER BY '.(!empty($order_by_prefix) ? $order_by_prefix.'.' : '').'`'.bqSQL($order_by).'` '.pSQL($order_way).' to $sql .= ' ORDER BY '.(!empty($order_by_prefix) ? $order_by_prefix.'.' : '').'`'.bqSQL($order_by).'` '.pSQL($order_way).', p.`reference` ASC 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