js-buy-sdk: Custom Attributes are not saved to Line Item

When sending a mutation to add a line_item to a checkout with some customAttributes, the customAttributes are not saved to the line item or returned.

image

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 19 (10 by maintainers)

Most upvoted comments

We have a fix in our API that should be rolling out soon.

@minasmart Using v1 alpha now, I see that I can add customAttributes to my line items, great!

In my liquid template email, can I access these attributes using the properties or the customAttributes key on a line_item?

EDIT: I debugged the line_item in an email, and it doesn’t seem to have the customAttributes I’m setting? Here the code I’m using for testing:

client
  .createCheckout({
      lineItems: [{
        variantId: 'Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zODc2MzA1MDI1OA==',
        customAttributes: [{
          key: 'imageUrl',
          value: 'https://placehold.it/300'
        }],
        quantity: 1,
      }]
    }, Client.Queries.checkoutQuery(['webUrl']))