Jump to content

Edit History

ps8modules

ps8modules

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

obrazek.png.91767962d1939cec7dc978469f5118e6.png

Page Home:

obrazek.thumb.png.d82bf4b688b651e4482c472569681ae6.png

obrazek.thumb.png.e0bc097e3ae01e4a2972b7aa965a5c83.png

 

=============================================================================================================================

=============================================================================================================================

Category page:

obrazek.thumb.png.950d97b6c50ad4930cbbfd3e38145085.png

obrazek.thumb.png.b06321aeb9b1cb25eacca1bd4a853317.png

 

 

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

 

ps8modules

ps8modules

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

obrazek.png.91767962d1939cec7dc978469f5118e6.png

Page Home:

obrazek.thumb.png.d82bf4b688b651e4482c472569681ae6.png

obrazek.thumb.png.e0bc097e3ae01e4a2972b7aa965a5c83.png

 

=============================================================================================================================

=============================================================================================================================

Category page:

obrazek.thumb.png.950d97b6c50ad4930cbbfd3e38145085.png

obrazek.thumb.png.b06321aeb9b1cb25eacca1bd4a853317.png

 

 

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?

Thank you

ps8modules

ps8modules

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

obrazek.png.91767962d1939cec7dc978469f5118e6.png

Page Home:

obrazek.thumb.png.d82bf4b688b651e4482c472569681ae6.png

obrazek.thumb.png.e0bc097e3ae01e4a2972b7aa965a5c83.png

 

=============================================================================================================================

=============================================================================================================================

Category page:

obrazek.thumb.png.950d97b6c50ad4930cbbfd3e38145085.png

obrazek.thumb.png.b06321aeb9b1cb25eacca1bd4a853317.png

 

 

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 MySQL.php module?

Thank you

ps8modules

ps8modules

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

obrazek.png.91767962d1939cec7dc978469f5118e6.png

Page Home:

obrazek.thumb.png.d82bf4b688b651e4482c472569681ae6.png

obrazek.thumb.png.e0bc097e3ae01e4a2972b7aa965a5c83.png

 

=============================================================================================================================

=============================================================================================================================

Category page:

obrazek.thumb.png.950d97b6c50ad4930cbbfd3e38145085.png

obrazek.thumb.png.b06321aeb9b1cb25eacca1bd4a853317.png

ps8modules

ps8modules

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

ps8modules

ps8modules

I created an override Category.php and modified sql in the getProducts function.
I added the condition 'AND p.id_product > 10'

Works only on homepage, does not display products with lower id than 10.

When I open a category page that contains products with an id less than 10 and it appears, it simply ignores the condition in sql.

Why is this happening?

Thank you

×
×
  • Create New...