$product = {"id":7862813294691,"title":"iPhone 17 Clear (相機按鈕) NBA Logo-波士頓塞爾提克 Boston Celtics","handle":"iphone-17-jellytint-with-capture-button-pm19","description":null,"published_at":"2025-09-11T09:50:42+08:00","created_at":"2025-08-22T17:51:10+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-nba","device-iPhone 17","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":43607135715427,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"JTB013500G-PM19","requires_shipping":true,"taxable":true,"featured_image":{"id":36152510906467,"product_id":7862813294691,"position":13,"created_at":"2026-07-02T12:24:11+08:00","updated_at":"2026-07-02T12:24:13+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d56f33e84c4b6c744823f099b052b3093a919cd1_df66ec75-06f4-460e-81ca-d7b8af4c18f9.webp?v=1782966253","variant_ids":[43607135715427]},"available":true,"name":"iPhone 17 Clear (相機按鈕) NBA Logo-波士頓塞爾提克 Boston Celtics - Ash Black","public_title":"Ash Black","options":["Ash Black"],"price":128000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"JTB013500G-PM19","featured_media":{"alt":null,"id":27657384394851,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d56f33e84c4b6c744823f099b052b3093a919cd1_df66ec75-06f4-460e-81ca-d7b8af4c18f9.webp?v=1782966253"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43607136731235,"title":"Nocturne Blue","option1":"Nocturne Blue","option2":null,"option3":null,"sku":"JTB013504M-PM19","requires_shipping":true,"taxable":true,"featured_image":{"id":36152509497443,"product_id":7862813294691,"position":11,"created_at":"2026-07-02T12:24:09+08:00","updated_at":"2026-07-02T12:24:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ec8395d83fa2e51491b1ec1451ef8fcc45bd9a7_0120e051-4d1e-4fb4-a371-c61c0eeecd34.webp?v=1782966251","variant_ids":[43607136731235]},"available":true,"name":"iPhone 17 Clear (相機按鈕) NBA Logo-波士頓塞爾提克 Boston Celtics - Nocturne Blue","public_title":"Nocturne Blue","options":["Nocturne Blue"],"price":128000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"JTB013504M-PM19","featured_media":{"alt":null,"id":27657382985827,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ec8395d83fa2e51491b1ec1451ef8fcc45bd9a7_0120e051-4d1e-4fb4-a371-c61c0eeecd34.webp?v=1782966251"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43607136764003,"title":"Gleam Rosé","option1":"Gleam Rosé","option2":null,"option3":null,"sku":"JTB013504L-PM19","requires_shipping":true,"taxable":true,"featured_image":{"id":36152510218339,"product_id":7862813294691,"position":12,"created_at":"2026-07-02T12:24:10+08:00","updated_at":"2026-07-02T12:24:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57c504b679bfef8222cbf909882124420c443786_74081ba4-3d82-4666-afe0-39fc8c2bfe6c.webp?v=1782966252","variant_ids":[43607136764003]},"available":true,"name":"iPhone 17 Clear (相機按鈕) NBA Logo-波士頓塞爾提克 Boston Celtics - Gleam Rosé","public_title":"Gleam Rosé","options":["Gleam Rosé"],"price":128000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"JTB013504L-PM19","featured_media":{"alt":null,"id":27657383673955,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57c504b679bfef8222cbf909882124420c443786_74081ba4-3d82-4666-afe0-39fc8c2bfe6c.webp?v=1782966252"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/Clear-F5-350-PM19_c8bcac7f-5f36-44db-86e9-68e3c9fd2148.png?v=1755856273","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d56f33e84c4b6c744823f099b052b3093a919cd1.webp?v=1782212908","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ec8395d83fa2e51491b1ec1451ef8fcc45bd9a7.webp?v=1782212909","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57c504b679bfef8222cbf909882124420c443786.webp?v=1782212909","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ec8395d83fa2e51491b1ec1451ef8fcc45bd9a7_d75c99dc-1afa-4342-b77f-6717a84b63b3.webp?v=1782958572","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57c504b679bfef8222cbf909882124420c443786_be786c41-aa42-47a2-b1ff-027a91ef56a4.webp?v=1782958572","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d56f33e84c4b6c744823f099b052b3093a919cd1_ced4220e-0dbd-42f7-bc30-d90c603ce5fe.webp?v=1782958573","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ec8395d83fa2e51491b1ec1451ef8fcc45bd9a7_1d8a3a3e-f9df-467e-9058-ec748f14f32f.webp?v=1782961908","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57c504b679bfef8222cbf909882124420c443786_c23e2641-c56e-4164-8e95-94a6c7c03a7e.webp?v=1782961911","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d56f33e84c4b6c744823f099b052b3093a919cd1_a2eb40b4-3b3e-4730-ac42-7dfd10c3412b.webp?v=1782961916","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ec8395d83fa2e51491b1ec1451ef8fcc45bd9a7_0120e051-4d1e-4fb4-a371-c61c0eeecd34.webp?v=1782966251","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57c504b679bfef8222cbf909882124420c443786_74081ba4-3d82-4666-afe0-39fc8c2bfe6c.webp?v=1782966252","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d56f33e84c4b6c744823f099b052b3093a919cd1_df66ec75-06f4-460e-81ca-d7b8af4c18f9.webp?v=1782966253"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/Clear-F5-350-PM19_c8bcac7f-5f36-44db-86e9-68e3c9fd2148.png?v=1755856273","options":["color"],"media":[{"alt":null,"id":25940554055779,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/Clear-F5-350-PM19_c8bcac7f-5f36-44db-86e9-68e3c9fd2148.png?v=1755856273"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/Clear-F5-350-PM19_c8bcac7f-5f36-44db-86e9-68e3c9fd2148.png?v=1755856273","width":2000},{"alt":null,"id":27578285490275,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d56f33e84c4b6c744823f099b052b3093a919cd1.webp?v=1782212908"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d56f33e84c4b6c744823f099b052b3093a919cd1.webp?v=1782212908","width":2000},{"alt":null,"id":27578285817955,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ec8395d83fa2e51491b1ec1451ef8fcc45bd9a7.webp?v=1782212909"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ec8395d83fa2e51491b1ec1451ef8fcc45bd9a7.webp?v=1782212909","width":2000},{"alt":null,"id":27578286080099,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57c504b679bfef8222cbf909882124420c443786.webp?v=1782212909"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57c504b679bfef8222cbf909882124420c443786.webp?v=1782212909","width":2000},{"alt":null,"id":27656216379491,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ec8395d83fa2e51491b1ec1451ef8fcc45bd9a7_d75c99dc-1afa-4342-b77f-6717a84b63b3.webp?v=1782958572"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ec8395d83fa2e51491b1ec1451ef8fcc45bd9a7_d75c99dc-1afa-4342-b77f-6717a84b63b3.webp?v=1782958572","width":2000},{"alt":null,"id":27656216674403,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57c504b679bfef8222cbf909882124420c443786_be786c41-aa42-47a2-b1ff-027a91ef56a4.webp?v=1782958572"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57c504b679bfef8222cbf909882124420c443786_be786c41-aa42-47a2-b1ff-027a91ef56a4.webp?v=1782958572","width":2000},{"alt":null,"id":27656216838243,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d56f33e84c4b6c744823f099b052b3093a919cd1_ced4220e-0dbd-42f7-bc30-d90c603ce5fe.webp?v=1782958573"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d56f33e84c4b6c744823f099b052b3093a919cd1_ced4220e-0dbd-42f7-bc30-d90c603ce5fe.webp?v=1782958573","width":2000},{"alt":null,"id":27656886485091,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ec8395d83fa2e51491b1ec1451ef8fcc45bd9a7_1d8a3a3e-f9df-467e-9058-ec748f14f32f.webp?v=1782961908"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ec8395d83fa2e51491b1ec1451ef8fcc45bd9a7_1d8a3a3e-f9df-467e-9058-ec748f14f32f.webp?v=1782961908","width":2000},{"alt":null,"id":27656886681699,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57c504b679bfef8222cbf909882124420c443786_c23e2641-c56e-4164-8e95-94a6c7c03a7e.webp?v=1782961911"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57c504b679bfef8222cbf909882124420c443786_c23e2641-c56e-4164-8e95-94a6c7c03a7e.webp?v=1782961911","width":2000},{"alt":null,"id":27656887009379,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d56f33e84c4b6c744823f099b052b3093a919cd1_a2eb40b4-3b3e-4730-ac42-7dfd10c3412b.webp?v=1782961916"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d56f33e84c4b6c744823f099b052b3093a919cd1_a2eb40b4-3b3e-4730-ac42-7dfd10c3412b.webp?v=1782961916","width":2000},{"alt":null,"id":27657382985827,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ec8395d83fa2e51491b1ec1451ef8fcc45bd9a7_0120e051-4d1e-4fb4-a371-c61c0eeecd34.webp?v=1782966251"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ec8395d83fa2e51491b1ec1451ef8fcc45bd9a7_0120e051-4d1e-4fb4-a371-c61c0eeecd34.webp?v=1782966251","width":2000},{"alt":null,"id":27657383673955,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57c504b679bfef8222cbf909882124420c443786_74081ba4-3d82-4666-afe0-39fc8c2bfe6c.webp?v=1782966252"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57c504b679bfef8222cbf909882124420c443786_74081ba4-3d82-4666-afe0-39fc8c2bfe6c.webp?v=1782966252","width":2000},{"alt":null,"id":27657384394851,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d56f33e84c4b6c744823f099b052b3093a919cd1_df66ec75-06f4-460e-81ca-d7b8af4c18f9.webp?v=1782966253"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d56f33e84c4b6c744823f099b052b3093a919cd1_df66ec75-06f4-460e-81ca-d7b8af4c18f9.webp?v=1782966253","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":43607135715427,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"JTB013500G-PM19","requires_shipping":true,"taxable":true,"featured_image":{"id":36152510906467,"product_id":7862813294691,"position":13,"created_at":"2026-07-02T12:24:11+08:00","updated_at":"2026-07-02T12:24:13+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d56f33e84c4b6c744823f099b052b3093a919cd1_df66ec75-06f4-460e-81ca-d7b8af4c18f9.webp?v=1782966253","variant_ids":[43607135715427]},"available":true,"name":"iPhone 17 Clear (相機按鈕) NBA Logo-波士頓塞爾提克 Boston Celtics - Ash Black","public_title":"Ash Black","options":["Ash Black"],"price":128000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"JTB013500G-PM19","featured_media":{"alt":null,"id":27657384394851,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d56f33e84c4b6c744823f099b052b3093a919cd1_df66ec75-06f4-460e-81ca-d7b8af4c18f9.webp?v=1782966253"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43607136731235,"title":"Nocturne Blue","option1":"Nocturne Blue","option2":null,"option3":null,"sku":"JTB013504M-PM19","requires_shipping":true,"taxable":true,"featured_image":{"id":36152509497443,"product_id":7862813294691,"position":11,"created_at":"2026-07-02T12:24:09+08:00","updated_at":"2026-07-02T12:24:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ec8395d83fa2e51491b1ec1451ef8fcc45bd9a7_0120e051-4d1e-4fb4-a371-c61c0eeecd34.webp?v=1782966251","variant_ids":[43607136731235]},"available":true,"name":"iPhone 17 Clear (相機按鈕) NBA Logo-波士頓塞爾提克 Boston Celtics - Nocturne Blue","public_title":"Nocturne Blue","options":["Nocturne Blue"],"price":128000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"JTB013504M-PM19","featured_media":{"alt":null,"id":27657382985827,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ec8395d83fa2e51491b1ec1451ef8fcc45bd9a7_0120e051-4d1e-4fb4-a371-c61c0eeecd34.webp?v=1782966251"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43607136764003,"title":"Gleam Rosé","option1":"Gleam Rosé","option2":null,"option3":null,"sku":"JTB013504L-PM19","requires_shipping":true,"taxable":true,"featured_image":{"id":36152510218339,"product_id":7862813294691,"position":12,"created_at":"2026-07-02T12:24:10+08:00","updated_at":"2026-07-02T12:24:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57c504b679bfef8222cbf909882124420c443786_74081ba4-3d82-4666-afe0-39fc8c2bfe6c.webp?v=1782966252","variant_ids":[43607136764003]},"available":true,"name":"iPhone 17 Clear (相機按鈕) NBA Logo-波士頓塞爾提克 Boston Celtics - Gleam Rosé","public_title":"Gleam Rosé","options":["Gleam Rosé"],"price":128000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"JTB013504L-PM19","featured_media":{"alt":null,"id":27657383673955,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57c504b679bfef8222cbf909882124420c443786_74081ba4-3d82-4666-afe0-39fc8c2bfe6c.webp?v=1782966252"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43607135715427,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"JTB013500G-PM19","requires_shipping":true,"taxable":true,"featured_image":{"id":36152510906467,"product_id":7862813294691,"position":13,"created_at":"2026-07-02T12:24:11+08:00","updated_at":"2026-07-02T12:24:13+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d56f33e84c4b6c744823f099b052b3093a919cd1_df66ec75-06f4-460e-81ca-d7b8af4c18f9.webp?v=1782966253","variant_ids":[43607135715427]},"available":true,"name":"iPhone 17 Clear (相機按鈕) NBA Logo-波士頓塞爾提克 Boston Celtics - Ash Black","public_title":"Ash Black","options":["Ash Black"],"price":128000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"JTB013500G-PM19","featured_media":{"alt":null,"id":27657384394851,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d56f33e84c4b6c744823f099b052b3093a919cd1_df66ec75-06f4-460e-81ca-d7b8af4c18f9.webp?v=1782966253"}},"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: "停產" }