Dhara1510 Posted November 10, 2020 Share Posted November 10, 2020 (edited) I need to modify the listing of the products for the selected category. For that i need to modify the sql query of the listing. I really tried hard to search for the sql but i cannot found that. From other forums i found that `classes/Category.php` file have `getProducts` method which will work. I tried to modify it but it only modify the listing for the Home page only. I want to modify when user go to `All Product` and selected any category. I tried but i failed. Can anyone please help me. Edited November 10, 2020 by Dhara1510 (see edit history) Link to comment Share on other sites More sharing options...
rrataj Posted November 20, 2020 Share Posted November 20, 2020 It really depends what do you want to change in this listing. In presta 1.7 the controller which is responsible for getting products (basically it's done via ProductSearchQuery class which manages it) is /controllers/front/listing/CategoryController.php, and "getProductSearchQuery()" method. Link to comment Share on other sites More sharing options...
FredDigital Posted September 14, 2021 Share Posted September 14, 2021 Hi , i have the same problem i want to change my list of product for don't select one category on product , anyone have solution ? Thanks you Link to comment Share on other sites More sharing options...
rrataj Posted September 14, 2021 Share Posted September 14, 2021 I don't understand what you want to change for what. Please describe it more precisely, maybe with examples. Link to comment Share on other sites More sharing options...
FredDigital Posted September 14, 2021 Share Posted September 14, 2021 When a custom order is done, a new product appear into the product list from the back office, the reference of this product is "custom-" and a series of random number. i do not want to delete this generated custom product. but i need them to not appear in the back office product list. i've made query in phpMyAdmin like " SELECT reference FROM ps_product WHERE reference NOT LIKE 'custom-%' " it works fine and return every product from the ps_product table, and does not select the customs. but in pretashop source code, querys are quite different, and i can't find out how i can make it. 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