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

Popularity Plugin: Only leaf collections get a popularity score #551

Open
martijnvdbrug opened this issue Dec 18, 2024 · 0 comments
Open

Comments

@martijnvdbrug
Copy link
Member

Which plugin/repository is the issue about?
Popularity Score plugin

Describe the bug
Parent collections should have the sum of their children's popularity score as their own score. Right now only leaf collections have a popularity score.

image

Expected behavior

  1. Calculate popularity scores of all products (already works)
  2. Find all collections without children, and calculate their scores based on the products in it
  3. Get parents of collections and sum their scores
  4. Traverse the parents until you end up at the root collections.

Environment

  • NodeJS version
  • Vendure version: 3.1.1
  • Plugin version 1.7.3
  • Database MySQL
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

No branches or pull requests

1 participant