Skip to content

Commit f1d1021

Browse files
author
Stubbe
committed
additions
1 parent 2a494c2 commit f1d1021

File tree

4 files changed

+187
-372
lines changed

4 files changed

+187
-372
lines changed

README.org

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,24 @@
99
*** Live Search
1010

1111
- Change Product Image to variant best matching query.
12-
- Changed Product Name to variant best matching query.
12+
- Changed Product Name to variant best matching query ?
1313

1414
*** Search Page
1515

1616
- Change Product Image to variant best matching query.
17-
- Changed Product Name to variant best matching query.
17+
- Changed Product Name to variant best matching query ?
1818
- Change Product Image to variant best matching facet selection.
19-
- Change Product Name to variant best matching product selection.
19+
- Change Product Name to variant best matching product selection ?
2020

2121
*** Feed
2222

2323
- Provide Variant names array.
2424
- Provide Variant Images array.
25-
- Provide Variant Keyswords array.
25+
- Provide Variant Keyswords/Synonyms array.
26+
27+
*** Expected behaviour with example
28+
29+
You should expect that the image for a product in the live search is changed to match keywords provided per variant. This could be done with any string attribute list.
30+
It has the caveat of not doing a fuzzy match, however it also allows you wider control of when to change variant images since you can directly address this by changing data in the list.
31+
32+
When providing a data attribute for which attributes to change picture for based on facet selection, it will overwrite the image selection based on the query, and instead use the variant value from the selected facet.

live_search/live_search.liquid

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@
3535
{% assign variant_synonyms = variant_synonyms + '|' %}
3636
{% endif %}
3737

38-
{% if loAs we talked about during the alignment meeting, we have made some design streamlining to My Clerk. It would be awesome if you could test some things out on staging 1 (https://staging1-my.clerk.io/)
39-
op.index0 < lim %}
38+
{% if loop.index0 < lim %}
4039
<a class="clerk_instant_search_link" href="{{ product.url }}">
4140
<div class="clerk_instant_search_product" data-variant-synonyms="{{ variant_synonyms }}" data-variant-images="{{ variant_images }}">
4241
<img class="clerk_instant_search_product_image" src="{{ product.image }}" />

0 commit comments

Comments
 (0)