how to use lineItem with buy now button js sdk code

AvidBrio
Shopify Expert
127 6 12

how I can add a line item on the buy button with js code  

here is my code 

I refer to the Shopify document https://shopify.github.io/buy-button-js/customization/  but not working

 

    ShopifyBuy.UI.onReady(client).then(function (ui) {
        ui.createComponent('product', {
          id: '5843095158948',
          node: document.getElementById('product-component-1612677248591'),
          moneyFormat: '%C2%A3%7B%7Bamount_no_decimals%7D%7D',
          options: {
    "product": {
      contents: {
        description: true,
        quantity: true,
        note: true,
        lineItem: true,
        lineItems: true,
        quantityDecrement: true,
        quantityIncrement: true,
      },
      order: [
        'img',
        'title',
        'variantTitle',
        'price',
        'note',
        'options',
        'lineItems',
        'lineItem',
        'description',
        'quantity',
        'button',
      ], 

 

 

 

 

If you find our comment helpful, hit the like button and accept it as a solution.
Want us to implement custom changes in your store? Contact us
Email me directly - jim@avidbrio.com
0 Likes