$product = {"id":7411266125923,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Pro - 迪士尼-星際大戰 Star Wars - 死星-潮流系列","handle":"iphone-14-pro-mod-nx-magsafe-printable-pb43","description":null,"published_at":"2024-06-11T17:40:19+08:00","created_at":"2024-05-04T23:56:36+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 14 Pro","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-star-wars","Top50","type-Mod NX Printable MagSafe Printable"],"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":41896724365411,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126224-PB43","requires_shipping":true,"taxable":true,"featured_image":{"id":31479998120035,"product_id":7411266125923,"position":7,"created_at":"2024-05-04T23:56:54+08:00","updated_at":"2024-05-04T23:56:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23fd1ced08a4b3974e5766891e2fb8e5a40d3d8f_11dd2465-0ea2-429f-89fd-511bac2313fe.webp?v=1714838214","variant_ids":[41896724365411]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Pro - 迪士尼-星際大戰 Star Wars - 死星-潮流系列 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126224-PB43","featured_media":{"alt":null,"id":23885248692323,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23fd1ced08a4b3974e5766891e2fb8e5a40d3d8f_11dd2465-0ea2-429f-89fd-511bac2313fe.webp?v=1714838214"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41896724430947,"title":"Mod NX-白色邊框","option1":"Mod NX-白色邊框","option2":null,"option3":null,"sku":"MPB0126204-PB43","requires_shipping":true,"taxable":true,"featured_image":{"id":31479999823971,"product_id":7411266125923,"position":10,"created_at":"2024-05-04T23:57:01+08:00","updated_at":"2024-05-04T23:57:02+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e9549a6b7e611218bac9a0cd17de4f8600f89e9_83cbb3c3-2530-42e4-b57b-ef6ebcaebe22.webp?v=1714838222","variant_ids":[41896724430947]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Pro - 迪士尼-星際大戰 Star Wars - 死星-潮流系列 - Mod NX-白色邊框","public_title":"Mod NX-白色邊框","options":["Mod NX-白色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126204-PB43","featured_media":{"alt":null,"id":23885250363491,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e9549a6b7e611218bac9a0cd17de4f8600f89e9_83cbb3c3-2530-42e4-b57b-ef6ebcaebe22.webp?v=1714838222"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41896724660323,"title":"Mod NX-海軍藍邊框","option1":"Mod NX-海軍藍邊框","option2":null,"option3":null,"sku":"MPB01262J5-PB43","requires_shipping":true,"taxable":true,"featured_image":{"id":31479999332451,"product_id":7411266125923,"position":9,"created_at":"2024-05-04T23:56:59+08:00","updated_at":"2024-05-04T23:56:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe90b2f61804e3f92c2a5b7df8a49478bf408667_0f933ef9-140a-4d1c-a03c-5ba1b17863e8.webp?v=1714838219","variant_ids":[41896724660323]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Pro - 迪士尼-星際大戰 Star Wars - 死星-潮流系列 - Mod NX-海軍藍邊框","public_title":"Mod NX-海軍藍邊框","options":["Mod NX-海軍藍邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB01262J5-PB43","featured_media":{"alt":null,"id":23885249839203,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe90b2f61804e3f92c2a5b7df8a49478bf408667_0f933ef9-140a-4d1c-a03c-5ba1b17863e8.webp?v=1714838219"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/294fbf53ca6fdaa8ef1c0813e2e4a2209bd07d16_890830f5-002d-4f3b-bef1-488e7a9852a3.webp?v=1714838199","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8eb59684f1c05aac7cf8f2b9dd40104a9a37636b_68764d7e-fea4-4f1d-bbd6-9bd83a8b95c5.webp?v=1714838201","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/26d02dbebd8ffae4ba1db58d2fe1573b186c9123_d9984c0f-0a1f-4114-acaa-f468f7ff6133.webp?v=1714838204","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/236dafec86fd2e2951614970dc7bb6b4f2f602e9_2de2d5bd-2cad-498d-abca-d5e7160d7f75.webp?v=1714838206","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d429406d6b93f238c6ae02fb397ad341639c72d3_6cd150a1-12a0-4ded-9cd5-3712bef59457.webp?v=1714838209","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ddbc4c4061a3c45d678b0fe3fa4ecdde562b36cb_d7722e72-6c3e-4801-9d7c-f8aebd08ca2e.webp?v=1714838211","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23fd1ced08a4b3974e5766891e2fb8e5a40d3d8f_11dd2465-0ea2-429f-89fd-511bac2313fe.webp?v=1714838214","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/437589bdc487d790ac7483c9eec349666aca97da_5d4a799b-c2b4-46a6-941b-704dec1f646a.webp?v=1714838217","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe90b2f61804e3f92c2a5b7df8a49478bf408667_0f933ef9-140a-4d1c-a03c-5ba1b17863e8.webp?v=1714838219","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e9549a6b7e611218bac9a0cd17de4f8600f89e9_83cbb3c3-2530-42e4-b57b-ef6ebcaebe22.webp?v=1714838222"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/294fbf53ca6fdaa8ef1c0813e2e4a2209bd07d16_890830f5-002d-4f3b-bef1-488e7a9852a3.webp?v=1714838199","options":["color"],"media":[{"alt":null,"id":23885245677667,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/294fbf53ca6fdaa8ef1c0813e2e4a2209bd07d16_890830f5-002d-4f3b-bef1-488e7a9852a3.webp?v=1714838199"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/294fbf53ca6fdaa8ef1c0813e2e4a2209bd07d16_890830f5-002d-4f3b-bef1-488e7a9852a3.webp?v=1714838199","width":2000},{"alt":null,"id":23885246038115,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8eb59684f1c05aac7cf8f2b9dd40104a9a37636b_68764d7e-fea4-4f1d-bbd6-9bd83a8b95c5.webp?v=1714838201"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8eb59684f1c05aac7cf8f2b9dd40104a9a37636b_68764d7e-fea4-4f1d-bbd6-9bd83a8b95c5.webp?v=1714838201","width":2000},{"alt":null,"id":23885246726243,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/26d02dbebd8ffae4ba1db58d2fe1573b186c9123_d9984c0f-0a1f-4114-acaa-f468f7ff6133.webp?v=1714838204"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/26d02dbebd8ffae4ba1db58d2fe1573b186c9123_d9984c0f-0a1f-4114-acaa-f468f7ff6133.webp?v=1714838204","width":2000},{"alt":null,"id":23885247152227,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/236dafec86fd2e2951614970dc7bb6b4f2f602e9_2de2d5bd-2cad-498d-abca-d5e7160d7f75.webp?v=1714838206"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/236dafec86fd2e2951614970dc7bb6b4f2f602e9_2de2d5bd-2cad-498d-abca-d5e7160d7f75.webp?v=1714838206","width":2000},{"alt":null,"id":23885247545443,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d429406d6b93f238c6ae02fb397ad341639c72d3_6cd150a1-12a0-4ded-9cd5-3712bef59457.webp?v=1714838209"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d429406d6b93f238c6ae02fb397ad341639c72d3_6cd150a1-12a0-4ded-9cd5-3712bef59457.webp?v=1714838209","width":2000},{"alt":null,"id":23885248135267,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ddbc4c4061a3c45d678b0fe3fa4ecdde562b36cb_d7722e72-6c3e-4801-9d7c-f8aebd08ca2e.webp?v=1714838211"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ddbc4c4061a3c45d678b0fe3fa4ecdde562b36cb_d7722e72-6c3e-4801-9d7c-f8aebd08ca2e.webp?v=1714838211","width":2000},{"alt":null,"id":23885248692323,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23fd1ced08a4b3974e5766891e2fb8e5a40d3d8f_11dd2465-0ea2-429f-89fd-511bac2313fe.webp?v=1714838214"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23fd1ced08a4b3974e5766891e2fb8e5a40d3d8f_11dd2465-0ea2-429f-89fd-511bac2313fe.webp?v=1714838214","width":2000},{"alt":null,"id":23885249216611,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/437589bdc487d790ac7483c9eec349666aca97da_5d4a799b-c2b4-46a6-941b-704dec1f646a.webp?v=1714838217"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/437589bdc487d790ac7483c9eec349666aca97da_5d4a799b-c2b4-46a6-941b-704dec1f646a.webp?v=1714838217","width":2000},{"alt":null,"id":23885249839203,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe90b2f61804e3f92c2a5b7df8a49478bf408667_0f933ef9-140a-4d1c-a03c-5ba1b17863e8.webp?v=1714838219"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe90b2f61804e3f92c2a5b7df8a49478bf408667_0f933ef9-140a-4d1c-a03c-5ba1b17863e8.webp?v=1714838219","width":2000},{"alt":null,"id":23885250363491,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e9549a6b7e611218bac9a0cd17de4f8600f89e9_83cbb3c3-2530-42e4-b57b-ef6ebcaebe22.webp?v=1714838222"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e9549a6b7e611218bac9a0cd17de4f8600f89e9_83cbb3c3-2530-42e4-b57b-ef6ebcaebe22.webp?v=1714838222","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41896724365411,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126224-PB43","requires_shipping":true,"taxable":true,"featured_image":{"id":31479998120035,"product_id":7411266125923,"position":7,"created_at":"2024-05-04T23:56:54+08:00","updated_at":"2024-05-04T23:56:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23fd1ced08a4b3974e5766891e2fb8e5a40d3d8f_11dd2465-0ea2-429f-89fd-511bac2313fe.webp?v=1714838214","variant_ids":[41896724365411]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Pro - 迪士尼-星際大戰 Star Wars - 死星-潮流系列 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126224-PB43","featured_media":{"alt":null,"id":23885248692323,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23fd1ced08a4b3974e5766891e2fb8e5a40d3d8f_11dd2465-0ea2-429f-89fd-511bac2313fe.webp?v=1714838214"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41896724430947,"title":"Mod NX-白色邊框","option1":"Mod NX-白色邊框","option2":null,"option3":null,"sku":"MPB0126204-PB43","requires_shipping":true,"taxable":true,"featured_image":{"id":31479999823971,"product_id":7411266125923,"position":10,"created_at":"2024-05-04T23:57:01+08:00","updated_at":"2024-05-04T23:57:02+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e9549a6b7e611218bac9a0cd17de4f8600f89e9_83cbb3c3-2530-42e4-b57b-ef6ebcaebe22.webp?v=1714838222","variant_ids":[41896724430947]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Pro - 迪士尼-星際大戰 Star Wars - 死星-潮流系列 - Mod NX-白色邊框","public_title":"Mod NX-白色邊框","options":["Mod NX-白色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126204-PB43","featured_media":{"alt":null,"id":23885250363491,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e9549a6b7e611218bac9a0cd17de4f8600f89e9_83cbb3c3-2530-42e4-b57b-ef6ebcaebe22.webp?v=1714838222"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41896724660323,"title":"Mod NX-海軍藍邊框","option1":"Mod NX-海軍藍邊框","option2":null,"option3":null,"sku":"MPB01262J5-PB43","requires_shipping":true,"taxable":true,"featured_image":{"id":31479999332451,"product_id":7411266125923,"position":9,"created_at":"2024-05-04T23:56:59+08:00","updated_at":"2024-05-04T23:56:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe90b2f61804e3f92c2a5b7df8a49478bf408667_0f933ef9-140a-4d1c-a03c-5ba1b17863e8.webp?v=1714838219","variant_ids":[41896724660323]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Pro - 迪士尼-星際大戰 Star Wars - 死星-潮流系列 - Mod NX-海軍藍邊框","public_title":"Mod NX-海軍藍邊框","options":["Mod NX-海軍藍邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB01262J5-PB43","featured_media":{"alt":null,"id":23885249839203,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe90b2f61804e3f92c2a5b7df8a49478bf408667_0f933ef9-140a-4d1c-a03c-5ba1b17863e8.webp?v=1714838219"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41896724365411,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126224-PB43","requires_shipping":true,"taxable":true,"featured_image":{"id":31479998120035,"product_id":7411266125923,"position":7,"created_at":"2024-05-04T23:56:54+08:00","updated_at":"2024-05-04T23:56:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23fd1ced08a4b3974e5766891e2fb8e5a40d3d8f_11dd2465-0ea2-429f-89fd-511bac2313fe.webp?v=1714838214","variant_ids":[41896724365411]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Pro - 迪士尼-星際大戰 Star Wars - 死星-潮流系列 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126224-PB43","featured_media":{"alt":null,"id":23885248692323,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23fd1ced08a4b3974e5766891e2fb8e5a40d3d8f_11dd2465-0ea2-429f-89fd-511bac2313fe.webp?v=1714838214"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; $device_handle = null var sellingStatus if ($bumper) { $(document).ready(function() { var productImg = $product.images[0] var bumperVariants = $bumper.variants; var bumperColors = new Object(); var currentVariant = ''; var productType = ''; bumperVariants.forEach(variant => { bumperColors[`${variant.title.split(' (')[0].toLowerCase()}`] = variant.featured_image.src; }); if (productType === 'mod-nx-backplate' || productType === 'mod-backplate') { mergeImages( [productImg, bumperColors[currentVariant]], { crossOrigin: 'anonymous' } ).then(mergedImg => { $('.merged-img').attr('src', mergedImg); }); } else { mergeImages( [bumperColors[currentVariant], productImg], { crossOrigin: 'anonymous' } ).then(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: "停產" }