Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Recommendation - Criteria Popularity - Small $entities array

Jerome1978
Level 3
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