$product = {"id":7863711039587,"title":"iPhone 17 Pro Max Clear (相機按鈕) NBA Logo-芝加哥公牛 Chicago Bulls - Light","handle":"iphone-17-pro-max-jellytint-with-capture-button-pm03","description":null,"published_at":"2025-09-10T17:34:42+08:00","created_at":"2025-08-22T20:13:07+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-nba","device-iPhone 17 Pro Max","merge","reseller-nba"],"price":128000,"price_min":128000,"price_max":128000,"available":true,"price_varies":false,"compare_at_price":null,"compare_at_price_min":0,"compare_at_price_max":0,"compare_at_price_varies":false,"variants":[{"id":43609807913059,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"JTB013530G-PM03","requires_shipping":true,"taxable":true,"featured_image":{"id":36152525586531,"product_id":7863711039587,"position":13,"created_at":"2026-07-02T12:24:56+08:00","updated_at":"2026-07-02T12:24:58+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe3880c4c7e67630083210f5a936d31e126e8b6e_5da116fd-50c2-43d0-8ea9-040f5b268def.webp?v=1782966298","variant_ids":[43609807913059]},"available":true,"name":"iPhone 17 Pro Max Clear (相機按鈕) NBA Logo-芝加哥公牛 Chicago Bulls - Light - Ash Black","public_title":"Ash Black","options":["Ash Black"],"price":128000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"JTB013530G-PM03","featured_media":{"alt":null,"id":27657399074915,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe3880c4c7e67630083210f5a936d31e126e8b6e_5da116fd-50c2-43d0-8ea9-040f5b268def.webp?v=1782966298"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43609808994403,"title":"Nocturne Blue","option1":"Nocturne Blue","option2":null,"option3":null,"sku":"JTB013534M-PM03","requires_shipping":true,"taxable":true,"featured_image":{"id":36152524963939,"product_id":7863711039587,"position":11,"created_at":"2026-07-02T12:24:55+08:00","updated_at":"2026-07-02T12:24:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a5952837cf2d470eaa52394106567b48bb414f3_61bab9b3-9a3c-4f4e-9e87-3ae634fe6b12.webp?v=1782966297","variant_ids":[43609808994403]},"available":true,"name":"iPhone 17 Pro Max Clear (相機按鈕) NBA Logo-芝加哥公牛 Chicago Bulls - Light - Nocturne Blue","public_title":"Nocturne Blue","options":["Nocturne Blue"],"price":128000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"JTB013534M-PM03","featured_media":{"alt":null,"id":27657398452323,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a5952837cf2d470eaa52394106567b48bb414f3_61bab9b3-9a3c-4f4e-9e87-3ae634fe6b12.webp?v=1782966297"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43609809027171,"title":"Gleam Rosé","option1":"Gleam Rosé","option2":null,"option3":null,"sku":"JTB013534L-PM03","requires_shipping":true,"taxable":true,"featured_image":{"id":36152525291619,"product_id":7863711039587,"position":12,"created_at":"2026-07-02T12:24:55+08:00","updated_at":"2026-07-02T12:24:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d15cdbcf61ba880071110620a13c83f7626942e_fd29cd3b-78cd-441c-8234-429858717e4f.webp?v=1782966297","variant_ids":[43609809027171]},"available":true,"name":"iPhone 17 Pro Max Clear (相機按鈕) NBA Logo-芝加哥公牛 Chicago Bulls - Light - Gleam Rosé","public_title":"Gleam Rosé","options":["Gleam Rosé"],"price":128000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"JTB013534L-PM03","featured_media":{"alt":null,"id":27657398780003,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d15cdbcf61ba880071110620a13c83f7626942e_fd29cd3b-78cd-441c-8234-429858717e4f.webp?v=1782966297"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/Clear-F5-353-PM03_a28923a1-6abf-4a5d-a3fa-2b4821cce166.png?v=1755864790","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe3880c4c7e67630083210f5a936d31e126e8b6e.webp?v=1782213600","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a5952837cf2d470eaa52394106567b48bb414f3.webp?v=1782213601","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d15cdbcf61ba880071110620a13c83f7626942e.webp?v=1782213602","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a5952837cf2d470eaa52394106567b48bb414f3_62d1ca89-e859-43d2-ab86-1b6936dce0c1.webp?v=1782958660","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d15cdbcf61ba880071110620a13c83f7626942e_25538ac2-4ca4-44b8-a51d-1fcba6ab5b2e.webp?v=1782958662","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe3880c4c7e67630083210f5a936d31e126e8b6e_43be8228-9b62-4813-9a8e-12e204a53ab8.webp?v=1782958664","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a5952837cf2d470eaa52394106567b48bb414f3_7efe4bbb-e80c-475f-979b-be8b5f6197ae.webp?v=1782961993","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d15cdbcf61ba880071110620a13c83f7626942e_09a81f92-e12f-46cb-bb7e-bc9fd8f6c92a.webp?v=1782961993","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe3880c4c7e67630083210f5a936d31e126e8b6e_7c2a9a9b-af02-456b-8d67-792ad74f6b02.webp?v=1782961994","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a5952837cf2d470eaa52394106567b48bb414f3_61bab9b3-9a3c-4f4e-9e87-3ae634fe6b12.webp?v=1782966297","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d15cdbcf61ba880071110620a13c83f7626942e_fd29cd3b-78cd-441c-8234-429858717e4f.webp?v=1782966297","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe3880c4c7e67630083210f5a936d31e126e8b6e_5da116fd-50c2-43d0-8ea9-040f5b268def.webp?v=1782966298"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/Clear-F5-353-PM03_a28923a1-6abf-4a5d-a3fa-2b4821cce166.png?v=1755864790","options":["color"],"media":[{"alt":null,"id":25942060138595,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/Clear-F5-353-PM03_a28923a1-6abf-4a5d-a3fa-2b4821cce166.png?v=1755864790"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/Clear-F5-353-PM03_a28923a1-6abf-4a5d-a3fa-2b4821cce166.png?v=1755864790","width":2000},{"alt":null,"id":27578583023715,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe3880c4c7e67630083210f5a936d31e126e8b6e.webp?v=1782213600"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe3880c4c7e67630083210f5a936d31e126e8b6e.webp?v=1782213600","width":2000},{"alt":null,"id":27578583646307,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a5952837cf2d470eaa52394106567b48bb414f3.webp?v=1782213601"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a5952837cf2d470eaa52394106567b48bb414f3.webp?v=1782213601","width":2000},{"alt":null,"id":27578583842915,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d15cdbcf61ba880071110620a13c83f7626942e.webp?v=1782213602"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d15cdbcf61ba880071110620a13c83f7626942e.webp?v=1782213602","width":2000},{"alt":null,"id":27656250392675,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a5952837cf2d470eaa52394106567b48bb414f3_62d1ca89-e859-43d2-ab86-1b6936dce0c1.webp?v=1782958660"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a5952837cf2d470eaa52394106567b48bb414f3_62d1ca89-e859-43d2-ab86-1b6936dce0c1.webp?v=1782958660","width":2000},{"alt":null,"id":27656250916963,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d15cdbcf61ba880071110620a13c83f7626942e_25538ac2-4ca4-44b8-a51d-1fcba6ab5b2e.webp?v=1782958662"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d15cdbcf61ba880071110620a13c83f7626942e_25538ac2-4ca4-44b8-a51d-1fcba6ab5b2e.webp?v=1782958662","width":2000},{"alt":null,"id":27656251408483,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe3880c4c7e67630083210f5a936d31e126e8b6e_43be8228-9b62-4813-9a8e-12e204a53ab8.webp?v=1782958664"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe3880c4c7e67630083210f5a936d31e126e8b6e_43be8228-9b62-4813-9a8e-12e204a53ab8.webp?v=1782958664","width":2000},{"alt":null,"id":27656900575331,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a5952837cf2d470eaa52394106567b48bb414f3_7efe4bbb-e80c-475f-979b-be8b5f6197ae.webp?v=1782961993"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a5952837cf2d470eaa52394106567b48bb414f3_7efe4bbb-e80c-475f-979b-be8b5f6197ae.webp?v=1782961993","width":2000},{"alt":null,"id":27656900903011,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d15cdbcf61ba880071110620a13c83f7626942e_09a81f92-e12f-46cb-bb7e-bc9fd8f6c92a.webp?v=1782961993"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d15cdbcf61ba880071110620a13c83f7626942e_09a81f92-e12f-46cb-bb7e-bc9fd8f6c92a.webp?v=1782961993","width":2000},{"alt":null,"id":27656901296227,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe3880c4c7e67630083210f5a936d31e126e8b6e_7c2a9a9b-af02-456b-8d67-792ad74f6b02.webp?v=1782961994"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe3880c4c7e67630083210f5a936d31e126e8b6e_7c2a9a9b-af02-456b-8d67-792ad74f6b02.webp?v=1782961994","width":2000},{"alt":null,"id":27657398452323,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a5952837cf2d470eaa52394106567b48bb414f3_61bab9b3-9a3c-4f4e-9e87-3ae634fe6b12.webp?v=1782966297"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a5952837cf2d470eaa52394106567b48bb414f3_61bab9b3-9a3c-4f4e-9e87-3ae634fe6b12.webp?v=1782966297","width":2000},{"alt":null,"id":27657398780003,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d15cdbcf61ba880071110620a13c83f7626942e_fd29cd3b-78cd-441c-8234-429858717e4f.webp?v=1782966297"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d15cdbcf61ba880071110620a13c83f7626942e_fd29cd3b-78cd-441c-8234-429858717e4f.webp?v=1782966297","width":2000},{"alt":null,"id":27657399074915,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe3880c4c7e67630083210f5a936d31e126e8b6e_5da116fd-50c2-43d0-8ea9-040f5b268def.webp?v=1782966298"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe3880c4c7e67630083210f5a936d31e126e8b6e_5da116fd-50c2-43d0-8ea9-040f5b268def.webp?v=1782966298","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":43609807913059,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"JTB013530G-PM03","requires_shipping":true,"taxable":true,"featured_image":{"id":36152525586531,"product_id":7863711039587,"position":13,"created_at":"2026-07-02T12:24:56+08:00","updated_at":"2026-07-02T12:24:58+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe3880c4c7e67630083210f5a936d31e126e8b6e_5da116fd-50c2-43d0-8ea9-040f5b268def.webp?v=1782966298","variant_ids":[43609807913059]},"available":true,"name":"iPhone 17 Pro Max Clear (相機按鈕) NBA Logo-芝加哥公牛 Chicago Bulls - Light - Ash Black","public_title":"Ash Black","options":["Ash Black"],"price":128000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"JTB013530G-PM03","featured_media":{"alt":null,"id":27657399074915,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe3880c4c7e67630083210f5a936d31e126e8b6e_5da116fd-50c2-43d0-8ea9-040f5b268def.webp?v=1782966298"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43609808994403,"title":"Nocturne Blue","option1":"Nocturne Blue","option2":null,"option3":null,"sku":"JTB013534M-PM03","requires_shipping":true,"taxable":true,"featured_image":{"id":36152524963939,"product_id":7863711039587,"position":11,"created_at":"2026-07-02T12:24:55+08:00","updated_at":"2026-07-02T12:24:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a5952837cf2d470eaa52394106567b48bb414f3_61bab9b3-9a3c-4f4e-9e87-3ae634fe6b12.webp?v=1782966297","variant_ids":[43609808994403]},"available":true,"name":"iPhone 17 Pro Max Clear (相機按鈕) NBA Logo-芝加哥公牛 Chicago Bulls - Light - Nocturne Blue","public_title":"Nocturne Blue","options":["Nocturne Blue"],"price":128000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"JTB013534M-PM03","featured_media":{"alt":null,"id":27657398452323,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a5952837cf2d470eaa52394106567b48bb414f3_61bab9b3-9a3c-4f4e-9e87-3ae634fe6b12.webp?v=1782966297"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43609809027171,"title":"Gleam Rosé","option1":"Gleam Rosé","option2":null,"option3":null,"sku":"JTB013534L-PM03","requires_shipping":true,"taxable":true,"featured_image":{"id":36152525291619,"product_id":7863711039587,"position":12,"created_at":"2026-07-02T12:24:55+08:00","updated_at":"2026-07-02T12:24:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d15cdbcf61ba880071110620a13c83f7626942e_fd29cd3b-78cd-441c-8234-429858717e4f.webp?v=1782966297","variant_ids":[43609809027171]},"available":true,"name":"iPhone 17 Pro Max Clear (相機按鈕) NBA Logo-芝加哥公牛 Chicago Bulls - Light - Gleam Rosé","public_title":"Gleam Rosé","options":["Gleam Rosé"],"price":128000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"JTB013534L-PM03","featured_media":{"alt":null,"id":27657398780003,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d15cdbcf61ba880071110620a13c83f7626942e_fd29cd3b-78cd-441c-8234-429858717e4f.webp?v=1782966297"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43609807913059,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"JTB013530G-PM03","requires_shipping":true,"taxable":true,"featured_image":{"id":36152525586531,"product_id":7863711039587,"position":13,"created_at":"2026-07-02T12:24:56+08:00","updated_at":"2026-07-02T12:24:58+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe3880c4c7e67630083210f5a936d31e126e8b6e_5da116fd-50c2-43d0-8ea9-040f5b268def.webp?v=1782966298","variant_ids":[43609807913059]},"available":true,"name":"iPhone 17 Pro Max Clear (相機按鈕) NBA Logo-芝加哥公牛 Chicago Bulls - Light - Ash Black","public_title":"Ash Black","options":["Ash Black"],"price":128000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"JTB013530G-PM03","featured_media":{"alt":null,"id":27657399074915,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe3880c4c7e67630083210f5a936d31e126e8b6e_5da116fd-50c2-43d0-8ea9-040f5b268def.webp?v=1782966298"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; $device_handle = null; $brand_handle = null; $type = ""; var sellingStatus // 只有設計款(SKU 含 '-')才需要合圖 if ($isMerge && $defaultVariant.sku.includes('-')) { $(document).ready(function() { var productImg = $product.images[0]; var bumperImg = window.getProductImageUrl($defaultVariant.sku.split('-')[0]); var layers = ($type === 'mod-nx-backplate' || $type === 'mod-backplate') ? [productImg, bumperImg] : [bumperImg, productImg]; window.mergeProductImages(layers).then(function (mergedImg) { $('.merged-img').attr('src', mergedImg); }); }); }; var sellingStatusData window.fetchSellingStatus().then(data => { try { sellingStatusData = data; } catch (error) { sellingStatusData = null console.error('Unable to parse selling status', error) } $(document).ready(function() { handleSellingStatus($defaultVariant.sku); }); }) function handleSellingStatus(currentSku) { if (!sellingStatusData) { console.error('No selling status available!') return } const sellingStatusElement = document.getElementById('selling-status') const addToCartButton = document.getElementById('AddToCart-product-template') const currentProductSku = currentSku.replace(/-(.*)$/, '-') if ($variants) { const flattenedSellingStatus = [...sellingStatusData.pending, ...sellingStatusData.preorder] const matchSellingStatusProduct = flattenedSellingStatus.filter(product => currentProductSku === product.sku) if (matchSellingStatusProduct.length > 0) { const isProductPending = matchSellingStatusProduct[0].status === 'pending' const matchDate = matchSellingStatusProduct[0].date sellingStatus = isProductPending ? "缺貨中" : "預購完成出貨日:" + matchDate sellingStatusElement.textContent = sellingStatus if (sellingStatus.includes("缺貨中")){ addToCartButton.disabled ='true'; addToCartButton.textContent = "缺貨中無法加入購物車" } else { addToCartButton.textContent = "加到購物車" } } else { sellingStatusElement.textContent = '' addToCartButton.textContent = "加到購物車" }; }; }; document.addEventListener('DOMContentLoaded', function () { var currentVariantSelect = document.getElementById('SingleOptionSelector-0') currentVariantSelect.addEventListener('change', function() { var currentSku = $('#current_sku').text() var skuElement = document.getElementById('current-sku') skuElement.textContent = currentSku handleSellingStatus(currentSku) }); });
// Override default values of shop.strings for each template. // Alternate product templates can change values of // add to cart button, sold out, and unavailable states here. theme.productStrings = { addToCart: "加到購物車", soldOut: "售完", unavailable: "停產" }