Commit 72a5168
authored
fix: don't require recommend for brands plugin (#32)
If you currently run the demo without Recommend, the popup doesn't
display because the recommend index isn't found.
Since Recommend is complex to setup, I propose to not rely on it by
default, so anyone can run the demo more easily.
This PR uses the same approach than #31 to fetch the most popular
`brand` facets from the search results.
I'm also leaving the recommend code commented to give pointer about how
to integrate Recommend.
Note: since our demo index is not fully trained, this approach actually
works better:
- the current demo displays `Lacy-D`, `Arlene` and `Lacy-S`
- locally I now get `Apple`, `Sony`, `Lacy-D` and `Garmin`
---
SFCC-3901 parent 0debc6d commit 72a5168
File tree
1 file changed
+39
-10
lines changed- overrides/app/components/algolia/autocomplete/plugins
1 file changed
+39
-10
lines changedLines changed: 39 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
27 | 49 | | |
28 | | - | |
29 | | - | |
30 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
31 | 61 | | |
32 | 62 | | |
33 | 63 | | |
| |||
41 | 71 | | |
42 | 72 | | |
43 | 73 | | |
44 | | - | |
| |||
0 commit comments