$product = {"id":7921261412451,"title":"iPhone 14 Pro Mod NX (MagSafe 兼容) 懶散兔與啾先生 花叢間","handle":"iphone-14-pro-mod-nx-magsafe-ec79","description":null,"published_at":"2025-11-14T10:32:47+08:00","created_at":"2025-11-11T10:32:22+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-bylobster","device-iPhone 14 Pro","merge","reseller-bylobster"],"price":110000,"price_min":110000,"price_max":110000,"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":43831369465955,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MPB01262J5-EC79","requires_shipping":true,"taxable":true,"featured_image":{"id":36054668050531,"product_id":7921261412451,"position":14,"created_at":"2026-06-23T09:57:44+08:00","updated_at":"2026-06-23T09:57:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b88295e5b136ef5e6c439ec5ab8e3c08fc90db4_15377c36-844f-47a2-883e-bbe2e0b5e029.webp?v=1782179866","variant_ids":[43831369465955]},"available":true,"name":"iPhone 14 Pro Mod NX (MagSafe 兼容) 懶散兔與啾先生 花叢間 - Navy Blue","public_title":"Navy Blue","options":["Navy Blue"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB01262J5-EC79","featured_media":{"alt":null,"id":27567518449763,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b88295e5b136ef5e6c439ec5ab8e3c08fc90db4_15377c36-844f-47a2-883e-bbe2e0b5e029.webp?v=1782179866"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43831369629795,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0126224-EC79","requires_shipping":true,"taxable":true,"featured_image":{"id":36054668083299,"product_id":7921261412451,"position":15,"created_at":"2026-06-23T09:57:45+08:00","updated_at":"2026-06-23T09:57:47+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b0acb08362aa442bf9559eb14933e195ad9483a0_3bfd56f2-2d0c-48cf-9b21-58fffbe12e42.webp?v=1782179867","variant_ids":[43831369629795]},"available":true,"name":"iPhone 14 Pro Mod NX (MagSafe 兼容) 懶散兔與啾先生 花叢間 - Black","public_title":"Black","options":["Black"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126224-EC79","featured_media":{"alt":null,"id":27567518482531,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b0acb08362aa442bf9559eb14933e195ad9483a0_3bfd56f2-2d0c-48cf-9b21-58fffbe12e42.webp?v=1782179867"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43831369728099,"title":"White","option1":"White","option2":null,"option3":null,"sku":"MPB0126204-EC79","requires_shipping":true,"taxable":true,"featured_image":{"id":36054667952227,"product_id":7921261412451,"position":13,"created_at":"2026-06-23T09:57:44+08:00","updated_at":"2026-06-23T09:57:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb968c066764e8c3a23fc6bd2309a1267340d190_77c8ef83-f731-4df0-a0da-9bef019e8e12.webp?v=1782179866","variant_ids":[43831369728099]},"available":true,"name":"iPhone 14 Pro Mod NX (MagSafe 兼容) 懶散兔與啾先生 花叢間 - White","public_title":"White","options":["White"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126204-EC79","featured_media":{"alt":null,"id":27567518318691,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb968c066764e8c3a23fc6bd2309a1267340d190_77c8ef83-f731-4df0-a0da-9bef019e8e12.webp?v=1782179866"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb968c066764e8c3a23fc6bd2309a1267340d190.webp?v=1762828344","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b0acb08362aa442bf9559eb14933e195ad9483a0.webp?v=1762828345","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/21ac6a6fd0254f75c8c9eec9a0f906c852060001.webp?v=1762828346","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f631ff53958970a67a59926631aa31c6a878b5c.webp?v=1762828347","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68a765030a2a7bd9d8e10c37c2e822ca1af4d872.webp?v=1762828347","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c424f428d7c9d2763cc3236763f59ac72847ba00.webp?v=1762828348","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/874556b65812662ba364cbcae61e4e01e809d526.webp?v=1762828348","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b88295e5b136ef5e6c439ec5ab8e3c08fc90db4.webp?v=1762828349","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ace8ddbc7dd9377e245cc40b18efc2d75e8fefe6.webp?v=1762828350","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a75466b5fa91ab4b871bf4d4b53801b8fa1591c.webp?v=1762828351","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/884b4be107e32ca1317caff988239ba2dbc5400a.webp?v=1762828352","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7e0894522d4526e8c45fb4d2ba14c8d0036b7a88.webp?v=1762828352","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb968c066764e8c3a23fc6bd2309a1267340d190_77c8ef83-f731-4df0-a0da-9bef019e8e12.webp?v=1782179866","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b88295e5b136ef5e6c439ec5ab8e3c08fc90db4_15377c36-844f-47a2-883e-bbe2e0b5e029.webp?v=1782179866","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b0acb08362aa442bf9559eb14933e195ad9483a0_3bfd56f2-2d0c-48cf-9b21-58fffbe12e42.webp?v=1782179867"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb968c066764e8c3a23fc6bd2309a1267340d190.webp?v=1762828344","options":["color"],"media":[{"alt":null,"id":26352269852771,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb968c066764e8c3a23fc6bd2309a1267340d190.webp?v=1762828344"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb968c066764e8c3a23fc6bd2309a1267340d190.webp?v=1762828344","width":2000},{"alt":null,"id":26352270147683,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b0acb08362aa442bf9559eb14933e195ad9483a0.webp?v=1762828345"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b0acb08362aa442bf9559eb14933e195ad9483a0.webp?v=1762828345","width":2000},{"alt":null,"id":26352270377059,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/21ac6a6fd0254f75c8c9eec9a0f906c852060001.webp?v=1762828346"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/21ac6a6fd0254f75c8c9eec9a0f906c852060001.webp?v=1762828346","width":2000},{"alt":null,"id":26352270671971,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f631ff53958970a67a59926631aa31c6a878b5c.webp?v=1762828347"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f631ff53958970a67a59926631aa31c6a878b5c.webp?v=1762828347","width":2000},{"alt":null,"id":26352270999651,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68a765030a2a7bd9d8e10c37c2e822ca1af4d872.webp?v=1762828347"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68a765030a2a7bd9d8e10c37c2e822ca1af4d872.webp?v=1762828347","width":2000},{"alt":null,"id":26352271261795,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c424f428d7c9d2763cc3236763f59ac72847ba00.webp?v=1762828348"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c424f428d7c9d2763cc3236763f59ac72847ba00.webp?v=1762828348","width":2000},{"alt":null,"id":26352271425635,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/874556b65812662ba364cbcae61e4e01e809d526.webp?v=1762828348"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/874556b65812662ba364cbcae61e4e01e809d526.webp?v=1762828348","width":2000},{"alt":null,"id":26352271523939,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b88295e5b136ef5e6c439ec5ab8e3c08fc90db4.webp?v=1762828349"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b88295e5b136ef5e6c439ec5ab8e3c08fc90db4.webp?v=1762828349","width":2000},{"alt":null,"id":26352271786083,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ace8ddbc7dd9377e245cc40b18efc2d75e8fefe6.webp?v=1762828350"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ace8ddbc7dd9377e245cc40b18efc2d75e8fefe6.webp?v=1762828350","width":2000},{"alt":null,"id":26352272048227,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a75466b5fa91ab4b871bf4d4b53801b8fa1591c.webp?v=1762828351"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a75466b5fa91ab4b871bf4d4b53801b8fa1591c.webp?v=1762828351","width":2000},{"alt":null,"id":26352272244835,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/884b4be107e32ca1317caff988239ba2dbc5400a.webp?v=1762828352"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/884b4be107e32ca1317caff988239ba2dbc5400a.webp?v=1762828352","width":2000},{"alt":null,"id":26352272375907,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7e0894522d4526e8c45fb4d2ba14c8d0036b7a88.webp?v=1762828352"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7e0894522d4526e8c45fb4d2ba14c8d0036b7a88.webp?v=1762828352","width":2000},{"alt":null,"id":27567518318691,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb968c066764e8c3a23fc6bd2309a1267340d190_77c8ef83-f731-4df0-a0da-9bef019e8e12.webp?v=1782179866"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb968c066764e8c3a23fc6bd2309a1267340d190_77c8ef83-f731-4df0-a0da-9bef019e8e12.webp?v=1782179866","width":2000},{"alt":null,"id":27567518449763,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b88295e5b136ef5e6c439ec5ab8e3c08fc90db4_15377c36-844f-47a2-883e-bbe2e0b5e029.webp?v=1782179866"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b88295e5b136ef5e6c439ec5ab8e3c08fc90db4_15377c36-844f-47a2-883e-bbe2e0b5e029.webp?v=1782179866","width":2000},{"alt":null,"id":27567518482531,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b0acb08362aa442bf9559eb14933e195ad9483a0_3bfd56f2-2d0c-48cf-9b21-58fffbe12e42.webp?v=1782179867"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b0acb08362aa442bf9559eb14933e195ad9483a0_3bfd56f2-2d0c-48cf-9b21-58fffbe12e42.webp?v=1782179867","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":43831369465955,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MPB01262J5-EC79","requires_shipping":true,"taxable":true,"featured_image":{"id":36054668050531,"product_id":7921261412451,"position":14,"created_at":"2026-06-23T09:57:44+08:00","updated_at":"2026-06-23T09:57:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b88295e5b136ef5e6c439ec5ab8e3c08fc90db4_15377c36-844f-47a2-883e-bbe2e0b5e029.webp?v=1782179866","variant_ids":[43831369465955]},"available":true,"name":"iPhone 14 Pro Mod NX (MagSafe 兼容) 懶散兔與啾先生 花叢間 - Navy Blue","public_title":"Navy Blue","options":["Navy Blue"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB01262J5-EC79","featured_media":{"alt":null,"id":27567518449763,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b88295e5b136ef5e6c439ec5ab8e3c08fc90db4_15377c36-844f-47a2-883e-bbe2e0b5e029.webp?v=1782179866"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43831369629795,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0126224-EC79","requires_shipping":true,"taxable":true,"featured_image":{"id":36054668083299,"product_id":7921261412451,"position":15,"created_at":"2026-06-23T09:57:45+08:00","updated_at":"2026-06-23T09:57:47+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b0acb08362aa442bf9559eb14933e195ad9483a0_3bfd56f2-2d0c-48cf-9b21-58fffbe12e42.webp?v=1782179867","variant_ids":[43831369629795]},"available":true,"name":"iPhone 14 Pro Mod NX (MagSafe 兼容) 懶散兔與啾先生 花叢間 - Black","public_title":"Black","options":["Black"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126224-EC79","featured_media":{"alt":null,"id":27567518482531,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b0acb08362aa442bf9559eb14933e195ad9483a0_3bfd56f2-2d0c-48cf-9b21-58fffbe12e42.webp?v=1782179867"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43831369728099,"title":"White","option1":"White","option2":null,"option3":null,"sku":"MPB0126204-EC79","requires_shipping":true,"taxable":true,"featured_image":{"id":36054667952227,"product_id":7921261412451,"position":13,"created_at":"2026-06-23T09:57:44+08:00","updated_at":"2026-06-23T09:57:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb968c066764e8c3a23fc6bd2309a1267340d190_77c8ef83-f731-4df0-a0da-9bef019e8e12.webp?v=1782179866","variant_ids":[43831369728099]},"available":true,"name":"iPhone 14 Pro Mod NX (MagSafe 兼容) 懶散兔與啾先生 花叢間 - White","public_title":"White","options":["White"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126204-EC79","featured_media":{"alt":null,"id":27567518318691,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb968c066764e8c3a23fc6bd2309a1267340d190_77c8ef83-f731-4df0-a0da-9bef019e8e12.webp?v=1782179866"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43831369465955,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MPB01262J5-EC79","requires_shipping":true,"taxable":true,"featured_image":{"id":36054668050531,"product_id":7921261412451,"position":14,"created_at":"2026-06-23T09:57:44+08:00","updated_at":"2026-06-23T09:57:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b88295e5b136ef5e6c439ec5ab8e3c08fc90db4_15377c36-844f-47a2-883e-bbe2e0b5e029.webp?v=1782179866","variant_ids":[43831369465955]},"available":true,"name":"iPhone 14 Pro Mod NX (MagSafe 兼容) 懶散兔與啾先生 花叢間 - Navy Blue","public_title":"Navy Blue","options":["Navy Blue"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB01262J5-EC79","featured_media":{"alt":null,"id":27567518449763,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b88295e5b136ef5e6c439ec5ab8e3c08fc90db4_15377c36-844f-47a2-883e-bbe2e0b5e029.webp?v=1782179866"}},"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: "停產" }