$product = {"id":7920538517603,"title":"iPhone 14 Clear 咒術迴戰 澀谷事變戰鬥系列-五條悟","handle":"iphone-14-jellytint-ptt12","description":null,"published_at":"2025-11-10T16:34:44+08:00","created_at":"2025-11-10T15:04:53+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-jujutsu-kaisen","device-iPhone 14","merge","reseller-jujutsu-kaisen"],"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":43828893745251,"title":"Fancy Pink","option1":"Fancy Pink","option2":null,"option3":null,"sku":"CCN012600J-PTT12","requires_shipping":true,"taxable":true,"featured_image":{"id":36124917334115,"product_id":7920538517603,"position":12,"created_at":"2026-06-29T15:29:51+08:00","updated_at":"2026-06-29T15:29:53+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39a6e598802bbeaf23a394a2bcb15b44e89351bc_d80ceaab-649b-4071-a263-ca0f4d8213b1.webp?v=1782718193","variant_ids":[43828893745251]},"available":true,"name":"iPhone 14 Clear 咒術迴戰 澀谷事變戰鬥系列-五條悟 - Fancy Pink","public_title":"Fancy Pink","options":["Fancy Pink"],"price":128000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"CCN012600J-PTT12","featured_media":{"alt":null,"id":27630160281699,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39a6e598802bbeaf23a394a2bcb15b44e89351bc_d80ceaab-649b-4071-a263-ca0f4d8213b1.webp?v=1782718193"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43828894990435,"title":"Cyber Blue","option1":"Cyber Blue","option2":null,"option3":null,"sku":"CCN012600I-PTT12","requires_shipping":true,"taxable":true,"featured_image":{"id":36124917399651,"product_id":7920538517603,"position":13,"created_at":"2026-06-29T15:29:52+08:00","updated_at":"2026-06-29T15:29:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a295f8ff2b80578d8cd136dd1d95aef67dfeae08_5675d5a5-c06b-4405-a3c1-81b2c747dee1.webp?v=1782718194","variant_ids":[43828894990435]},"available":true,"name":"iPhone 14 Clear 咒術迴戰 澀谷事變戰鬥系列-五條悟 - Cyber Blue","public_title":"Cyber Blue","options":["Cyber Blue"],"price":128000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"CCN012600I-PTT12","featured_media":{"alt":null,"id":27630160347235,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a295f8ff2b80578d8cd136dd1d95aef67dfeae08_5675d5a5-c06b-4405-a3c1-81b2c747dee1.webp?v=1782718194"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43828895023203,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"CCN012600G-PTT12","requires_shipping":true,"taxable":true,"featured_image":{"id":36124917071971,"product_id":7920538517603,"position":11,"created_at":"2026-06-29T15:29:50+08:00","updated_at":"2026-06-29T15:29:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d84779e0d05612ecd9eb9b3c3b39340ee34ecdf8_1a8ef0e8-872e-40b6-acf5-5d4949846e0f.webp?v=1782718192","variant_ids":[43828895023203]},"available":true,"name":"iPhone 14 Clear 咒術迴戰 澀谷事變戰鬥系列-五條悟 - 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":"CCN012600G-PTT12","featured_media":{"alt":null,"id":27630160019555,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d84779e0d05612ecd9eb9b3c3b39340ee34ecdf8_1a8ef0e8-872e-40b6-acf5-5d4949846e0f.webp?v=1782718192"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/994d64ac4cc1f5b12d3b428049a661ede55b6284.webp?v=1762758300","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39a6e598802bbeaf23a394a2bcb15b44e89351bc.webp?v=1762758301","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a295f8ff2b80578d8cd136dd1d95aef67dfeae08.webp?v=1762758301","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d84779e0d05612ecd9eb9b3c3b39340ee34ecdf8.webp?v=1762758302","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a295f8ff2b80578d8cd136dd1d95aef67dfeae08_90551d68-63e9-45ce-b06d-492c6e8492b7.webp?v=1782265505","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39a6e598802bbeaf23a394a2bcb15b44e89351bc_79534e6b-694a-4c2c-b603-446d856c3a52.webp?v=1782265506","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d84779e0d05612ecd9eb9b3c3b39340ee34ecdf8_ec219ee2-6646-4b71-b40f-1ba4a9951fd0.webp?v=1782265507","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a295f8ff2b80578d8cd136dd1d95aef67dfeae08_b41ada11-727e-4fd2-8b08-41ff19f2e264.webp?v=1782291435","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39a6e598802bbeaf23a394a2bcb15b44e89351bc_222fdd8b-3d5e-4221-b98d-0fb97b074a77.webp?v=1782291436","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d84779e0d05612ecd9eb9b3c3b39340ee34ecdf8_9ce5dc7f-0bfa-47f7-b945-e2b95c24dd23.webp?v=1782291437","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d84779e0d05612ecd9eb9b3c3b39340ee34ecdf8_1a8ef0e8-872e-40b6-acf5-5d4949846e0f.webp?v=1782718192","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39a6e598802bbeaf23a394a2bcb15b44e89351bc_d80ceaab-649b-4071-a263-ca0f4d8213b1.webp?v=1782718193","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a295f8ff2b80578d8cd136dd1d95aef67dfeae08_5675d5a5-c06b-4405-a3c1-81b2c747dee1.webp?v=1782718194"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/994d64ac4cc1f5b12d3b428049a661ede55b6284.webp?v=1762758300","options":["color"],"media":[{"alt":null,"id":26347799969891,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/994d64ac4cc1f5b12d3b428049a661ede55b6284.webp?v=1762758300"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/994d64ac4cc1f5b12d3b428049a661ede55b6284.webp?v=1762758300","width":2000},{"alt":null,"id":26347800166499,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39a6e598802bbeaf23a394a2bcb15b44e89351bc.webp?v=1762758301"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39a6e598802bbeaf23a394a2bcb15b44e89351bc.webp?v=1762758301","width":2000},{"alt":null,"id":26347800395875,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a295f8ff2b80578d8cd136dd1d95aef67dfeae08.webp?v=1762758301"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a295f8ff2b80578d8cd136dd1d95aef67dfeae08.webp?v=1762758301","width":2000},{"alt":null,"id":26347800592483,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d84779e0d05612ecd9eb9b3c3b39340ee34ecdf8.webp?v=1762758302"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d84779e0d05612ecd9eb9b3c3b39340ee34ecdf8.webp?v=1762758302","width":2000},{"alt":null,"id":27587133603939,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a295f8ff2b80578d8cd136dd1d95aef67dfeae08_90551d68-63e9-45ce-b06d-492c6e8492b7.webp?v=1782265505"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a295f8ff2b80578d8cd136dd1d95aef67dfeae08_90551d68-63e9-45ce-b06d-492c6e8492b7.webp?v=1782265505","width":2000},{"alt":null,"id":27587134357603,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39a6e598802bbeaf23a394a2bcb15b44e89351bc_79534e6b-694a-4c2c-b603-446d856c3a52.webp?v=1782265506"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39a6e598802bbeaf23a394a2bcb15b44e89351bc_79534e6b-694a-4c2c-b603-446d856c3a52.webp?v=1782265506","width":2000},{"alt":null,"id":27587134881891,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d84779e0d05612ecd9eb9b3c3b39340ee34ecdf8_ec219ee2-6646-4b71-b40f-1ba4a9951fd0.webp?v=1782265507"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d84779e0d05612ecd9eb9b3c3b39340ee34ecdf8_ec219ee2-6646-4b71-b40f-1ba4a9951fd0.webp?v=1782265507","width":2000},{"alt":null,"id":27594622566499,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a295f8ff2b80578d8cd136dd1d95aef67dfeae08_b41ada11-727e-4fd2-8b08-41ff19f2e264.webp?v=1782291435"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a295f8ff2b80578d8cd136dd1d95aef67dfeae08_b41ada11-727e-4fd2-8b08-41ff19f2e264.webp?v=1782291435","width":2000},{"alt":null,"id":27594623156323,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39a6e598802bbeaf23a394a2bcb15b44e89351bc_222fdd8b-3d5e-4221-b98d-0fb97b074a77.webp?v=1782291436"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39a6e598802bbeaf23a394a2bcb15b44e89351bc_222fdd8b-3d5e-4221-b98d-0fb97b074a77.webp?v=1782291436","width":2000},{"alt":null,"id":27594623484003,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d84779e0d05612ecd9eb9b3c3b39340ee34ecdf8_9ce5dc7f-0bfa-47f7-b945-e2b95c24dd23.webp?v=1782291437"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d84779e0d05612ecd9eb9b3c3b39340ee34ecdf8_9ce5dc7f-0bfa-47f7-b945-e2b95c24dd23.webp?v=1782291437","width":2000},{"alt":null,"id":27630160019555,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d84779e0d05612ecd9eb9b3c3b39340ee34ecdf8_1a8ef0e8-872e-40b6-acf5-5d4949846e0f.webp?v=1782718192"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d84779e0d05612ecd9eb9b3c3b39340ee34ecdf8_1a8ef0e8-872e-40b6-acf5-5d4949846e0f.webp?v=1782718192","width":2000},{"alt":null,"id":27630160281699,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39a6e598802bbeaf23a394a2bcb15b44e89351bc_d80ceaab-649b-4071-a263-ca0f4d8213b1.webp?v=1782718193"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39a6e598802bbeaf23a394a2bcb15b44e89351bc_d80ceaab-649b-4071-a263-ca0f4d8213b1.webp?v=1782718193","width":2000},{"alt":null,"id":27630160347235,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a295f8ff2b80578d8cd136dd1d95aef67dfeae08_5675d5a5-c06b-4405-a3c1-81b2c747dee1.webp?v=1782718194"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a295f8ff2b80578d8cd136dd1d95aef67dfeae08_5675d5a5-c06b-4405-a3c1-81b2c747dee1.webp?v=1782718194","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":43828893745251,"title":"Fancy Pink","option1":"Fancy Pink","option2":null,"option3":null,"sku":"CCN012600J-PTT12","requires_shipping":true,"taxable":true,"featured_image":{"id":36124917334115,"product_id":7920538517603,"position":12,"created_at":"2026-06-29T15:29:51+08:00","updated_at":"2026-06-29T15:29:53+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39a6e598802bbeaf23a394a2bcb15b44e89351bc_d80ceaab-649b-4071-a263-ca0f4d8213b1.webp?v=1782718193","variant_ids":[43828893745251]},"available":true,"name":"iPhone 14 Clear 咒術迴戰 澀谷事變戰鬥系列-五條悟 - Fancy Pink","public_title":"Fancy Pink","options":["Fancy Pink"],"price":128000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"CCN012600J-PTT12","featured_media":{"alt":null,"id":27630160281699,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39a6e598802bbeaf23a394a2bcb15b44e89351bc_d80ceaab-649b-4071-a263-ca0f4d8213b1.webp?v=1782718193"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43828894990435,"title":"Cyber Blue","option1":"Cyber Blue","option2":null,"option3":null,"sku":"CCN012600I-PTT12","requires_shipping":true,"taxable":true,"featured_image":{"id":36124917399651,"product_id":7920538517603,"position":13,"created_at":"2026-06-29T15:29:52+08:00","updated_at":"2026-06-29T15:29:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a295f8ff2b80578d8cd136dd1d95aef67dfeae08_5675d5a5-c06b-4405-a3c1-81b2c747dee1.webp?v=1782718194","variant_ids":[43828894990435]},"available":true,"name":"iPhone 14 Clear 咒術迴戰 澀谷事變戰鬥系列-五條悟 - Cyber Blue","public_title":"Cyber Blue","options":["Cyber Blue"],"price":128000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"CCN012600I-PTT12","featured_media":{"alt":null,"id":27630160347235,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a295f8ff2b80578d8cd136dd1d95aef67dfeae08_5675d5a5-c06b-4405-a3c1-81b2c747dee1.webp?v=1782718194"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43828895023203,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"CCN012600G-PTT12","requires_shipping":true,"taxable":true,"featured_image":{"id":36124917071971,"product_id":7920538517603,"position":11,"created_at":"2026-06-29T15:29:50+08:00","updated_at":"2026-06-29T15:29:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d84779e0d05612ecd9eb9b3c3b39340ee34ecdf8_1a8ef0e8-872e-40b6-acf5-5d4949846e0f.webp?v=1782718192","variant_ids":[43828895023203]},"available":true,"name":"iPhone 14 Clear 咒術迴戰 澀谷事變戰鬥系列-五條悟 - 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":"CCN012600G-PTT12","featured_media":{"alt":null,"id":27630160019555,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d84779e0d05612ecd9eb9b3c3b39340ee34ecdf8_1a8ef0e8-872e-40b6-acf5-5d4949846e0f.webp?v=1782718192"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43828893745251,"title":"Fancy Pink","option1":"Fancy Pink","option2":null,"option3":null,"sku":"CCN012600J-PTT12","requires_shipping":true,"taxable":true,"featured_image":{"id":36124917334115,"product_id":7920538517603,"position":12,"created_at":"2026-06-29T15:29:51+08:00","updated_at":"2026-06-29T15:29:53+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39a6e598802bbeaf23a394a2bcb15b44e89351bc_d80ceaab-649b-4071-a263-ca0f4d8213b1.webp?v=1782718193","variant_ids":[43828893745251]},"available":true,"name":"iPhone 14 Clear 咒術迴戰 澀谷事變戰鬥系列-五條悟 - Fancy Pink","public_title":"Fancy Pink","options":["Fancy Pink"],"price":128000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"CCN012600J-PTT12","featured_media":{"alt":null,"id":27630160281699,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39a6e598802bbeaf23a394a2bcb15b44e89351bc_d80ceaab-649b-4071-a263-ca0f4d8213b1.webp?v=1782718193"}},"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: "停產" }