Expand my Community achievements bar.

Recommendation - Criteria Popularity - Small $entities array

Avatar

Level 3

Hi Guys,

I am using a Criteria based on:

  • Recommendation Key: Popularity
  • Recommendation Logic: Most Viewed
  • I am also using additional inclusion rules for language and content type

-> Less than 10 items from the catalog actually qualify.

In the Design, I am facing some weird behaviors:

     $entities.size()

     -> gives me 1 

   

     if I just add

     $entitiy1.id

     $entitiy2.id

     $entitiy3.id

     $entities.size()

     -> it now gives me 3

     If I tried to call an entity that doesn't exist the Recommendation fails completely

     $entitiy4.id

     ...

     $entitiy11.id   

     -> Recommendation fails

It's the same If I use a loop:

     #foreach ($block in $entities)

          $block.id

     #end

     -> Recommendation fails

My questions:

  • Is this by Design for this specific Recommendation Key?
    • I don't have the same issue with other recommendations - I usually get an array of 100 with some of them empty

  • Does the Design impact the Criteria Recommendations
    • If I clearly call 10 entities in the Design, does the criteria create an array of 10 entities (I think not... I am just asking for confirmation)

  • Is there any workaround to evaluate how many entities are available?

Many thanks,

Jerome

0 Replies