Prestashop: Module ps_featuredproducts - display products from categories children

Created on 29 Jul 2020  路  13Comments  路  Source: PrestaShop/PrestaShop

Describe the bug

Does not display products from children categories
Example :

  • 1654 (category has no products)
  • 1655 (the category is a child of 1654) (category has products)

Expected behavior

Display products from categories children

Edit by Khouloud

Steps to reproduce the issue:

  1. Create two categories Cat1 and child category Child_Cat1
  2. Create some products with associated categories Child_Cat1
  3. Configure the ps_featuredproducts module with Category from which to pick products to be displayed = id_Cat1
  4. Go to FO > Home page
  5. there is no product displayed

Steps to Reproduce

  1. Select ID CATEGORY (HOME_FEATURED_CAT) - Example : 1654
  2. No result

Screenshots

If applicable, add screenshots or screen recordings to help explain your problem.

Additional information

  • PrestaShop version: 1.7.6.7
  • Module ps_featuredproducts : 2.1.0
  • PHP version: 7.2
1.7.6.7 FO Featured products Improvement TBS waiting for PM

All 13 comments

Thanks for opening this issue! We will help you to keep its state consistent

Hi @valentin-anamorphik,

First, the ps_facetedsearch module in your case is not updated.
The last version 3.5.0.

Second, If you go to BO => Modules => Module Manager => Serch from the ps_facetedsearch module and configure it, you have an option "Show products from subcategories", you need to enable it.
image

https://drive.google.com/file/d/1-P4fWW11av3o4aZgdGzJn5AlVofd9hGG/view?usp=sharing

Thanks to check and feedback.

Hi @khouloudbelguith ,

Thanks, but ps_facetedsearch is disabled. We don't need it.

@valentin-anamorphik, BUt this option is implemented into the ps_facetedsearch module.
Thanks!

Why this option is implemented into the ps_facetedsearch module ?

I want to use ps_featuredproducts module...

@valentin-anamorphik, as you can see in my screenshot
image

The option "Show products from subcategories" should be enabled.

Thanks!

@khouloudbelguith

I understand.

But this option (PS_LAYERED_FULL_TREE) is implemented into the ps_facetedsearch module while the problem is on the module ps_featuredproducts.

I deleted ps_facetedsearch module on PrestaShop.
I use pm_advancedsearch4 module.

Thanks.

@valentin-anamorphik, the ps_featuredproducts module is hooked to displayHome, it is displayed on the Home page.
In your case your issue is

Does not display products from children categories

In the FO > Category page > products of child categories are not displayed? is it?

I attached a screen record previously, it describes your main issue? is it?

Thanks!

1
2020-08-03_16h44_42
2
2020-08-03_16h47_59
3
2020-08-03_16h50_32

Attachments

  • BO : product in children category
  • FO : ps_featuredproducts in home page (only 2 products)
  • FO : Category page > products (3 products)

@valentin-anamorphik, Thanks for these clarifications.
I have the same behavior as PS1.7.6.7 and ps_featuredproducts v2.1.0.
Steps to reproduce the issue:

  1. Create two categories Cat1 and child category Child_Cat1
  2. Create some products with associated categories Child_Cat1
  3. Configure the ps_featuredproducts module with Category from which to pick products to be displayed = id_Cat1
  4. Go to FO > Home page
  5. there is no product displayed

@PrestaShop/prestashop-product-team what do you think, can we add a new option in the ps_featuredproducts configuration to Enable/Disable Show products from subcategories?
image

Thanks!

As the module homefeatured (https://github.com/PrestaShop/homefeatured) on PrestaShop 1.6

Do you have a solution?

can you send us modifications to add to the module?

https://github.com/PrestaShop/ps_featuredproducts/blob/master/ps_featuredproducts.php#L268

@valentin-anamorphik, this improvement should be specified by our Product team first and fixed by our developers.
Thanks for your understanding!

Was this page helpful?
0 / 5 - 0 ratings