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