PrestaShop / hummingbird

77 stars 73 forks source link

Overwriting productListingComments.js with the correct product selector #619

Closed chrisai-dev closed 1 month ago

chrisai-dev commented 3 months ago
Questions Answers
Description? Product reviews/comments weren't loaded via ajax on the category page.
Type? bug fix
BC breaks? no
Deprecations? no
Fixed ticket?
Sponsor company
How to test? View a category that has products with reviews Check if theme correctly hook productcomments module

To test it, go to a shop where the Classic theme and Hummingbird theme are installed.

  1. Make the Classic theme active and ensure the Product Comments module is active if it's not already.
  2. Unhook the Product Comments module from the following hooks (BO: Design -> Positions):
    • displayFooterProduct
    • displayProductAdditionalInfo
    • displayProductListReviews
  3. Change the theme to Hummingbird.
  4. Check in Design -> Positions if the Product Comments module is correctly hooked into the above hooks.
SharakPL commented 2 months ago

This should be fixed already. Try fresh hummingbird and productcomments module min v.6.0.3

chrisai-dev commented 2 months ago

The query selector was fixed in https://github.com/PrestaShop/productcomments/pull/198/commits/51a0320c41e82a1ba08b6ee2a648a1a670019f74

but the PR is still needed for the theme.yml config.

tblivet commented 1 month ago

Hi @florine2623,

You mean, when you switch from Hummingbird to Classic, the module productcomments hooks again on displayFooterProduct, displayProductAdditionalInfo, and displayProductListReviews. If that's the case, it's normal because both themes need to correctly hook the module to these hooks.

What @chrisai-dev has done is reproduce the behavior of Classic, which was correct but missing in Hummingbird. I don't know if this is clear ? Don't hesitate to let me know if it's not.

florine2623 commented 1 month ago

Hello @tblivet ,

Ok, it is clear to me. Thanks for the details ^^

jolelievre commented 1 month ago

Thanks @florine2623 and @chrisai-dev