Expand my Community achievements bar.

Recommendations series for a product

Avatar

Level 2

I'd like to show 3 recommendations on my product detail page but I want to show one category of items in the first space, a mutually exclusive category in the second slot and a mutually exclusive categories of options in the third slot.

I can't seem to find any documentation on how to do this.  Anyone have any pointers?

5 Replies

Avatar

Employee Advisor

Hi celinab5183000​,

If I understand you correctly, you want to recommend related items from 3 unique categories. Are the categories explicitly defined? For example, do you know slot 1 should be from category X, slot 2 from category Y, slot 3 from category Z? If that is your use case you could create 3 criteria each the same but with a slightly different static inclusion rule of "category is X" and so on. Then combine the 3 criteria into a single criteria sequence.

If you are wanting to just make sure that slot 2 is not the same category as slot 1 and 3 you should be able to do that with some logic via a Velocity script in the design. Here's the reference doc for Velocity in a design.

Hope that helps.

Avatar

Level 2

If I use a sequence criteria and there are multiples of items in the first criteria in the sequence, it seems to fill all 3 of my slots with items from that first criteria instead of just putting it in the first slot in the design.   Is there a way to have it put 1 from each criteria I have built?

Avatar

Employee Advisor

That is a great question. I neglected to consider that. You are correct that in a criteria sequence it will pull as many results as are available from the first criteria before moving to the second until it fills all slots from the design.

Having slot limit control on criteria in a sequence is a great feature request though.

Is the velocity scripting option something that would work?

Avatar

Level 2

I'm not sure.  I did look at the documentation and it was not clear to me what function I would use to get one item from each criteria to display.  Any pointers?

Avatar

Level 4

It appears that Adobe now has the ability to choose how many slots are filled with a particular criteria so this is helpful. However, could you elaborate on the second solution described? I'm wondering what that Velocity logic might actually look like in order to make sure slot 2 does not return a product from the same category as slot 1.

Hope this makes sense.