Headless commerce and custom storefronts with Shopify APIs and SDKs
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',
],
Connect your PayPal account to allow your customers to checkout using the PayPal gateway a...
ByYour online store speed can enhance your store’s discoverability, boost conversion rates a...
ByShopping is at our fingertips with mobile devices. Is your theme optimized to be user-frie...
By