$product = {"id":7407832531043,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Pro - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - JEDI ORDER徽章2-潮流系列","handle":"iphone-14-pro-mod-nx-printable-pb47","description":null,"published_at":"2024-06-11T16:24:05+08:00","created_at":"2024-05-03T10:58:51+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 14 Pro","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-star-wars","Top50","type-Mod NX Printable"],"price":90000,"price_min":90000,"price_max":90000,"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":41879385800803,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126224-PB47","requires_shipping":true,"taxable":true,"featured_image":{"id":31470481014883,"product_id":7407832531043,"position":1,"created_at":"2024-05-03T10:58:54+08:00","updated_at":"2024-05-03T10:58:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/907e6817c43b3bc2ad493556d37f0e6a1b4032f9_5f5cb656-61d8-4a87-9189-248fc7be9912.webp?v=1714705134","variant_ids":[41879385800803]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Pro - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - JEDI ORDER徽章2-潮流系列 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0126224-PB47","featured_media":{"alt":null,"id":23875384672355,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/907e6817c43b3bc2ad493556d37f0e6a1b4032f9_5f5cb656-61d8-4a87-9189-248fc7be9912.webp?v=1714705134"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41879385964643,"title":"Mod NX-白色邊框","option1":"Mod NX-白色邊框","option2":null,"option3":null,"sku":"NPB0126204-PB47","requires_shipping":true,"taxable":true,"featured_image":{"id":31470484652131,"product_id":7407832531043,"position":9,"created_at":"2024-05-03T10:59:13+08:00","updated_at":"2024-05-03T10:59:13+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9df1844f45103d4e601cd20a2b7bbe142c60df2_e34993f9-5b8c-40de-bd6a-0fbc6b1194a7.webp?v=1714705153","variant_ids":[41879385964643]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Pro - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - JEDI ORDER徽章2-潮流系列 - Mod NX-白色邊框","public_title":"Mod NX-白色邊框","options":["Mod NX-白色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0126204-PB47","featured_media":{"alt":null,"id":23875388375139,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9df1844f45103d4e601cd20a2b7bbe142c60df2_e34993f9-5b8c-40de-bd6a-0fbc6b1194a7.webp?v=1714705153"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41879386390627,"title":"Mod NX-海軍藍邊框","option1":"Mod NX-海軍藍邊框","option2":null,"option3":null,"sku":"NPB01262J5-PB47","requires_shipping":true,"taxable":true,"featured_image":{"id":31470482948195,"product_id":7407832531043,"position":5,"created_at":"2024-05-03T10:59:04+08:00","updated_at":"2024-05-03T10:59:04+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8541849a27ee6aad56b5a1ccdd5d3df79f42d94d_e3c34e8b-6a14-4290-ad2d-16713b50b9a0.webp?v=1714705144","variant_ids":[41879386390627]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Pro - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - JEDI ORDER徽章2-潮流系列 - Mod NX-海軍藍邊框","public_title":"Mod NX-海軍藍邊框","options":["Mod NX-海軍藍邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB01262J5-PB47","featured_media":{"alt":null,"id":23875386736739,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8541849a27ee6aad56b5a1ccdd5d3df79f42d94d_e3c34e8b-6a14-4290-ad2d-16713b50b9a0.webp?v=1714705144"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/907e6817c43b3bc2ad493556d37f0e6a1b4032f9_5f5cb656-61d8-4a87-9189-248fc7be9912.webp?v=1714705134","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/571910e02746387143848bddf9f7e284e5a5110a_2af90544-144c-4c2e-b5fc-1883b60b2dd1.webp?v=1714705137","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9db2f2257c68bbde79d72d04add7fe9271e66d9b_5f38d74a-3f46-43b1-8c9e-6a3359d7694a.webp?v=1714705140","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8dfde3bb7f2428878b53d271b14c6f6cc3223d7_c1a13465-b91e-4924-930e-99950708365d.webp?v=1714705142","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8541849a27ee6aad56b5a1ccdd5d3df79f42d94d_e3c34e8b-6a14-4290-ad2d-16713b50b9a0.webp?v=1714705144","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/823db652aa2d433fd3e1bc53901aa404e0614438_c62d31a0-7bfb-41ad-a459-3add34fd1913.webp?v=1714705147","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ab6ee29fb63a4d0dde232f94df16cb4711762fa_7ff60ac6-8ccd-4b7b-88ae-899513d4bda0.webp?v=1714705149","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dec14a1dd2bc36f5149d45a69aeabd873ff6956b_755ac458-bf09-4f19-9d94-cd834fddbbb0.webp?v=1714705151","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9df1844f45103d4e601cd20a2b7bbe142c60df2_e34993f9-5b8c-40de-bd6a-0fbc6b1194a7.webp?v=1714705153","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fcb46de6b4ea376d9e357279a06f813046bf2b0a_f9532dc4-fcad-43d5-bf1e-223342521549.webp?v=1714705156"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/907e6817c43b3bc2ad493556d37f0e6a1b4032f9_5f5cb656-61d8-4a87-9189-248fc7be9912.webp?v=1714705134","options":["color"],"media":[{"alt":null,"id":23875384672355,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/907e6817c43b3bc2ad493556d37f0e6a1b4032f9_5f5cb656-61d8-4a87-9189-248fc7be9912.webp?v=1714705134"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/907e6817c43b3bc2ad493556d37f0e6a1b4032f9_5f5cb656-61d8-4a87-9189-248fc7be9912.webp?v=1714705134","width":2000},{"alt":null,"id":23875385196643,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/571910e02746387143848bddf9f7e284e5a5110a_2af90544-144c-4c2e-b5fc-1883b60b2dd1.webp?v=1714705137"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/571910e02746387143848bddf9f7e284e5a5110a_2af90544-144c-4c2e-b5fc-1883b60b2dd1.webp?v=1714705137","width":2000},{"alt":null,"id":23875385753699,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9db2f2257c68bbde79d72d04add7fe9271e66d9b_5f38d74a-3f46-43b1-8c9e-6a3359d7694a.webp?v=1714705140"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9db2f2257c68bbde79d72d04add7fe9271e66d9b_5f38d74a-3f46-43b1-8c9e-6a3359d7694a.webp?v=1714705140","width":2000},{"alt":null,"id":23875386212451,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8dfde3bb7f2428878b53d271b14c6f6cc3223d7_c1a13465-b91e-4924-930e-99950708365d.webp?v=1714705142"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8dfde3bb7f2428878b53d271b14c6f6cc3223d7_c1a13465-b91e-4924-930e-99950708365d.webp?v=1714705142","width":2000},{"alt":null,"id":23875386736739,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8541849a27ee6aad56b5a1ccdd5d3df79f42d94d_e3c34e8b-6a14-4290-ad2d-16713b50b9a0.webp?v=1714705144"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8541849a27ee6aad56b5a1ccdd5d3df79f42d94d_e3c34e8b-6a14-4290-ad2d-16713b50b9a0.webp?v=1714705144","width":2000},{"alt":null,"id":23875387129955,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/823db652aa2d433fd3e1bc53901aa404e0614438_c62d31a0-7bfb-41ad-a459-3add34fd1913.webp?v=1714705147"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/823db652aa2d433fd3e1bc53901aa404e0614438_c62d31a0-7bfb-41ad-a459-3add34fd1913.webp?v=1714705147","width":2000},{"alt":null,"id":23875387555939,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ab6ee29fb63a4d0dde232f94df16cb4711762fa_7ff60ac6-8ccd-4b7b-88ae-899513d4bda0.webp?v=1714705149"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ab6ee29fb63a4d0dde232f94df16cb4711762fa_7ff60ac6-8ccd-4b7b-88ae-899513d4bda0.webp?v=1714705149","width":2000},{"alt":null,"id":23875388014691,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dec14a1dd2bc36f5149d45a69aeabd873ff6956b_755ac458-bf09-4f19-9d94-cd834fddbbb0.webp?v=1714705151"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dec14a1dd2bc36f5149d45a69aeabd873ff6956b_755ac458-bf09-4f19-9d94-cd834fddbbb0.webp?v=1714705151","width":2000},{"alt":null,"id":23875388375139,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9df1844f45103d4e601cd20a2b7bbe142c60df2_e34993f9-5b8c-40de-bd6a-0fbc6b1194a7.webp?v=1714705153"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9df1844f45103d4e601cd20a2b7bbe142c60df2_e34993f9-5b8c-40de-bd6a-0fbc6b1194a7.webp?v=1714705153","width":2000},{"alt":null,"id":23875388801123,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fcb46de6b4ea376d9e357279a06f813046bf2b0a_f9532dc4-fcad-43d5-bf1e-223342521549.webp?v=1714705156"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fcb46de6b4ea376d9e357279a06f813046bf2b0a_f9532dc4-fcad-43d5-bf1e-223342521549.webp?v=1714705156","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41879385800803,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126224-PB47","requires_shipping":true,"taxable":true,"featured_image":{"id":31470481014883,"product_id":7407832531043,"position":1,"created_at":"2024-05-03T10:58:54+08:00","updated_at":"2024-05-03T10:58:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/907e6817c43b3bc2ad493556d37f0e6a1b4032f9_5f5cb656-61d8-4a87-9189-248fc7be9912.webp?v=1714705134","variant_ids":[41879385800803]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Pro - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - JEDI ORDER徽章2-潮流系列 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0126224-PB47","featured_media":{"alt":null,"id":23875384672355,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/907e6817c43b3bc2ad493556d37f0e6a1b4032f9_5f5cb656-61d8-4a87-9189-248fc7be9912.webp?v=1714705134"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41879385964643,"title":"Mod NX-白色邊框","option1":"Mod NX-白色邊框","option2":null,"option3":null,"sku":"NPB0126204-PB47","requires_shipping":true,"taxable":true,"featured_image":{"id":31470484652131,"product_id":7407832531043,"position":9,"created_at":"2024-05-03T10:59:13+08:00","updated_at":"2024-05-03T10:59:13+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9df1844f45103d4e601cd20a2b7bbe142c60df2_e34993f9-5b8c-40de-bd6a-0fbc6b1194a7.webp?v=1714705153","variant_ids":[41879385964643]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Pro - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - JEDI ORDER徽章2-潮流系列 - Mod NX-白色邊框","public_title":"Mod NX-白色邊框","options":["Mod NX-白色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0126204-PB47","featured_media":{"alt":null,"id":23875388375139,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9df1844f45103d4e601cd20a2b7bbe142c60df2_e34993f9-5b8c-40de-bd6a-0fbc6b1194a7.webp?v=1714705153"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41879386390627,"title":"Mod NX-海軍藍邊框","option1":"Mod NX-海軍藍邊框","option2":null,"option3":null,"sku":"NPB01262J5-PB47","requires_shipping":true,"taxable":true,"featured_image":{"id":31470482948195,"product_id":7407832531043,"position":5,"created_at":"2024-05-03T10:59:04+08:00","updated_at":"2024-05-03T10:59:04+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8541849a27ee6aad56b5a1ccdd5d3df79f42d94d_e3c34e8b-6a14-4290-ad2d-16713b50b9a0.webp?v=1714705144","variant_ids":[41879386390627]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Pro - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - JEDI ORDER徽章2-潮流系列 - Mod NX-海軍藍邊框","public_title":"Mod NX-海軍藍邊框","options":["Mod NX-海軍藍邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB01262J5-PB47","featured_media":{"alt":null,"id":23875386736739,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8541849a27ee6aad56b5a1ccdd5d3df79f42d94d_e3c34e8b-6a14-4290-ad2d-16713b50b9a0.webp?v=1714705144"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41879385800803,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126224-PB47","requires_shipping":true,"taxable":true,"featured_image":{"id":31470481014883,"product_id":7407832531043,"position":1,"created_at":"2024-05-03T10:58:54+08:00","updated_at":"2024-05-03T10:58:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/907e6817c43b3bc2ad493556d37f0e6a1b4032f9_5f5cb656-61d8-4a87-9189-248fc7be9912.webp?v=1714705134","variant_ids":[41879385800803]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Pro - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - JEDI ORDER徽章2-潮流系列 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0126224-PB47","featured_media":{"alt":null,"id":23875384672355,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/907e6817c43b3bc2ad493556d37f0e6a1b4032f9_5f5cb656-61d8-4a87-9189-248fc7be9912.webp?v=1714705134"}},"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: "停產" }