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

feat: add option to aggregate similar products to verified reviews #634

Conversation

pedrobernardina
Copy link
Contributor

@pedrobernardina pedrobernardina commented May 31, 2024

Summary

This update introduces new options and fixes missing or incorrect types to help developers replicate the native Verified Reviews experience (VTEX IO App or Script Tag)

Fixes

  • Corrected types that did not align with the API responses.

Additions

  • dateCreated attribute to AggregateRating:
    • Verified Reviews now display the order date instead of the review's published date.
  • stats attribute to Verified Reviews AggregateRating:
    • Added to calculate how many customers recommend the product.
  • Option to aggregate reviews for similar products:
    • Final ratings are calculated as a weighted average of all similar products' ratings, based on their respective review counts.
    • This feature can be tested by enabling the new "aggregateSimilarProducts" option in the Admin and running the loader.
    • Use case: In some segments, product variations are registered as separate products instead of SKUs, making it valuable to aggregate their reviews for a more accurate representation.

OBS: I've closed #633 but there are review comments there (that have already been addressed).

@pedrobernardina pedrobernardina force-pushed the feat/verified-reviews-aggregate-similars branch from b729cb7 to d05d067 Compare June 5, 2024 14:52
@matheusgr
Copy link
Contributor

@pedrobernardina Can you apply the @gabrielMatosBoubee suggestion?

@guitavano
Copy link
Contributor

Up @pedrobernardina

@pedrobernardina pedrobernardina force-pushed the feat/verified-reviews-aggregate-similars branch 2 times, most recently from 030ac0c to 46dba03 Compare December 2, 2024 14:22
@pedrobernardina pedrobernardina force-pushed the feat/verified-reviews-aggregate-similars branch from 46dba03 to 65c2328 Compare December 2, 2024 14:41
@pedrobernardina
Copy link
Contributor Author

pedrobernardina commented Dec 2, 2024

@guitavano @gabrielMatosBoubee @matheusgr

It took some time, but I've reviewed the code.

@matheusgr matheusgr merged commit bff2a88 into deco-cx:main Dec 17, 2024
1 check passed
@pedrobernardina pedrobernardina deleted the feat/verified-reviews-aggregate-similars branch December 20, 2024 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants