$product = {"id":7920553230435,"title":"iPhone 15 Pro Max Clear 咒術迴戰 澀谷事變戰鬥系列-虎杖悠仁","handle":"iphone-15-pro-max-jellytint-ptt11","description":null,"published_at":"2025-11-10T16:32:24+08:00","created_at":"2025-11-10T15:08:37+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-jujutsu-kaisen","device-iPhone 15 Pro Max","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":43828950138979,"title":"Fancy Pink","option1":"Fancy Pink","option2":null,"option3":null,"sku":"CCN012980J-PTT11","requires_shipping":true,"taxable":true,"featured_image":{"id":36125181247587,"product_id":7920553230435,"position":11,"created_at":"2026-06-29T15:44:25+08:00","updated_at":"2026-06-29T15:44:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a870557596ccc7708f7f9af7ce1874eabf920fa_33fbe12c-d5eb-4e4e-99c2-f2bf638ae283.webp?v=1782719067","variant_ids":[43828950138979]},"available":true,"name":"iPhone 15 Pro Max 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":"CCN012980J-PTT11","featured_media":{"alt":null,"id":27630424031331,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a870557596ccc7708f7f9af7ce1874eabf920fa_33fbe12c-d5eb-4e4e-99c2-f2bf638ae283.webp?v=1782719067"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43828953710691,"title":"Cyber Blue","option1":"Cyber Blue","option2":null,"option3":null,"sku":"CCN012980I-PTT11","requires_shipping":true,"taxable":true,"featured_image":{"id":36125181476963,"product_id":7920553230435,"position":12,"created_at":"2026-06-29T15:44:26+08:00","updated_at":"2026-06-29T15:44:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/153a0338224b188ddb25d20d1a2e5a52ccea04b5_62d91f7c-5010-4c0f-9a51-d939339b4d13.webp?v=1782719068","variant_ids":[43828953710691]},"available":true,"name":"iPhone 15 Pro Max 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":"CCN012980I-PTT11","featured_media":{"alt":null,"id":27630424260707,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/153a0338224b188ddb25d20d1a2e5a52ccea04b5_62d91f7c-5010-4c0f-9a51-d939339b4d13.webp?v=1782719068"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43828953743459,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"CCN012980G-PTT11","requires_shipping":true,"taxable":true,"featured_image":{"id":36125181935715,"product_id":7920553230435,"position":13,"created_at":"2026-06-29T15:44:26+08:00","updated_at":"2026-06-29T15:44:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1302fee72762c31c1c541af0b71116d294e8c2ac_fd1f40cd-32ce-4b08-9ed9-c89e9c37eee9.webp?v=1782719069","variant_ids":[43828953743459]},"available":true,"name":"iPhone 15 Pro Max 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":"CCN012980G-PTT11","featured_media":{"alt":null,"id":27630424719459,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1302fee72762c31c1c541af0b71116d294e8c2ac_fd1f40cd-32ce-4b08-9ed9-c89e9c37eee9.webp?v=1782719069"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1302fee72762c31c1c541af0b71116d294e8c2ac.webp?v=1762758523","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/434a3de989da2d6691bf156eeef50bbc9a796a2b.webp?v=1762758524","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a870557596ccc7708f7f9af7ce1874eabf920fa.webp?v=1762758525","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/153a0338224b188ddb25d20d1a2e5a52ccea04b5.webp?v=1762758525","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/153a0338224b188ddb25d20d1a2e5a52ccea04b5_127f6458-6a14-497a-92a5-35fd044bd11d.webp?v=1782266240","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a870557596ccc7708f7f9af7ce1874eabf920fa_de311c31-9dc6-4c43-a889-cb9de282b380.webp?v=1782266240","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1302fee72762c31c1c541af0b71116d294e8c2ac_56ecc273-cbd0-4cf9-ba09-363c3493d6c0.webp?v=1782266241","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/153a0338224b188ddb25d20d1a2e5a52ccea04b5_cfb71824-76a9-45b7-8b98-c039d15c6817.webp?v=1782291783","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a870557596ccc7708f7f9af7ce1874eabf920fa_c68fe0d7-747a-4972-8d65-0b066b254b12.webp?v=1782291784","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1302fee72762c31c1c541af0b71116d294e8c2ac_01dd4866-02c7-49bb-84cf-b0fb2ad0136c.webp?v=1782291784","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a870557596ccc7708f7f9af7ce1874eabf920fa_33fbe12c-d5eb-4e4e-99c2-f2bf638ae283.webp?v=1782719067","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/153a0338224b188ddb25d20d1a2e5a52ccea04b5_62d91f7c-5010-4c0f-9a51-d939339b4d13.webp?v=1782719068","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1302fee72762c31c1c541af0b71116d294e8c2ac_fd1f40cd-32ce-4b08-9ed9-c89e9c37eee9.webp?v=1782719069"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1302fee72762c31c1c541af0b71116d294e8c2ac.webp?v=1762758523","options":["color"],"media":[{"alt":null,"id":26347855806563,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1302fee72762c31c1c541af0b71116d294e8c2ac.webp?v=1762758523"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1302fee72762c31c1c541af0b71116d294e8c2ac.webp?v=1762758523","width":2000},{"alt":null,"id":26347856003171,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/434a3de989da2d6691bf156eeef50bbc9a796a2b.webp?v=1762758524"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/434a3de989da2d6691bf156eeef50bbc9a796a2b.webp?v=1762758524","width":2000},{"alt":null,"id":26347856167011,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a870557596ccc7708f7f9af7ce1874eabf920fa.webp?v=1762758525"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a870557596ccc7708f7f9af7ce1874eabf920fa.webp?v=1762758525","width":2000},{"alt":null,"id":26347856461923,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/153a0338224b188ddb25d20d1a2e5a52ccea04b5.webp?v=1762758525"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/153a0338224b188ddb25d20d1a2e5a52ccea04b5.webp?v=1762758525","width":2000},{"alt":null,"id":27587452305507,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/153a0338224b188ddb25d20d1a2e5a52ccea04b5_127f6458-6a14-497a-92a5-35fd044bd11d.webp?v=1782266240"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/153a0338224b188ddb25d20d1a2e5a52ccea04b5_127f6458-6a14-497a-92a5-35fd044bd11d.webp?v=1782266240","width":2000},{"alt":null,"id":27587452502115,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a870557596ccc7708f7f9af7ce1874eabf920fa_de311c31-9dc6-4c43-a889-cb9de282b380.webp?v=1782266240"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a870557596ccc7708f7f9af7ce1874eabf920fa_de311c31-9dc6-4c43-a889-cb9de282b380.webp?v=1782266240","width":2000},{"alt":null,"id":27587452928099,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1302fee72762c31c1c541af0b71116d294e8c2ac_56ecc273-cbd0-4cf9-ba09-363c3493d6c0.webp?v=1782266241"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1302fee72762c31c1c541af0b71116d294e8c2ac_56ecc273-cbd0-4cf9-ba09-363c3493d6c0.webp?v=1782266241","width":2000},{"alt":null,"id":27594729095267,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/153a0338224b188ddb25d20d1a2e5a52ccea04b5_cfb71824-76a9-45b7-8b98-c039d15c6817.webp?v=1782291783"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/153a0338224b188ddb25d20d1a2e5a52ccea04b5_cfb71824-76a9-45b7-8b98-c039d15c6817.webp?v=1782291783","width":2000},{"alt":null,"id":27594729455715,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a870557596ccc7708f7f9af7ce1874eabf920fa_c68fe0d7-747a-4972-8d65-0b066b254b12.webp?v=1782291784"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a870557596ccc7708f7f9af7ce1874eabf920fa_c68fe0d7-747a-4972-8d65-0b066b254b12.webp?v=1782291784","width":2000},{"alt":null,"id":27594730012771,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1302fee72762c31c1c541af0b71116d294e8c2ac_01dd4866-02c7-49bb-84cf-b0fb2ad0136c.webp?v=1782291784"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1302fee72762c31c1c541af0b71116d294e8c2ac_01dd4866-02c7-49bb-84cf-b0fb2ad0136c.webp?v=1782291784","width":2000},{"alt":null,"id":27630424031331,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a870557596ccc7708f7f9af7ce1874eabf920fa_33fbe12c-d5eb-4e4e-99c2-f2bf638ae283.webp?v=1782719067"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a870557596ccc7708f7f9af7ce1874eabf920fa_33fbe12c-d5eb-4e4e-99c2-f2bf638ae283.webp?v=1782719067","width":2000},{"alt":null,"id":27630424260707,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/153a0338224b188ddb25d20d1a2e5a52ccea04b5_62d91f7c-5010-4c0f-9a51-d939339b4d13.webp?v=1782719068"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/153a0338224b188ddb25d20d1a2e5a52ccea04b5_62d91f7c-5010-4c0f-9a51-d939339b4d13.webp?v=1782719068","width":2000},{"alt":null,"id":27630424719459,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1302fee72762c31c1c541af0b71116d294e8c2ac_fd1f40cd-32ce-4b08-9ed9-c89e9c37eee9.webp?v=1782719069"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1302fee72762c31c1c541af0b71116d294e8c2ac_fd1f40cd-32ce-4b08-9ed9-c89e9c37eee9.webp?v=1782719069","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":43828950138979,"title":"Fancy Pink","option1":"Fancy Pink","option2":null,"option3":null,"sku":"CCN012980J-PTT11","requires_shipping":true,"taxable":true,"featured_image":{"id":36125181247587,"product_id":7920553230435,"position":11,"created_at":"2026-06-29T15:44:25+08:00","updated_at":"2026-06-29T15:44:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a870557596ccc7708f7f9af7ce1874eabf920fa_33fbe12c-d5eb-4e4e-99c2-f2bf638ae283.webp?v=1782719067","variant_ids":[43828950138979]},"available":true,"name":"iPhone 15 Pro Max 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":"CCN012980J-PTT11","featured_media":{"alt":null,"id":27630424031331,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a870557596ccc7708f7f9af7ce1874eabf920fa_33fbe12c-d5eb-4e4e-99c2-f2bf638ae283.webp?v=1782719067"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43828953710691,"title":"Cyber Blue","option1":"Cyber Blue","option2":null,"option3":null,"sku":"CCN012980I-PTT11","requires_shipping":true,"taxable":true,"featured_image":{"id":36125181476963,"product_id":7920553230435,"position":12,"created_at":"2026-06-29T15:44:26+08:00","updated_at":"2026-06-29T15:44:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/153a0338224b188ddb25d20d1a2e5a52ccea04b5_62d91f7c-5010-4c0f-9a51-d939339b4d13.webp?v=1782719068","variant_ids":[43828953710691]},"available":true,"name":"iPhone 15 Pro Max 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":"CCN012980I-PTT11","featured_media":{"alt":null,"id":27630424260707,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/153a0338224b188ddb25d20d1a2e5a52ccea04b5_62d91f7c-5010-4c0f-9a51-d939339b4d13.webp?v=1782719068"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43828953743459,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"CCN012980G-PTT11","requires_shipping":true,"taxable":true,"featured_image":{"id":36125181935715,"product_id":7920553230435,"position":13,"created_at":"2026-06-29T15:44:26+08:00","updated_at":"2026-06-29T15:44:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1302fee72762c31c1c541af0b71116d294e8c2ac_fd1f40cd-32ce-4b08-9ed9-c89e9c37eee9.webp?v=1782719069","variant_ids":[43828953743459]},"available":true,"name":"iPhone 15 Pro Max 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":"CCN012980G-PTT11","featured_media":{"alt":null,"id":27630424719459,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1302fee72762c31c1c541af0b71116d294e8c2ac_fd1f40cd-32ce-4b08-9ed9-c89e9c37eee9.webp?v=1782719069"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43828950138979,"title":"Fancy Pink","option1":"Fancy Pink","option2":null,"option3":null,"sku":"CCN012980J-PTT11","requires_shipping":true,"taxable":true,"featured_image":{"id":36125181247587,"product_id":7920553230435,"position":11,"created_at":"2026-06-29T15:44:25+08:00","updated_at":"2026-06-29T15:44:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a870557596ccc7708f7f9af7ce1874eabf920fa_33fbe12c-d5eb-4e4e-99c2-f2bf638ae283.webp?v=1782719067","variant_ids":[43828950138979]},"available":true,"name":"iPhone 15 Pro Max 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":"CCN012980J-PTT11","featured_media":{"alt":null,"id":27630424031331,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a870557596ccc7708f7f9af7ce1874eabf920fa_33fbe12c-d5eb-4e4e-99c2-f2bf638ae283.webp?v=1782719067"}},"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: "停產" }