Empty data in context, error

Respondida

Comentários

4 comentários

  • Permanently deleted user

    Hi Karan Tomar Hope you're well! Can you make sure that the data is formatted as a string? If it's not, then you'll get this error. Please see examples for PDP and Category pages below. Hope this helps!

     

    DY.recommendationContext = {type:'CATEGORY', data: ['Women', 'Accessories','Hats']};

    DY.recommendationContext = {type:'PRODUCT', data: ['SKU123']}; 

    Ações de comentário Permalink
  • Karan Tomar

    Hi @...
    Hope you are doing good as well!
    Thanks for the reply and your solution solved my problem. I was not passing product Id as a string, but now it works well.
    Also, I hope it's okay if we pass product Id instead of product SKU.

    DY.recommendationContext = { type: "PRODUCT", "data": [ "625" ] }

    Ações de comentário Permalink
  • Permanently deleted user

    Hi Karan Tomar,

    The data passed in the context should match the following:

    • Product pages - the SKU field in the feed
    • Category pages - the categories field in the feed
    Ações de comentário Permalink
  • Karan Tomar

    Got it, thanks! @... 

    Ações de comentário Permalink

Por favor, entrar para comentar.