ps8modules Posted November 14, 2020 Share Posted November 14, 2020 (edited) I created an override Category.php and modified sql in the getProducts function. I added the condition 'AND p.id_product > 2' Works only on homepage, does not display products with lower id than 2. When I open a category page that contains products with an id less than 2 and it appears, it simply ignores the condition in sql. Why is this happening? Thank you Page Home: ============================================================================================================================= ============================================================================================================================= Category page: I've already found a problem. The problem is caused by the ps_facetedsearch module, which creates custom SQL categories for categories in ./modules/ps_facetedsearch/src/Adapter/MySQL.php It will probably be a good solution to create an override for MySQL.php How to create override of ps_facetedsearch and add custom where condition? Or use in a module actionProductListOverride and somehow use where? Thank you Edited November 14, 2020 by WebSoft (see edit history) 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