Best Bets Commerce Category

Vote:
 

Hi Guys,

EPiServer.Find 13.2.1
EPiServer.Find.Cms 13.2.1
EPiServer.Find.Commerce 11.1.1

Is it possible to select a commerce catalog node as the content for a Best Bet? My nodes appear greyed out.

Looks like this used to be possible from some old posts in google?

Also is it possible to apply best bets to a FIND query via code? i.e. would I be able to create a block that allows a user to select a catalog node, retrieve all products within that node and then somehow add these as the best bests for my query?

Thanks in advance
Mark

#217515
Feb 25, 2020 1:44
Vote:
 

Category support has been added in Find.Commerce 9.6.1 so it should be there. Do you see any error in Browser console or in log?

I'm not sure I follow your second question, but for your query you can use .ApplyBestBets() to make Find return results from best bets.

IF you want to set the best bets programmatically then you can use IBestBetRepository, but this is equivalent to the UI, it should not be used in the query ... 

#217726
Feb 28, 2020 8:52
Vote:
 

You probably got the answer from my colleague, but for future visitors, Best bets requires to content to be route-able, which means it has to have a template (i.e. ContentController<T> for that content type T). If you don't have one, then the content of that type will not be selected 

#217964
Mar 03, 2020 9:59
Vote:
 

Thanks Quan, I'll add a template. 

In term of adding BestBets via code, I am wanting to add these to the query.  Our client would like to setup mulitple BestBets and then order these.  i.e. If the customer searches for "ABC" they want a BestBet added for catalogue node "XYZ" and "123", but they want products from "123" to appear before products in "XYZ".  I think currently I'll be able to add miltiple BestBets via the UI, however I wouldn't be able to dictate the order in which these would be displayed.  Hence wondering if there in anything in the query api where best best are added programmatically rather than just calling ApplyBestBets().

#218006
Edited, Mar 04, 2020 0:07
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.