$product = {"id":7159419338851,"title":"iPhone 14 Pro Max Clear NBA Logo-波士頓塞爾提克 Boston Celtics","handle":"iphone-14-pro-max-jellytint-pm19","description":null,"published_at":"2024-02-01T10:30:59+08:00","created_at":"2024-01-26T18:09:27+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-nba","device-iPhone 14 Pro Max","merge","reseller-nba"],"price":128000,"price_min":128000,"price_max":128000,"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":41214787879011,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"CCN012630G-PM19","requires_shipping":true,"taxable":true,"featured_image":{"id":36152356601955,"product_id":7159419338851,"position":11,"created_at":"2026-07-02T12:17:01+08:00","updated_at":"2026-07-02T12:17:03+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e13f14b80fb0777a43f304ac11563cf07691d7d_83222ecc-48b3-49f5-85ea-cac7968708ff.webp?v=1782965823","variant_ids":[41214787879011]},"available":true,"name":"iPhone 14 Pro Max Clear NBA Logo-波士頓塞爾提克 Boston Celtics - Ash Black","public_title":"Ash Black","options":["Ash Black"],"price":128000,"weight":1180,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"CCN012630G-PM19","featured_media":{"alt":null,"id":27657230090339,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e13f14b80fb0777a43f304ac11563cf07691d7d_83222ecc-48b3-49f5-85ea-cac7968708ff.webp?v=1782965823"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41214787944547,"title":"Moody Green","option1":"Moody Green","option2":null,"option3":null,"sku":"CCN012630H-PM19","requires_shipping":true,"taxable":true,"featured_image":{"id":36152356831331,"product_id":7159419338851,"position":12,"created_at":"2026-07-02T12:17:01+08:00","updated_at":"2026-07-02T12:17:04+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b193664e70f08ecbe069b40c9abf9481a65cb159_3d0610ce-02fb-4585-a3c0-3a76e13ff839.webp?v=1782965824","variant_ids":[41214787944547]},"available":true,"name":"iPhone 14 Pro Max Clear NBA Logo-波士頓塞爾提克 Boston Celtics - Moody Green","public_title":"Moody Green","options":["Moody Green"],"price":128000,"weight":1180,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"CCN012630H-PM19","featured_media":{"alt":null,"id":27657230319715,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b193664e70f08ecbe069b40c9abf9481a65cb159_3d0610ce-02fb-4585-a3c0-3a76e13ff839.webp?v=1782965824"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41214788010083,"title":"Fancy Pink","option1":"Fancy Pink","option2":null,"option3":null,"sku":"CCN012630J-PM19","requires_shipping":true,"taxable":true,"featured_image":{"id":36152356995171,"product_id":7159419338851,"position":13,"created_at":"2026-07-02T12:17:02+08:00","updated_at":"2026-07-02T12:17:04+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0fafedaa8978c774134bc0e36ed36876a819f32a_e8db4d54-c50d-4062-8650-99c56a1d5714.webp?v=1782965824","variant_ids":[41214788010083]},"available":true,"name":"iPhone 14 Pro Max Clear NBA Logo-波士頓塞爾提克 Boston Celtics - Fancy Pink","public_title":"Fancy Pink","options":["Fancy Pink"],"price":128000,"weight":1180,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"CCN012630J-PM19","featured_media":{"alt":null,"id":27657230483555,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0fafedaa8978c774134bc0e36ed36876a819f32a_e8db4d54-c50d-4062-8650-99c56a1d5714.webp?v=1782965824"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/Clear-F5-263-PM19_1020cded-8260-480e-af11-8ba4758d0e2c.png?v=1706263770","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0fafedaa8978c774134bc0e36ed36876a819f32a.webp?v=1782207327","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b193664e70f08ecbe069b40c9abf9481a65cb159.webp?v=1782207327","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e13f14b80fb0777a43f304ac11563cf07691d7d.webp?v=1782207328","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e13f14b80fb0777a43f304ac11563cf07691d7d_8f382cea-8c68-409e-9adf-8603819f31cd.webp?v=1782957847","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b193664e70f08ecbe069b40c9abf9481a65cb159_71de5c0a-f3b9-4df3-8de2-fa37b6f66876.webp?v=1782957848","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0fafedaa8978c774134bc0e36ed36876a819f32a_ade5dead-d554-4957-9ea6-894a0ebc35f4.webp?v=1782957849","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e13f14b80fb0777a43f304ac11563cf07691d7d_30b9e3d0-7465-4b7e-944b-64555a3ee1d9.webp?v=1782961406","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b193664e70f08ecbe069b40c9abf9481a65cb159_bfc0dcc4-7050-4503-a2b6-37b5f80ef73d.webp?v=1782961406","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0fafedaa8978c774134bc0e36ed36876a819f32a_800289c2-5d22-4e2a-a260-2c8223ba8cc0.webp?v=1782961408","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e13f14b80fb0777a43f304ac11563cf07691d7d_83222ecc-48b3-49f5-85ea-cac7968708ff.webp?v=1782965823","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b193664e70f08ecbe069b40c9abf9481a65cb159_3d0610ce-02fb-4585-a3c0-3a76e13ff839.webp?v=1782965824","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0fafedaa8978c774134bc0e36ed36876a819f32a_e8db4d54-c50d-4062-8650-99c56a1d5714.webp?v=1782965824"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/Clear-F5-263-PM19_1020cded-8260-480e-af11-8ba4758d0e2c.png?v=1706263770","options":["color"],"media":[{"alt":null,"id":23219690635363,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/Clear-F5-263-PM19_1020cded-8260-480e-af11-8ba4758d0e2c.png?v=1706263770"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/Clear-F5-263-PM19_1020cded-8260-480e-af11-8ba4758d0e2c.png?v=1706263770","width":2000},{"alt":null,"id":27575904338019,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0fafedaa8978c774134bc0e36ed36876a819f32a.webp?v=1782207327"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0fafedaa8978c774134bc0e36ed36876a819f32a.webp?v=1782207327","width":2000},{"alt":null,"id":27575904698467,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b193664e70f08ecbe069b40c9abf9481a65cb159.webp?v=1782207327"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b193664e70f08ecbe069b40c9abf9481a65cb159.webp?v=1782207327","width":2000},{"alt":null,"id":27575905026147,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e13f14b80fb0777a43f304ac11563cf07691d7d.webp?v=1782207328"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e13f14b80fb0777a43f304ac11563cf07691d7d.webp?v=1782207328","width":2000},{"alt":null,"id":27655942570083,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e13f14b80fb0777a43f304ac11563cf07691d7d_8f382cea-8c68-409e-9adf-8603819f31cd.webp?v=1782957847"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e13f14b80fb0777a43f304ac11563cf07691d7d_8f382cea-8c68-409e-9adf-8603819f31cd.webp?v=1782957847","width":2000},{"alt":null,"id":27655942963299,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b193664e70f08ecbe069b40c9abf9481a65cb159_71de5c0a-f3b9-4df3-8de2-fa37b6f66876.webp?v=1782957848"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b193664e70f08ecbe069b40c9abf9481a65cb159_71de5c0a-f3b9-4df3-8de2-fa37b6f66876.webp?v=1782957848","width":2000},{"alt":null,"id":27655943389283,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0fafedaa8978c774134bc0e36ed36876a819f32a_ade5dead-d554-4957-9ea6-894a0ebc35f4.webp?v=1782957849"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0fafedaa8978c774134bc0e36ed36876a819f32a_ade5dead-d554-4957-9ea6-894a0ebc35f4.webp?v=1782957849","width":2000},{"alt":null,"id":27656755806307,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e13f14b80fb0777a43f304ac11563cf07691d7d_30b9e3d0-7465-4b7e-944b-64555a3ee1d9.webp?v=1782961406"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e13f14b80fb0777a43f304ac11563cf07691d7d_30b9e3d0-7465-4b7e-944b-64555a3ee1d9.webp?v=1782961406","width":2000},{"alt":null,"id":27656756232291,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b193664e70f08ecbe069b40c9abf9481a65cb159_bfc0dcc4-7050-4503-a2b6-37b5f80ef73d.webp?v=1782961406"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b193664e70f08ecbe069b40c9abf9481a65cb159_bfc0dcc4-7050-4503-a2b6-37b5f80ef73d.webp?v=1782961406","width":2000},{"alt":null,"id":27656756592739,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0fafedaa8978c774134bc0e36ed36876a819f32a_800289c2-5d22-4e2a-a260-2c8223ba8cc0.webp?v=1782961408"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0fafedaa8978c774134bc0e36ed36876a819f32a_800289c2-5d22-4e2a-a260-2c8223ba8cc0.webp?v=1782961408","width":2000},{"alt":null,"id":27657230090339,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e13f14b80fb0777a43f304ac11563cf07691d7d_83222ecc-48b3-49f5-85ea-cac7968708ff.webp?v=1782965823"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e13f14b80fb0777a43f304ac11563cf07691d7d_83222ecc-48b3-49f5-85ea-cac7968708ff.webp?v=1782965823","width":2000},{"alt":null,"id":27657230319715,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b193664e70f08ecbe069b40c9abf9481a65cb159_3d0610ce-02fb-4585-a3c0-3a76e13ff839.webp?v=1782965824"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b193664e70f08ecbe069b40c9abf9481a65cb159_3d0610ce-02fb-4585-a3c0-3a76e13ff839.webp?v=1782965824","width":2000},{"alt":null,"id":27657230483555,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0fafedaa8978c774134bc0e36ed36876a819f32a_e8db4d54-c50d-4062-8650-99c56a1d5714.webp?v=1782965824"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0fafedaa8978c774134bc0e36ed36876a819f32a_e8db4d54-c50d-4062-8650-99c56a1d5714.webp?v=1782965824","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41214787879011,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"CCN012630G-PM19","requires_shipping":true,"taxable":true,"featured_image":{"id":36152356601955,"product_id":7159419338851,"position":11,"created_at":"2026-07-02T12:17:01+08:00","updated_at":"2026-07-02T12:17:03+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e13f14b80fb0777a43f304ac11563cf07691d7d_83222ecc-48b3-49f5-85ea-cac7968708ff.webp?v=1782965823","variant_ids":[41214787879011]},"available":true,"name":"iPhone 14 Pro Max Clear NBA Logo-波士頓塞爾提克 Boston Celtics - Ash Black","public_title":"Ash Black","options":["Ash Black"],"price":128000,"weight":1180,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"CCN012630G-PM19","featured_media":{"alt":null,"id":27657230090339,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e13f14b80fb0777a43f304ac11563cf07691d7d_83222ecc-48b3-49f5-85ea-cac7968708ff.webp?v=1782965823"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41214787944547,"title":"Moody Green","option1":"Moody Green","option2":null,"option3":null,"sku":"CCN012630H-PM19","requires_shipping":true,"taxable":true,"featured_image":{"id":36152356831331,"product_id":7159419338851,"position":12,"created_at":"2026-07-02T12:17:01+08:00","updated_at":"2026-07-02T12:17:04+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b193664e70f08ecbe069b40c9abf9481a65cb159_3d0610ce-02fb-4585-a3c0-3a76e13ff839.webp?v=1782965824","variant_ids":[41214787944547]},"available":true,"name":"iPhone 14 Pro Max Clear NBA Logo-波士頓塞爾提克 Boston Celtics - Moody Green","public_title":"Moody Green","options":["Moody Green"],"price":128000,"weight":1180,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"CCN012630H-PM19","featured_media":{"alt":null,"id":27657230319715,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b193664e70f08ecbe069b40c9abf9481a65cb159_3d0610ce-02fb-4585-a3c0-3a76e13ff839.webp?v=1782965824"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41214788010083,"title":"Fancy Pink","option1":"Fancy Pink","option2":null,"option3":null,"sku":"CCN012630J-PM19","requires_shipping":true,"taxable":true,"featured_image":{"id":36152356995171,"product_id":7159419338851,"position":13,"created_at":"2026-07-02T12:17:02+08:00","updated_at":"2026-07-02T12:17:04+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0fafedaa8978c774134bc0e36ed36876a819f32a_e8db4d54-c50d-4062-8650-99c56a1d5714.webp?v=1782965824","variant_ids":[41214788010083]},"available":true,"name":"iPhone 14 Pro Max Clear NBA Logo-波士頓塞爾提克 Boston Celtics - Fancy Pink","public_title":"Fancy Pink","options":["Fancy Pink"],"price":128000,"weight":1180,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"CCN012630J-PM19","featured_media":{"alt":null,"id":27657230483555,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0fafedaa8978c774134bc0e36ed36876a819f32a_e8db4d54-c50d-4062-8650-99c56a1d5714.webp?v=1782965824"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41214787879011,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"CCN012630G-PM19","requires_shipping":true,"taxable":true,"featured_image":{"id":36152356601955,"product_id":7159419338851,"position":11,"created_at":"2026-07-02T12:17:01+08:00","updated_at":"2026-07-02T12:17:03+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e13f14b80fb0777a43f304ac11563cf07691d7d_83222ecc-48b3-49f5-85ea-cac7968708ff.webp?v=1782965823","variant_ids":[41214787879011]},"available":true,"name":"iPhone 14 Pro Max Clear NBA Logo-波士頓塞爾提克 Boston Celtics - Ash Black","public_title":"Ash Black","options":["Ash Black"],"price":128000,"weight":1180,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"CCN012630G-PM19","featured_media":{"alt":null,"id":27657230090339,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e13f14b80fb0777a43f304ac11563cf07691d7d_83222ecc-48b3-49f5-85ea-cac7968708ff.webp?v=1782965823"}},"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: "停產" }