$product = {"id":7411263570019,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Pro - 迪士尼-星際大戰 Star Wars - 風暴兵-潮流系列","handle":"iphone-14-pro-mod-nx-magsafe-printable-pb42","description":null,"published_at":"2024-06-11T17:40:15+08:00","created_at":"2024-05-04T23:56:10+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":41896696938595,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126224-PB42","requires_shipping":true,"taxable":true,"featured_image":{"id":31479990222947,"product_id":7411263570019,"position":3,"created_at":"2024-05-04T23:56:17+08:00","updated_at":"2024-05-04T23:56:17+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbf29d9aa8d1dbccb30336fef66a8a996d3c550a_a65e8a4f-87bd-4ba9-bd34-5bfabe53a066.webp?v=1714838177","variant_ids":[41896696938595]},"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-PB42","featured_media":{"alt":null,"id":23885240795235,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbf29d9aa8d1dbccb30336fef66a8a996d3c550a_a65e8a4f-87bd-4ba9-bd34-5bfabe53a066.webp?v=1714838177"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41896697004131,"title":"Mod NX-白色邊框","option1":"Mod NX-白色邊框","option2":null,"option3":null,"sku":"MPB0126204-PB42","requires_shipping":true,"taxable":true,"featured_image":{"id":31479991042147,"product_id":7411263570019,"position":4,"created_at":"2024-05-04T23:56:20+08:00","updated_at":"2024-05-04T23:56:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a8c8322ec30acc915c7130dd2752e448482f42b2_f71fce6f-442b-4ab9-a7d4-c128341d501f.webp?v=1714838180","variant_ids":[41896697004131]},"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-PB42","featured_media":{"alt":null,"id":23885241647203,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a8c8322ec30acc915c7130dd2752e448482f42b2_f71fce6f-442b-4ab9-a7d4-c128341d501f.webp?v=1714838180"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41896697233507,"title":"Mod NX-海軍藍邊框","option1":"Mod NX-海軍藍邊框","option2":null,"option3":null,"sku":"MPB01262J5-PB42","requires_shipping":true,"taxable":true,"featured_image":{"id":31479989567587,"product_id":7411263570019,"position":2,"created_at":"2024-05-04T23:56:15+08:00","updated_at":"2024-05-04T23:56:15+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d99e5a0926639390e6f9701da59aeee7c9588ba9_4e7096c0-049b-4640-896e-95a2f1ac353d.webp?v=1714838175","variant_ids":[41896697233507]},"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-PB42","featured_media":{"alt":null,"id":23885240434787,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d99e5a0926639390e6f9701da59aeee7c9588ba9_4e7096c0-049b-4640-896e-95a2f1ac353d.webp?v=1714838175"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ab43d0d9e159b45574b163962055fd742bc98bb_825e4c9a-7ec7-4f89-96b7-be1670f6cf64.webp?v=1714838172","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d99e5a0926639390e6f9701da59aeee7c9588ba9_4e7096c0-049b-4640-896e-95a2f1ac353d.webp?v=1714838175","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbf29d9aa8d1dbccb30336fef66a8a996d3c550a_a65e8a4f-87bd-4ba9-bd34-5bfabe53a066.webp?v=1714838177","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a8c8322ec30acc915c7130dd2752e448482f42b2_f71fce6f-442b-4ab9-a7d4-c128341d501f.webp?v=1714838180","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03cbe337ffbf93dbc89c021efa2e49aa5e21359c_788cb83d-d7d5-47a1-ad81-42e458baea8c.webp?v=1714838182","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b47f3c85d6064e179154920635b021c43cf5cf50_9639a07e-36ec-44bc-b921-9bd71c1823c5.webp?v=1714838185","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/189f34ba7a7582c480873e6648f40c76f2434cda_86a72324-2e96-443f-923a-7ed50634daf3.webp?v=1714838188","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/56d2019f6c4ec11b4d40ac9ba9a3dbd712e2801c_2edd9648-1aa1-4c2c-ac46-43c78fac9ae9.webp?v=1714838191","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a675361da898212845c17cfe4af9e9d23c2040b_b51967d2-c647-47f8-8c80-6a045b22694c.webp?v=1714838193","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/49894962961c6d96271e88d0cfa94d5a104757e4_d431960b-29ce-4316-879a-2d9e9af8d0ee.webp?v=1714838196"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ab43d0d9e159b45574b163962055fd742bc98bb_825e4c9a-7ec7-4f89-96b7-be1670f6cf64.webp?v=1714838172","options":["color"],"media":[{"alt":null,"id":23885239484515,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ab43d0d9e159b45574b163962055fd742bc98bb_825e4c9a-7ec7-4f89-96b7-be1670f6cf64.webp?v=1714838172"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ab43d0d9e159b45574b163962055fd742bc98bb_825e4c9a-7ec7-4f89-96b7-be1670f6cf64.webp?v=1714838172","width":2000},{"alt":null,"id":23885240434787,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d99e5a0926639390e6f9701da59aeee7c9588ba9_4e7096c0-049b-4640-896e-95a2f1ac353d.webp?v=1714838175"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d99e5a0926639390e6f9701da59aeee7c9588ba9_4e7096c0-049b-4640-896e-95a2f1ac353d.webp?v=1714838175","width":2000},{"alt":null,"id":23885240795235,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbf29d9aa8d1dbccb30336fef66a8a996d3c550a_a65e8a4f-87bd-4ba9-bd34-5bfabe53a066.webp?v=1714838177"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbf29d9aa8d1dbccb30336fef66a8a996d3c550a_a65e8a4f-87bd-4ba9-bd34-5bfabe53a066.webp?v=1714838177","width":2000},{"alt":null,"id":23885241647203,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a8c8322ec30acc915c7130dd2752e448482f42b2_f71fce6f-442b-4ab9-a7d4-c128341d501f.webp?v=1714838180"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a8c8322ec30acc915c7130dd2752e448482f42b2_f71fce6f-442b-4ab9-a7d4-c128341d501f.webp?v=1714838180","width":2000},{"alt":null,"id":23885242040419,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03cbe337ffbf93dbc89c021efa2e49aa5e21359c_788cb83d-d7d5-47a1-ad81-42e458baea8c.webp?v=1714838182"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03cbe337ffbf93dbc89c021efa2e49aa5e21359c_788cb83d-d7d5-47a1-ad81-42e458baea8c.webp?v=1714838182","width":2000},{"alt":null,"id":23885242826851,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b47f3c85d6064e179154920635b021c43cf5cf50_9639a07e-36ec-44bc-b921-9bd71c1823c5.webp?v=1714838185"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b47f3c85d6064e179154920635b021c43cf5cf50_9639a07e-36ec-44bc-b921-9bd71c1823c5.webp?v=1714838185","width":2000},{"alt":null,"id":23885243351139,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/189f34ba7a7582c480873e6648f40c76f2434cda_86a72324-2e96-443f-923a-7ed50634daf3.webp?v=1714838188"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/189f34ba7a7582c480873e6648f40c76f2434cda_86a72324-2e96-443f-923a-7ed50634daf3.webp?v=1714838188","width":2000},{"alt":null,"id":23885243940963,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/56d2019f6c4ec11b4d40ac9ba9a3dbd712e2801c_2edd9648-1aa1-4c2c-ac46-43c78fac9ae9.webp?v=1714838191"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/56d2019f6c4ec11b4d40ac9ba9a3dbd712e2801c_2edd9648-1aa1-4c2c-ac46-43c78fac9ae9.webp?v=1714838191","width":2000},{"alt":null,"id":23885244498019,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a675361da898212845c17cfe4af9e9d23c2040b_b51967d2-c647-47f8-8c80-6a045b22694c.webp?v=1714838193"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a675361da898212845c17cfe4af9e9d23c2040b_b51967d2-c647-47f8-8c80-6a045b22694c.webp?v=1714838193","width":2000},{"alt":null,"id":23885244989539,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/49894962961c6d96271e88d0cfa94d5a104757e4_d431960b-29ce-4316-879a-2d9e9af8d0ee.webp?v=1714838196"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/49894962961c6d96271e88d0cfa94d5a104757e4_d431960b-29ce-4316-879a-2d9e9af8d0ee.webp?v=1714838196","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41896696938595,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126224-PB42","requires_shipping":true,"taxable":true,"featured_image":{"id":31479990222947,"product_id":7411263570019,"position":3,"created_at":"2024-05-04T23:56:17+08:00","updated_at":"2024-05-04T23:56:17+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbf29d9aa8d1dbccb30336fef66a8a996d3c550a_a65e8a4f-87bd-4ba9-bd34-5bfabe53a066.webp?v=1714838177","variant_ids":[41896696938595]},"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-PB42","featured_media":{"alt":null,"id":23885240795235,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbf29d9aa8d1dbccb30336fef66a8a996d3c550a_a65e8a4f-87bd-4ba9-bd34-5bfabe53a066.webp?v=1714838177"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41896697004131,"title":"Mod NX-白色邊框","option1":"Mod NX-白色邊框","option2":null,"option3":null,"sku":"MPB0126204-PB42","requires_shipping":true,"taxable":true,"featured_image":{"id":31479991042147,"product_id":7411263570019,"position":4,"created_at":"2024-05-04T23:56:20+08:00","updated_at":"2024-05-04T23:56:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a8c8322ec30acc915c7130dd2752e448482f42b2_f71fce6f-442b-4ab9-a7d4-c128341d501f.webp?v=1714838180","variant_ids":[41896697004131]},"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-PB42","featured_media":{"alt":null,"id":23885241647203,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a8c8322ec30acc915c7130dd2752e448482f42b2_f71fce6f-442b-4ab9-a7d4-c128341d501f.webp?v=1714838180"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41896697233507,"title":"Mod NX-海軍藍邊框","option1":"Mod NX-海軍藍邊框","option2":null,"option3":null,"sku":"MPB01262J5-PB42","requires_shipping":true,"taxable":true,"featured_image":{"id":31479989567587,"product_id":7411263570019,"position":2,"created_at":"2024-05-04T23:56:15+08:00","updated_at":"2024-05-04T23:56:15+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d99e5a0926639390e6f9701da59aeee7c9588ba9_4e7096c0-049b-4640-896e-95a2f1ac353d.webp?v=1714838175","variant_ids":[41896697233507]},"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-PB42","featured_media":{"alt":null,"id":23885240434787,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d99e5a0926639390e6f9701da59aeee7c9588ba9_4e7096c0-049b-4640-896e-95a2f1ac353d.webp?v=1714838175"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41896696938595,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126224-PB42","requires_shipping":true,"taxable":true,"featured_image":{"id":31479990222947,"product_id":7411263570019,"position":3,"created_at":"2024-05-04T23:56:17+08:00","updated_at":"2024-05-04T23:56:17+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbf29d9aa8d1dbccb30336fef66a8a996d3c550a_a65e8a4f-87bd-4ba9-bd34-5bfabe53a066.webp?v=1714838177","variant_ids":[41896696938595]},"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-PB42","featured_media":{"alt":null,"id":23885240795235,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbf29d9aa8d1dbccb30336fef66a8a996d3c550a_a65e8a4f-87bd-4ba9-bd34-5bfabe53a066.webp?v=1714838177"}},"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: "停產" }