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
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Cart Recommendations

nmickley
Level 2
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
nmickley
Correct answer by
Level 2
Level 2

Jon,

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

Best,

Nick

View solution in original post

2 Replies
Jon_Tehero
Employee
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.

nmickley
Correct answer by
Level 2
Level 2

Jon,

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

Best,

Nick

View solution in original post