Expand my Community achievements bar.

SOLVED

Cart Recommendations

Avatar

Level 2

Team,

We would like to show very specific recommendations on the cart page based on a product(s) in the customer's cart.

For example, we would like to have many of if/then configurations like:

If a "#2 Pencil" is in a customer's cart then show the "White Eraser".

Is this possible? If so, can you help point me in the right direction?

It seems that if it is possible I would do so with a custom attribute (see attachment). However, I can't get the "Select Attribute" dropdown to populate. I have custom attributes in my feed...

Thanks a ton in advance!

Nick

1 Accepted Solution

Avatar

Correct answer by
Level 2

Jon,

Thank you for your help. I'll give this a go.

Best,

Nick

View solution in original post

2 Replies

Avatar

Employee

Hi Nick,

You are exactly right! You can achieve this by passing in the entity.id of the #2 pencil to a profile parameter of your choosing, such as "profile.lastItemAddedToCart"

Example 1:

    function targetPageParams() {
      return {
      "profile.lastItemAddedToCart": "[ENTITY-ID-FOR-THE-NUMBER-2-PENCIL]"}
    }

Example 2 (with a sample entity.id of 1337-273 for your #2 pencil to show syntax)
    
    function targetPageParams() {
      return {
      "profile.lastItemAddedToCart": "1337-273"}
    }

These examples assume you are using Premium Recommendations implementation. If not, you can do the same by passing the profile.lastItemAddedToCart into an mboxCreate function    

Then you can create a criteria using the following settings: "Based on" > "Custom Attribute" > Select Attribute > "profile.lastItemAddedToCart"

Note: in order to see the profile.lastItemAddedToCart appear in the dropdown, you will need to fire off a call to our servers and it will lazy load into the UI.

Avatar

Correct answer by
Level 2

Jon,

Thank you for your help. I'll give this a go.

Best,

Nick