viveff Posted May 11, 2016 Share Posted May 11, 2016 Hello everyone, I would like to change the order of the product in category page, but not like in the BO. I would like first, all the new product, THEN the position of the product in BO. Do you know how could I make it ? Thanks you, Link to comment Share on other sites More sharing options...
shokinro Posted May 16, 2016 Share Posted May 16, 2016 (edited) You will need to change the SQL query in method getProducts() in Category class or its override class. /classes/Category.php or (recommended) /override/classes/Category.php Change the ORDER BY portion to following ORDR BY p.date_upd DESC, cp.position asc Edited May 16, 2016 by shokinro (see edit history) Link to comment Share on other sites More sharing options...
viveff Posted May 16, 2016 Author Share Posted May 16, 2016 Thanks for the answer, That's what i try to do, but when i change the sql, it's doesn't do anything in front office, even when the function is totaly empty . Thanks you Link to comment Share on other sites More sharing options...
shokinro Posted May 16, 2016 Share Posted May 16, 2016 Are you using block layered module? If you use that module, then the getProducts() method was hijacked by that module. The product list is generated inside that module, you will need go modify related code in that module. 1 Link to comment Share on other sites More sharing options...
viveff Posted May 16, 2016 Author Share Posted May 16, 2016 Thanks you, That's exactly what i was looking for, you save me a couple of days i thinks, Link to comment Share on other sites More sharing options...
shokinro Posted May 17, 2016 Share Posted May 17, 2016 You are welcome, I am glad it helped and thanks for update. 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