smart_suggest_new

smart_suggest_new

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
smart_suggest_new [2018/08/03 14:18]
rihad [Extending via hookpoints]
smart_suggest_new [2018/11/08 15:04]
florian [Extending via hookpoints]
Line 16: Line 16:
 Groups are a feature for services using a CSV export that allows limiting the visibility of certain products to specific groups of people. The IDs of such groups must be part of the export. To distinguish between groups in Smart Suggest and search results, make sure an element as such is present in thesearch form: Groups are a feature for services using a CSV export that allows limiting the visibility of certain products to specific groups of people. The IDs of such groups must be part of the export. To distinguish between groups in Smart Suggest and search results, make sure an element as such is present in thesearch form:
  
-<​code><​input type="​hidden"​ name="​group[]"​ value="​GROUP_ID"></​code>​+<​code ​html><​input type="​hidden"​ name="​group[]"​ value="​GROUP_ID"></​code>​
  
 Usergroups are a feature for services using an XML export that allows not only limiting visibility, but also displaying different information to different people on the same product. Use a different input tag from above (not necessary for Direct Integration):​ Usergroups are a feature for services using an XML export that allows not only limiting visibility, but also displaying different information to different people on the same product. Use a different input tag from above (not necessary for Direct Integration):​
  
-<​code><​input type="​hidden"​ name="​usergroup"​ value="​USERGROUP"></​code>​+<​code ​html><​input type="​hidden"​ name="​usergroup"​ value="​USERGROUP"></​code>​
  
 It's also necessary to add the usergroup to the FINDOLOGIC JS snippet as such: It's also necessary to add the usergroup to the FINDOLOGIC JS snippet as such:
-<​code>​+<​code ​javascript>
 // ... // ...
 var mainUrl = "​https://​cdn.findologic.com/​static/​MD5_HASH_OF_SHOPKEY/​main.js?​usergrouphash=USERGROUP";​ var mainUrl = "​https://​cdn.findologic.com/​static/​MD5_HASH_OF_SHOPKEY/​main.js?​usergrouphash=USERGROUP";​
Line 61: Line 61:
 === Basic === === Basic ===
 <note important>​When extending the Smart Suggest via hookpoints, FINDOLOGIC cannot ensure the quality of the product anymore. Therefore, our technical support will not provide service for issues which are caused by adaptions of the Smart Suggest.</​note>​ <note important>​When extending the Smart Suggest via hookpoints, FINDOLOGIC cannot ensure the quality of the product anymore. Therefore, our technical support will not provide service for issues which are caused by adaptions of the Smart Suggest.</​note>​
- 
-Once Smart Suggest initialization is complete, the event ''​flAutocompleteReady''​ is dispatched on ''​document''​. The event object passed to its listeners allows for various customizations. 
- 
-To ensure that the even listener is always called, make sure to place a script tag as such before the FINDOLOGIC JS snippet: 
-<code html> 
-<​script>​ 
-document.addEventListener('​flAutocompleteReady',​ function (e) { 
-    // ... 
-}, false); 
-</​script></​code>​ 
  
 <​note>​ The examples in the sections below assume the context of the listener function!</​note>​ <​note>​ The examples in the sections below assume the context of the listener function!</​note>​
Line 247: Line 237:
 A list of suggestions,​ which is the response to a successful Smart Suggest request. Can be an emtpy array in case the query does not yield any useful suggestions. A list of suggestions,​ which is the response to a successful Smart Suggest request. Can be an emtpy array in case the query does not yield any useful suggestions.
  
-<​code>​+<​code ​json>
 { {
   "​$schema":​ "​http://​json-schema.org/​draft-04/​schema#",​   "​$schema":​ "​http://​json-schema.org/​draft-04/​schema#",​