Vico_b Posted December 23, 2021 Share Posted December 23, 2021 Hello, tl;dr. I need to order my product list (in the catalog pages) by ps_product_shop.unity. In prestashop 1.7.5 you have this field in product/price/ screen The field on the right (the one with '2' inside) is refered in the table 'ps_product_shop->`unity` I want to sort my product list using this field I have tried to change the `getProductSearchQuery()` method in "CategoryController.php" like so ->setSortOrder(new SortOrder('product', Tools::getProductsOrder('by','unity'), Tools::getProductsOrder('way'))) It doesn't work (but if I put for exemple 'date_upd' instead, it does sort by date update) I also tried to change the Product.php class `getProducts()` method. But no matter what I do in that class, nothing change. Even if I remove the code inside that method, the catalog keep showing up and no error. Link to comment Share on other sites More sharing options...
Vico_b Posted December 30, 2021 Author Share Posted December 30, 2021 I don't understand, it's pretty common to sell stuff by its mesuring value (liters, meters, cmeters, etc) why is not native? Can anyone help me please? 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