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

Challenge sales "Leaderboard" widget #1596

Open
Tirodem opened this issue Nov 29, 2024 · 0 comments · May be fixed by #1597
Open

Challenge sales "Leaderboard" widget #1596

Tirodem opened this issue Nov 29, 2024 · 0 comments · May be fixed by #1597

Comments

@Tirodem
Copy link
Contributor

Tirodem commented Nov 29, 2024

We want to create a new widget, "Leaderboard", inspired by challenge widget.

On creation, we choose X products, a begin date / hour, a end date / hour, a mode (totalProducts or MoneyAmount + currency).
We don't set a goal, as it's the ranking (the score of the highest is the comparative "goal" of the others).

When used on a CMS page through [Leaderboard=ID], we'll display this (desktop version) :
image
Mobile version (we remove short description) :
image
The 1st has its gauge filled to 100%.
The ratio for every other gauge is set by the 1st score as a goal (if the first has 10000 and the third has 3255, the 1st gauge will be filled up to 100%, the 3rd gauge will be filled up to 32.55%, because it has 32.55% of the 1st current score).
We display from highest to lowest.
In case of draw, we sort by product slug.

We can put on the burner an option to display & sort by :

  • by score desc (default)
  • by score asc
  • by id desc
  • by id asc
  • randomly

Like a challenge, when an order is paid, the Progress of the individual product is updated with the paid amount.
We can use the same checks as the challenges :

  • the "event" sub-object we use on the "challenge" collection can be adapted (no global "amount" entry, we create N sub-object with product-slug and individual amount)
    image
  • the notification through email when an order is paid (but with individual progress per product on the order)

On admin - widget creation :
image
image
(note : I see on challenge that I can create a challenge with only the date, while, on edition, I can edit it with the hours & minutes, we should fix that)
On save :
image
On save with error management :
image

On admin - edition & reporting :
image
"Products" cannot be empty.
"Products" list cannot be changed after widget creation.
image
As long as "Edit progress" it not checked, "Current score" input is disabled.
Price currency is always disabled and cannot be changed after widget creation.
image
image

@Tirodem Tirodem changed the title "Sales leaderboard" widget Challenge sales "Leaderboard" widget Nov 29, 2024
@ithiame ithiame linked a pull request Nov 29, 2024 that will close this issue
@ithiame ithiame linked a pull request Nov 29, 2024 that will close this issue
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 a pull request may close this issue.

1 participant