Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overwriting productListingComments.js with the correct product selector #619

Merged
merged 4 commits into from
Jun 7, 2024

Conversation

chrisai-dev
Copy link
Contributor

@chrisai-dev chrisai-dev commented Apr 23, 2024

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.

@nicosomb nicosomb mentioned this pull request May 16, 2024
28 tasks
@SharakPL
Copy link
Contributor

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

@chrisai-dev
Copy link
Contributor Author

The query selector was fixed in PrestaShop/productcomments@51a0320

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

Copy link
Contributor

@tblivet tblivet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @chrisai-dev, I agree with you, theme.yml need an update to properly hook the module 👍 even if the PR name does not address the right issue !

@florine2623 florine2623 self-assigned this Jun 6, 2024
Copy link

@florine2623 florine2623 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @chrisai-dev ,

Thanks for the PR !

I followed the steps, they seem to work. But when I switch back to Classic theme, the hooks are hooked again.

  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. ✅
  5. Go to Design > Theme & Logo > Use this theme for Classic
  6. Check in Design -> Positions, Product Comments module is hooked to the following displayFooterProduct
    displayProductAdditionalInfo
    displayProductListReviews
    It should not ❌

Could you check ?
Thanks!

@florine2623 florine2623 removed their assignment Jun 6, 2024
@tblivet
Copy link
Contributor

tblivet commented Jun 6, 2024

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
Copy link

Hello @tblivet ,

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

@jolelievre
Copy link
Contributor

Thanks @florine2623 and @chrisai-dev

@jolelievre jolelievre merged commit 06f4e14 into PrestaShop:develop Jun 7, 2024
6 checks passed
@jolelievre jolelievre added this to the v0.2.1 milestone Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants