Posted on 06/02/2020 09:43:02
Hi Nicolai,
I was able to get suggestions in my Rapido website.
There is just one issue ...
The ProductListFeed.cshtml retuns Language filtered products based on the Products.query filter on Dynamicweb.Ecommerce.Context:LanguageID
But when it does not find any products it now returns my model of GetLoop("SpellCheckerSuggestions") as JSon, which I handle in the search.cshtml handlebars templating ...
This all results in a nice suggestion list, but this list of suggestions is NOT filtered on language.
In my case I get English and German suggestions on an English page.
Clicking an English term results in a list of products.
Clicking a German term results in a 'nothing found' page.
I can't seem to find a way to properly filter the GetLoop("SpellCheckerSuggestions") values to the current Language context ...
Request: /Default.aspx?ID=2215&feed=true&pagesize=7&Search=ligt&feedType=productsOnly&redirect=false&DoNotShowVariantsAsSingleProducts=True&searchType=combined&Template=SearchProductsTemplateWrap
Response: {"template":"SuggestionsTemplate","firstSuggestion":"light","suggestions":["light","mit","ist","link","zeigt","right","line","löst","gift","long"]}
PageID 2215 is an English page. I tried to put the AreaID in the request URL, that didn't help.
GetLoop("SpellCheckerSuggestions") doesn't contain area/language values to filter on myself (would be too late anyway).
What can I do?