$product = {"id":7411233521763,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Pro - 迪士尼-星際大戰 Star Wars - R2D2 \u0026 C3PO-塗鴉藝術","handle":"iphone-14-pro-mod-nx-magsafe-printable-pb34","description":null,"published_at":"2024-06-11T17:39:28+08:00","created_at":"2024-05-04T23:50:27+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":41896319746147,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126224-PB34","requires_shipping":true,"taxable":true,"featured_image":{"id":31479917969507,"product_id":7411233521763,"position":4,"created_at":"2024-05-04T23:50:36+08:00","updated_at":"2024-05-04T23:50:36+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3fba88fe248775c47c8599a633509be270ec0c71_adb070dd-6050-4993-a3a8-16317370d72b.webp?v=1714837836","variant_ids":[41896319746147]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Pro - 迪士尼-星際大戰 Star Wars - R2D2 \u0026 C3PO-塗鴉藝術 - 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-PB34","featured_media":{"alt":null,"id":23885168345187,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3fba88fe248775c47c8599a633509be270ec0c71_adb070dd-6050-4993-a3a8-16317370d72b.webp?v=1714837836"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41896319811683,"title":"Mod NX-白色邊框","option1":"Mod NX-白色邊框","option2":null,"option3":null,"sku":"MPB0126204-PB34","requires_shipping":true,"taxable":true,"featured_image":{"id":31479916920931,"product_id":7411233521763,"position":2,"created_at":"2024-05-04T23:50:31+08:00","updated_at":"2024-05-04T23:50:31+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d144b8c55f5e968c8bc962fd787374bc91039cc6_72cb0677-a0a6-4161-8288-da9509771176.webp?v=1714837831","variant_ids":[41896319811683]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Pro - 迪士尼-星際大戰 Star Wars - R2D2 \u0026 C3PO-塗鴉藝術 - 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-PB34","featured_media":{"alt":null,"id":23885167296611,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d144b8c55f5e968c8bc962fd787374bc91039cc6_72cb0677-a0a6-4161-8288-da9509771176.webp?v=1714837831"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41896320073827,"title":"Mod NX-海軍藍邊框","option1":"Mod NX-海軍藍邊框","option2":null,"option3":null,"sku":"MPB01262J5-PB34","requires_shipping":true,"taxable":true,"featured_image":{"id":31479918821475,"product_id":7411233521763,"position":6,"created_at":"2024-05-04T23:50:41+08:00","updated_at":"2024-05-04T23:50:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0826ca47fe9a2b7c5a4bc03e764920bf4d1a94b9_9f137873-a91b-4439-bf11-b45bfcffe66c.webp?v=1714837841","variant_ids":[41896320073827]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Pro - 迪士尼-星際大戰 Star Wars - R2D2 \u0026 C3PO-塗鴉藝術 - 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-PB34","featured_media":{"alt":null,"id":23885169197155,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0826ca47fe9a2b7c5a4bc03e764920bf4d1a94b9_9f137873-a91b-4439-bf11-b45bfcffe66c.webp?v=1714837841"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3951ec6b96f7c9315ca5c80ba1c26139d1b9fbf_6b855f72-7ed3-498d-8f74-62de7e568d02.webp?v=1714837829","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d144b8c55f5e968c8bc962fd787374bc91039cc6_72cb0677-a0a6-4161-8288-da9509771176.webp?v=1714837831","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f89702d9b3c31a58525f2dcb0955d8fc2c70924_c7787eb3-e1e5-456b-a954-c80a624bb635.webp?v=1714837834","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3fba88fe248775c47c8599a633509be270ec0c71_adb070dd-6050-4993-a3a8-16317370d72b.webp?v=1714837836","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/380fc575a8ec8010cbcea64e4fc52fd6fc520c16_4a527d23-8d91-4151-9e32-ad58173571c9.webp?v=1714837838","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0826ca47fe9a2b7c5a4bc03e764920bf4d1a94b9_9f137873-a91b-4439-bf11-b45bfcffe66c.webp?v=1714837841","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/21abd85b91862a261be94af4342ad952723cb96e_33294c63-ffaa-49e2-a8a1-e84a47fdd68b.webp?v=1714837843","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba557c4a7eae36a4501a45d599b050cd3dfc9674_eb5597ad-dd99-4ecb-9fd5-77fb8943ab37.webp?v=1714837845","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f07656e2dc618a7e0c404036a2c4399b3293ea1a_35c60869-5dfa-45e6-a9f1-934ff21f2e4b.webp?v=1714837848","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ebbd3c0f161a3af780dc03624bf7b0537f98f33_898e16de-aa9b-4862-a9e8-ff198fb65ece.webp?v=1714837850"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3951ec6b96f7c9315ca5c80ba1c26139d1b9fbf_6b855f72-7ed3-498d-8f74-62de7e568d02.webp?v=1714837829","options":["color"],"media":[{"alt":null,"id":23885166870627,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3951ec6b96f7c9315ca5c80ba1c26139d1b9fbf_6b855f72-7ed3-498d-8f74-62de7e568d02.webp?v=1714837829"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3951ec6b96f7c9315ca5c80ba1c26139d1b9fbf_6b855f72-7ed3-498d-8f74-62de7e568d02.webp?v=1714837829","width":2000},{"alt":null,"id":23885167296611,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d144b8c55f5e968c8bc962fd787374bc91039cc6_72cb0677-a0a6-4161-8288-da9509771176.webp?v=1714837831"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d144b8c55f5e968c8bc962fd787374bc91039cc6_72cb0677-a0a6-4161-8288-da9509771176.webp?v=1714837831","width":2000},{"alt":null,"id":23885167788131,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f89702d9b3c31a58525f2dcb0955d8fc2c70924_c7787eb3-e1e5-456b-a954-c80a624bb635.webp?v=1714837834"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f89702d9b3c31a58525f2dcb0955d8fc2c70924_c7787eb3-e1e5-456b-a954-c80a624bb635.webp?v=1714837834","width":2000},{"alt":null,"id":23885168345187,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3fba88fe248775c47c8599a633509be270ec0c71_adb070dd-6050-4993-a3a8-16317370d72b.webp?v=1714837836"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3fba88fe248775c47c8599a633509be270ec0c71_adb070dd-6050-4993-a3a8-16317370d72b.webp?v=1714837836","width":2000},{"alt":null,"id":23885168803939,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/380fc575a8ec8010cbcea64e4fc52fd6fc520c16_4a527d23-8d91-4151-9e32-ad58173571c9.webp?v=1714837838"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/380fc575a8ec8010cbcea64e4fc52fd6fc520c16_4a527d23-8d91-4151-9e32-ad58173571c9.webp?v=1714837838","width":2000},{"alt":null,"id":23885169197155,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0826ca47fe9a2b7c5a4bc03e764920bf4d1a94b9_9f137873-a91b-4439-bf11-b45bfcffe66c.webp?v=1714837841"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0826ca47fe9a2b7c5a4bc03e764920bf4d1a94b9_9f137873-a91b-4439-bf11-b45bfcffe66c.webp?v=1714837841","width":2000},{"alt":null,"id":23885169918051,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/21abd85b91862a261be94af4342ad952723cb96e_33294c63-ffaa-49e2-a8a1-e84a47fdd68b.webp?v=1714837843"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/21abd85b91862a261be94af4342ad952723cb96e_33294c63-ffaa-49e2-a8a1-e84a47fdd68b.webp?v=1714837843","width":2000},{"alt":null,"id":23885170311267,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba557c4a7eae36a4501a45d599b050cd3dfc9674_eb5597ad-dd99-4ecb-9fd5-77fb8943ab37.webp?v=1714837845"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba557c4a7eae36a4501a45d599b050cd3dfc9674_eb5597ad-dd99-4ecb-9fd5-77fb8943ab37.webp?v=1714837845","width":2000},{"alt":null,"id":23885170868323,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f07656e2dc618a7e0c404036a2c4399b3293ea1a_35c60869-5dfa-45e6-a9f1-934ff21f2e4b.webp?v=1714837848"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f07656e2dc618a7e0c404036a2c4399b3293ea1a_35c60869-5dfa-45e6-a9f1-934ff21f2e4b.webp?v=1714837848","width":2000},{"alt":null,"id":23885171294307,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ebbd3c0f161a3af780dc03624bf7b0537f98f33_898e16de-aa9b-4862-a9e8-ff198fb65ece.webp?v=1714837850"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ebbd3c0f161a3af780dc03624bf7b0537f98f33_898e16de-aa9b-4862-a9e8-ff198fb65ece.webp?v=1714837850","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41896319746147,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126224-PB34","requires_shipping":true,"taxable":true,"featured_image":{"id":31479917969507,"product_id":7411233521763,"position":4,"created_at":"2024-05-04T23:50:36+08:00","updated_at":"2024-05-04T23:50:36+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3fba88fe248775c47c8599a633509be270ec0c71_adb070dd-6050-4993-a3a8-16317370d72b.webp?v=1714837836","variant_ids":[41896319746147]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Pro - 迪士尼-星際大戰 Star Wars - R2D2 \u0026 C3PO-塗鴉藝術 - 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-PB34","featured_media":{"alt":null,"id":23885168345187,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3fba88fe248775c47c8599a633509be270ec0c71_adb070dd-6050-4993-a3a8-16317370d72b.webp?v=1714837836"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41896319811683,"title":"Mod NX-白色邊框","option1":"Mod NX-白色邊框","option2":null,"option3":null,"sku":"MPB0126204-PB34","requires_shipping":true,"taxable":true,"featured_image":{"id":31479916920931,"product_id":7411233521763,"position":2,"created_at":"2024-05-04T23:50:31+08:00","updated_at":"2024-05-04T23:50:31+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d144b8c55f5e968c8bc962fd787374bc91039cc6_72cb0677-a0a6-4161-8288-da9509771176.webp?v=1714837831","variant_ids":[41896319811683]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Pro - 迪士尼-星際大戰 Star Wars - R2D2 \u0026 C3PO-塗鴉藝術 - 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-PB34","featured_media":{"alt":null,"id":23885167296611,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d144b8c55f5e968c8bc962fd787374bc91039cc6_72cb0677-a0a6-4161-8288-da9509771176.webp?v=1714837831"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41896320073827,"title":"Mod NX-海軍藍邊框","option1":"Mod NX-海軍藍邊框","option2":null,"option3":null,"sku":"MPB01262J5-PB34","requires_shipping":true,"taxable":true,"featured_image":{"id":31479918821475,"product_id":7411233521763,"position":6,"created_at":"2024-05-04T23:50:41+08:00","updated_at":"2024-05-04T23:50:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0826ca47fe9a2b7c5a4bc03e764920bf4d1a94b9_9f137873-a91b-4439-bf11-b45bfcffe66c.webp?v=1714837841","variant_ids":[41896320073827]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Pro - 迪士尼-星際大戰 Star Wars - R2D2 \u0026 C3PO-塗鴉藝術 - 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-PB34","featured_media":{"alt":null,"id":23885169197155,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0826ca47fe9a2b7c5a4bc03e764920bf4d1a94b9_9f137873-a91b-4439-bf11-b45bfcffe66c.webp?v=1714837841"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41896319746147,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126224-PB34","requires_shipping":true,"taxable":true,"featured_image":{"id":31479917969507,"product_id":7411233521763,"position":4,"created_at":"2024-05-04T23:50:36+08:00","updated_at":"2024-05-04T23:50:36+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3fba88fe248775c47c8599a633509be270ec0c71_adb070dd-6050-4993-a3a8-16317370d72b.webp?v=1714837836","variant_ids":[41896319746147]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Pro - 迪士尼-星際大戰 Star Wars - R2D2 \u0026 C3PO-塗鴉藝術 - 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-PB34","featured_media":{"alt":null,"id":23885168345187,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3fba88fe248775c47c8599a633509be270ec0c71_adb070dd-6050-4993-a3a8-16317370d72b.webp?v=1714837836"}},"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: "停產" }