Open Nicolaschinc opened 2 years ago
// shopify. buy button config const client: any = ShopifyBuy.buildClient({ domain: xxxx, storefrontAccessToken: xxxx }) ShopifyBuy.UI.onReady(client).then(function (ui: any) { ui.createComponent('product', { id: xxxx, node: xxxx, moneyFormat: xxx, options: { product: { iframe: false, buttonDestination: 'checkout', contents: { img: false, title: false, price: false }, text: { button: 'Checkout' } }, productSet: {}, modalProduct: {}, option: {}, cart: {}, toggle: {} } }) }) 1、When I click checkout button, normally, it will open new window to show the checkout page, but the button.min report error that "null is not an object (evaluating 'n.location=t.weburl')"
const client: any = ShopifyBuy.buildClient({ domain: xxxx, storefrontAccessToken: xxxx }) ShopifyBuy.UI.onReady(client).then(function (ui: any) { ui.createComponent('product', { id: xxxx, node: xxxx, moneyFormat: xxx, options: { product: { iframe: false, buttonDestination: 'checkout', contents: { img: false, title: false, price: false }, text: { button: 'Checkout' } }, productSet: {}, modalProduct: {}, option: {}, cart: {}, toggle: {} } }) })
2、As the same component be use in PC browser which is OK
How can I solve it when I use shopify buy button in h5 Hybrid page
// shopify. buy button config
const client: any = ShopifyBuy.buildClient({ domain: xxxx, storefrontAccessToken: xxxx }) ShopifyBuy.UI.onReady(client).then(function (ui: any) { ui.createComponent('product', { id: xxxx, node: xxxx, moneyFormat: xxx, options: { product: { iframe: false, buttonDestination: 'checkout', contents: { img: false, title: false, price: false }, text: { button: 'Checkout' } }, productSet: {}, modalProduct: {}, option: {}, cart: {}, toggle: {} } }) })
1、When I click checkout button, normally, it will open new window to show the checkout page, but the button.min report error that "null is not an object (evaluating 'n.location=t.weburl')"2、As the same component be use in PC browser which is OK
How can I solve it when I use shopify buy button in h5 Hybrid page