$product = {"id":7159411507299,"title":"iPhone 14 Clear NBA Logo-波士頓塞爾提克 Boston Celtics","handle":"iphone-14-jellytint-pm19","description":null,"published_at":"2025-05-08T12:49:53+08:00","created_at":"2024-01-26T18:08:34+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-nba","device-iPhone 14","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":41214749376611,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"CCN012600G-PM19","requires_shipping":true,"taxable":true,"featured_image":{"id":36152328159331,"product_id":7159411507299,"position":11,"created_at":"2026-07-02T12:15:47+08:00","updated_at":"2026-07-02T12:15:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/facb975031be39d0135a46ca020f3a2e58b424c6_588d2cad-3d20-44e5-ba81-de95da46d8ee.webp?v=1782965749","variant_ids":[41214749376611]},"available":true,"name":"iPhone 14 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":"CCN012600G-PM19","featured_media":{"alt":null,"id":27657201647715,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/facb975031be39d0135a46ca020f3a2e58b424c6_588d2cad-3d20-44e5-ba81-de95da46d8ee.webp?v=1782965749"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41214749507683,"title":"Cyber Blue","option1":"Cyber Blue","option2":null,"option3":null,"sku":"CCN012600I-PM19","requires_shipping":true,"taxable":true,"featured_image":{"id":36152328519779,"product_id":7159411507299,"position":13,"created_at":"2026-07-02T12:15:48+08:00","updated_at":"2026-07-02T12:15:50+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb1744b66192c913530685463344ba4937e3b5b8_e7ced54f-50c6-43d2-937b-3fdea038d448.webp?v=1782965750","variant_ids":[41214749507683]},"available":true,"name":"iPhone 14 Clear NBA Logo-波士頓塞爾提克 Boston Celtics - Cyber Blue","public_title":"Cyber Blue","options":["Cyber Blue"],"price":128000,"weight":1180,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"CCN012600I-PM19","featured_media":{"alt":null,"id":27657202008163,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb1744b66192c913530685463344ba4937e3b5b8_e7ced54f-50c6-43d2-937b-3fdea038d448.webp?v=1782965750"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41214749573219,"title":"Fancy Pink","option1":"Fancy Pink","option2":null,"option3":null,"sku":"CCN012600J-PM19","requires_shipping":true,"taxable":true,"featured_image":{"id":36152328290403,"product_id":7159411507299,"position":12,"created_at":"2026-07-02T12:15:47+08:00","updated_at":"2026-07-02T12:15:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abdd4d2f2b180a907624a176dc47a0b15a4f60c7_7b0e1271-3017-47a0-bdfa-7030e8b5a2d5.webp?v=1782965749","variant_ids":[41214749573219]},"available":true,"name":"iPhone 14 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":"CCN012600J-PM19","featured_media":{"alt":null,"id":27657201746019,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abdd4d2f2b180a907624a176dc47a0b15a4f60c7_7b0e1271-3017-47a0-bdfa-7030e8b5a2d5.webp?v=1782965749"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/Clear-F5-260-PM19_1ac60747-42c4-4f10-8c97-33bcf57438c1.png?v=1706263716","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/facb975031be39d0135a46ca020f3a2e58b424c6_dff99c3f-32f5-416c-889b-4214227eea09.webp?v=1782206571","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb1744b66192c913530685463344ba4937e3b5b8_14857675-428c-4272-bfe3-878b1d9487a2.webp?v=1782206572","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abdd4d2f2b180a907624a176dc47a0b15a4f60c7_f689472d-6f86-46f8-bac7-ce4cb0915786.webp?v=1782206572","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/facb975031be39d0135a46ca020f3a2e58b424c6_900c7624-4475-415e-88ce-b8ad5bdc2bce.webp?v=1782957715","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abdd4d2f2b180a907624a176dc47a0b15a4f60c7_ec1983b0-61fc-4197-b7be-556ac4d1534f.webp?v=1782957715","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb1744b66192c913530685463344ba4937e3b5b8_7d35a97a-3745-4500-aff5-fc0d1b5cbb8d.webp?v=1782957718","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/facb975031be39d0135a46ca020f3a2e58b424c6_ecb0d9f9-1610-4fd7-9ee9-d0fce4d88b67.webp?v=1782961359","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abdd4d2f2b180a907624a176dc47a0b15a4f60c7_80eb695a-72b6-4f86-96ca-676f3ed6d42f.webp?v=1782961360","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb1744b66192c913530685463344ba4937e3b5b8_d73ac5fd-bf5d-44c3-bd61-79a88fc0ecea.webp?v=1782961361","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/facb975031be39d0135a46ca020f3a2e58b424c6_588d2cad-3d20-44e5-ba81-de95da46d8ee.webp?v=1782965749","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abdd4d2f2b180a907624a176dc47a0b15a4f60c7_7b0e1271-3017-47a0-bdfa-7030e8b5a2d5.webp?v=1782965749","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb1744b66192c913530685463344ba4937e3b5b8_e7ced54f-50c6-43d2-937b-3fdea038d448.webp?v=1782965750"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/Clear-F5-260-PM19_1ac60747-42c4-4f10-8c97-33bcf57438c1.png?v=1706263716","options":["color"],"media":[{"alt":null,"id":23219680575587,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/Clear-F5-260-PM19_1ac60747-42c4-4f10-8c97-33bcf57438c1.png?v=1706263716"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/Clear-F5-260-PM19_1ac60747-42c4-4f10-8c97-33bcf57438c1.png?v=1706263716","width":2000},{"alt":null,"id":27575630430307,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/facb975031be39d0135a46ca020f3a2e58b424c6_dff99c3f-32f5-416c-889b-4214227eea09.webp?v=1782206571"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/facb975031be39d0135a46ca020f3a2e58b424c6_dff99c3f-32f5-416c-889b-4214227eea09.webp?v=1782206571","width":2000},{"alt":null,"id":27575630921827,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb1744b66192c913530685463344ba4937e3b5b8_14857675-428c-4272-bfe3-878b1d9487a2.webp?v=1782206572"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb1744b66192c913530685463344ba4937e3b5b8_14857675-428c-4272-bfe3-878b1d9487a2.webp?v=1782206572","width":2000},{"alt":null,"id":27575631347811,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abdd4d2f2b180a907624a176dc47a0b15a4f60c7_f689472d-6f86-46f8-bac7-ce4cb0915786.webp?v=1782206572"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abdd4d2f2b180a907624a176dc47a0b15a4f60c7_f689472d-6f86-46f8-bac7-ce4cb0915786.webp?v=1782206572","width":2000},{"alt":null,"id":27655898038371,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/facb975031be39d0135a46ca020f3a2e58b424c6_900c7624-4475-415e-88ce-b8ad5bdc2bce.webp?v=1782957715"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/facb975031be39d0135a46ca020f3a2e58b424c6_900c7624-4475-415e-88ce-b8ad5bdc2bce.webp?v=1782957715","width":2000},{"alt":null,"id":27655898398819,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abdd4d2f2b180a907624a176dc47a0b15a4f60c7_ec1983b0-61fc-4197-b7be-556ac4d1534f.webp?v=1782957715"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abdd4d2f2b180a907624a176dc47a0b15a4f60c7_ec1983b0-61fc-4197-b7be-556ac4d1534f.webp?v=1782957715","width":2000},{"alt":null,"id":27655899021411,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb1744b66192c913530685463344ba4937e3b5b8_7d35a97a-3745-4500-aff5-fc0d1b5cbb8d.webp?v=1782957718"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb1744b66192c913530685463344ba4937e3b5b8_7d35a97a-3745-4500-aff5-fc0d1b5cbb8d.webp?v=1782957718","width":2000},{"alt":null,"id":27656733917283,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/facb975031be39d0135a46ca020f3a2e58b424c6_ecb0d9f9-1610-4fd7-9ee9-d0fce4d88b67.webp?v=1782961359"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/facb975031be39d0135a46ca020f3a2e58b424c6_ecb0d9f9-1610-4fd7-9ee9-d0fce4d88b67.webp?v=1782961359","width":2000},{"alt":null,"id":27656733982819,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abdd4d2f2b180a907624a176dc47a0b15a4f60c7_80eb695a-72b6-4f86-96ca-676f3ed6d42f.webp?v=1782961360"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abdd4d2f2b180a907624a176dc47a0b15a4f60c7_80eb695a-72b6-4f86-96ca-676f3ed6d42f.webp?v=1782961360","width":2000},{"alt":null,"id":27656734081123,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb1744b66192c913530685463344ba4937e3b5b8_d73ac5fd-bf5d-44c3-bd61-79a88fc0ecea.webp?v=1782961361"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb1744b66192c913530685463344ba4937e3b5b8_d73ac5fd-bf5d-44c3-bd61-79a88fc0ecea.webp?v=1782961361","width":2000},{"alt":null,"id":27657201647715,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/facb975031be39d0135a46ca020f3a2e58b424c6_588d2cad-3d20-44e5-ba81-de95da46d8ee.webp?v=1782965749"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/facb975031be39d0135a46ca020f3a2e58b424c6_588d2cad-3d20-44e5-ba81-de95da46d8ee.webp?v=1782965749","width":2000},{"alt":null,"id":27657201746019,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abdd4d2f2b180a907624a176dc47a0b15a4f60c7_7b0e1271-3017-47a0-bdfa-7030e8b5a2d5.webp?v=1782965749"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abdd4d2f2b180a907624a176dc47a0b15a4f60c7_7b0e1271-3017-47a0-bdfa-7030e8b5a2d5.webp?v=1782965749","width":2000},{"alt":null,"id":27657202008163,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb1744b66192c913530685463344ba4937e3b5b8_e7ced54f-50c6-43d2-937b-3fdea038d448.webp?v=1782965750"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb1744b66192c913530685463344ba4937e3b5b8_e7ced54f-50c6-43d2-937b-3fdea038d448.webp?v=1782965750","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41214749376611,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"CCN012600G-PM19","requires_shipping":true,"taxable":true,"featured_image":{"id":36152328159331,"product_id":7159411507299,"position":11,"created_at":"2026-07-02T12:15:47+08:00","updated_at":"2026-07-02T12:15:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/facb975031be39d0135a46ca020f3a2e58b424c6_588d2cad-3d20-44e5-ba81-de95da46d8ee.webp?v=1782965749","variant_ids":[41214749376611]},"available":true,"name":"iPhone 14 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":"CCN012600G-PM19","featured_media":{"alt":null,"id":27657201647715,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/facb975031be39d0135a46ca020f3a2e58b424c6_588d2cad-3d20-44e5-ba81-de95da46d8ee.webp?v=1782965749"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41214749507683,"title":"Cyber Blue","option1":"Cyber Blue","option2":null,"option3":null,"sku":"CCN012600I-PM19","requires_shipping":true,"taxable":true,"featured_image":{"id":36152328519779,"product_id":7159411507299,"position":13,"created_at":"2026-07-02T12:15:48+08:00","updated_at":"2026-07-02T12:15:50+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb1744b66192c913530685463344ba4937e3b5b8_e7ced54f-50c6-43d2-937b-3fdea038d448.webp?v=1782965750","variant_ids":[41214749507683]},"available":true,"name":"iPhone 14 Clear NBA Logo-波士頓塞爾提克 Boston Celtics - Cyber Blue","public_title":"Cyber Blue","options":["Cyber Blue"],"price":128000,"weight":1180,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"CCN012600I-PM19","featured_media":{"alt":null,"id":27657202008163,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb1744b66192c913530685463344ba4937e3b5b8_e7ced54f-50c6-43d2-937b-3fdea038d448.webp?v=1782965750"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41214749573219,"title":"Fancy Pink","option1":"Fancy Pink","option2":null,"option3":null,"sku":"CCN012600J-PM19","requires_shipping":true,"taxable":true,"featured_image":{"id":36152328290403,"product_id":7159411507299,"position":12,"created_at":"2026-07-02T12:15:47+08:00","updated_at":"2026-07-02T12:15:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abdd4d2f2b180a907624a176dc47a0b15a4f60c7_7b0e1271-3017-47a0-bdfa-7030e8b5a2d5.webp?v=1782965749","variant_ids":[41214749573219]},"available":true,"name":"iPhone 14 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":"CCN012600J-PM19","featured_media":{"alt":null,"id":27657201746019,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abdd4d2f2b180a907624a176dc47a0b15a4f60c7_7b0e1271-3017-47a0-bdfa-7030e8b5a2d5.webp?v=1782965749"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41214749376611,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"CCN012600G-PM19","requires_shipping":true,"taxable":true,"featured_image":{"id":36152328159331,"product_id":7159411507299,"position":11,"created_at":"2026-07-02T12:15:47+08:00","updated_at":"2026-07-02T12:15:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/facb975031be39d0135a46ca020f3a2e58b424c6_588d2cad-3d20-44e5-ba81-de95da46d8ee.webp?v=1782965749","variant_ids":[41214749376611]},"available":true,"name":"iPhone 14 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":"CCN012600G-PM19","featured_media":{"alt":null,"id":27657201647715,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/facb975031be39d0135a46ca020f3a2e58b424c6_588d2cad-3d20-44e5-ba81-de95da46d8ee.webp?v=1782965749"}},"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: "停產" }