$product = {"id":7920479535203,"title":"iPhone 17 Pro Max Clear (MagSafe 兼容 \u0026 相機按鈕) 咒術迴戰 澀谷事變咒式系列-咒術文字","handle":"iphone-17-pro-max-jellytint-magsafe-with-capture-button-ptt21","description":null,"published_at":"2025-11-10T16:41:29+08:00","created_at":"2025-11-10T14:53:46+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-jujutsu-kaisen","device-iPhone 17 Pro Max","merge","reseller-jujutsu-kaisen"],"price":148000,"price_min":148000,"price_max":148000,"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":43828728463459,"title":"Nocturne Blue","option1":"Nocturne Blue","option2":null,"option3":null,"sku":"MJB013534M-PTT21","requires_shipping":true,"taxable":true,"featured_image":{"id":36125601890403,"product_id":7920479535203,"position":12,"created_at":"2026-06-29T16:08:07+08:00","updated_at":"2026-06-29T16:08:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63d3dd3446f14033e01f8fce4d61ec3b389b236d_f04dc4c1-01f5-4ea1-ae83-3a96f0e45386.webp?v=1782720490","variant_ids":[43828728463459]},"available":true,"name":"iPhone 17 Pro Max Clear (MagSafe 兼容 \u0026 相機按鈕) 咒術迴戰 澀谷事變咒式系列-咒術文字 - Nocturne Blue","public_title":"Nocturne Blue","options":["Nocturne Blue"],"price":148000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MJB013534M-PTT21","featured_media":{"alt":null,"id":27630843887715,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63d3dd3446f14033e01f8fce4d61ec3b389b236d_f04dc4c1-01f5-4ea1-ae83-3a96f0e45386.webp?v=1782720490"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43828730364003,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"MJB013530G-PTT21","requires_shipping":true,"taxable":true,"featured_image":{"id":36125601661027,"product_id":7920479535203,"position":10,"created_at":"2026-06-29T16:08:06+08:00","updated_at":"2026-06-29T16:08:09+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aaa15a5a32cd2963e7f5e80fe7affe3a381e8d87_e07394ca-3ef8-41bc-b4eb-478ece46ed3c.webp?v=1782720489","variant_ids":[43828730364003]},"available":true,"name":"iPhone 17 Pro Max Clear (MagSafe 兼容 \u0026 相機按鈕) 咒術迴戰 澀谷事變咒式系列-咒術文字 - Ash Black","public_title":"Ash Black","options":["Ash Black"],"price":148000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MJB013530G-PTT21","featured_media":{"alt":null,"id":27630843658339,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aaa15a5a32cd2963e7f5e80fe7affe3a381e8d87_e07394ca-3ef8-41bc-b4eb-478ece46ed3c.webp?v=1782720489"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43828730396771,"title":"Gleam Rosé","option1":"Gleam Rosé","option2":null,"option3":null,"sku":"MJB013534L-PTT21","requires_shipping":true,"taxable":true,"featured_image":{"id":36125601824867,"product_id":7920479535203,"position":11,"created_at":"2026-06-29T16:08:07+08:00","updated_at":"2026-06-29T16:08:09+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d6a15a7554f078816d2ca114eb038b7bec9f791_56640b5a-5f60-4aa4-9bab-d4fbf3e16764.webp?v=1782720489","variant_ids":[43828730396771]},"available":true,"name":"iPhone 17 Pro Max Clear (MagSafe 兼容 \u0026 相機按鈕) 咒術迴戰 澀谷事變咒式系列-咒術文字 - Gleam Rosé","public_title":"Gleam Rosé","options":["Gleam Rosé"],"price":148000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MJB013534L-PTT21","featured_media":{"alt":null,"id":27630843789411,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d6a15a7554f078816d2ca114eb038b7bec9f791_56640b5a-5f60-4aa4-9bab-d4fbf3e16764.webp?v=1782720489"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d6a15a7554f078816d2ca114eb038b7bec9f791.webp?v=1762757633","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aaa15a5a32cd2963e7f5e80fe7affe3a381e8d87.webp?v=1762757633","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63d3dd3446f14033e01f8fce4d61ec3b389b236d.webp?v=1762757634","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aaa15a5a32cd2963e7f5e80fe7affe3a381e8d87_ae052933-b504-40df-a72d-17b4c1d239be.webp?v=1782267512","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63d3dd3446f14033e01f8fce4d61ec3b389b236d_4014865f-d081-4adb-965c-d9eb05015d91.webp?v=1782267513","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d6a15a7554f078816d2ca114eb038b7bec9f791_0c7bd0f1-0a88-4e79-8bdd-a9be10efd5b6.webp?v=1782267513","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aaa15a5a32cd2963e7f5e80fe7affe3a381e8d87_e62a93b4-a546-480b-990f-ee1a49981b11.webp?v=1782292345","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63d3dd3446f14033e01f8fce4d61ec3b389b236d_dd3ece79-cb62-47d9-bba5-02c8ad3ccdbb.webp?v=1782292347","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d6a15a7554f078816d2ca114eb038b7bec9f791_f14b6564-3721-4347-82c0-99c16e284f5b.webp?v=1782292348","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aaa15a5a32cd2963e7f5e80fe7affe3a381e8d87_e07394ca-3ef8-41bc-b4eb-478ece46ed3c.webp?v=1782720489","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d6a15a7554f078816d2ca114eb038b7bec9f791_56640b5a-5f60-4aa4-9bab-d4fbf3e16764.webp?v=1782720489","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63d3dd3446f14033e01f8fce4d61ec3b389b236d_f04dc4c1-01f5-4ea1-ae83-3a96f0e45386.webp?v=1782720490"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d6a15a7554f078816d2ca114eb038b7bec9f791.webp?v=1762757633","options":["color"],"media":[{"alt":null,"id":26347650187363,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d6a15a7554f078816d2ca114eb038b7bec9f791.webp?v=1762757633"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d6a15a7554f078816d2ca114eb038b7bec9f791.webp?v=1762757633","width":2000},{"alt":null,"id":26347650449507,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aaa15a5a32cd2963e7f5e80fe7affe3a381e8d87.webp?v=1762757633"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aaa15a5a32cd2963e7f5e80fe7affe3a381e8d87.webp?v=1762757633","width":2000},{"alt":null,"id":26347650711651,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63d3dd3446f14033e01f8fce4d61ec3b389b236d.webp?v=1762757634"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63d3dd3446f14033e01f8fce4d61ec3b389b236d.webp?v=1762757634","width":2000},{"alt":null,"id":27588004184163,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aaa15a5a32cd2963e7f5e80fe7affe3a381e8d87_ae052933-b504-40df-a72d-17b4c1d239be.webp?v=1782267512"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aaa15a5a32cd2963e7f5e80fe7affe3a381e8d87_ae052933-b504-40df-a72d-17b4c1d239be.webp?v=1782267512","width":2000},{"alt":null,"id":27588004315235,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63d3dd3446f14033e01f8fce4d61ec3b389b236d_4014865f-d081-4adb-965c-d9eb05015d91.webp?v=1782267513"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63d3dd3446f14033e01f8fce4d61ec3b389b236d_4014865f-d081-4adb-965c-d9eb05015d91.webp?v=1782267513","width":2000},{"alt":null,"id":27588004380771,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d6a15a7554f078816d2ca114eb038b7bec9f791_0c7bd0f1-0a88-4e79-8bdd-a9be10efd5b6.webp?v=1782267513"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d6a15a7554f078816d2ca114eb038b7bec9f791_0c7bd0f1-0a88-4e79-8bdd-a9be10efd5b6.webp?v=1782267513","width":2000},{"alt":null,"id":27594881171555,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aaa15a5a32cd2963e7f5e80fe7affe3a381e8d87_e62a93b4-a546-480b-990f-ee1a49981b11.webp?v=1782292345"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aaa15a5a32cd2963e7f5e80fe7affe3a381e8d87_e62a93b4-a546-480b-990f-ee1a49981b11.webp?v=1782292345","width":2000},{"alt":null,"id":27594881761379,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63d3dd3446f14033e01f8fce4d61ec3b389b236d_dd3ece79-cb62-47d9-bba5-02c8ad3ccdbb.webp?v=1782292347"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63d3dd3446f14033e01f8fce4d61ec3b389b236d_dd3ece79-cb62-47d9-bba5-02c8ad3ccdbb.webp?v=1782292347","width":2000},{"alt":null,"id":27594882252899,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d6a15a7554f078816d2ca114eb038b7bec9f791_f14b6564-3721-4347-82c0-99c16e284f5b.webp?v=1782292348"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d6a15a7554f078816d2ca114eb038b7bec9f791_f14b6564-3721-4347-82c0-99c16e284f5b.webp?v=1782292348","width":2000},{"alt":null,"id":27630843658339,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aaa15a5a32cd2963e7f5e80fe7affe3a381e8d87_e07394ca-3ef8-41bc-b4eb-478ece46ed3c.webp?v=1782720489"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aaa15a5a32cd2963e7f5e80fe7affe3a381e8d87_e07394ca-3ef8-41bc-b4eb-478ece46ed3c.webp?v=1782720489","width":2000},{"alt":null,"id":27630843789411,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d6a15a7554f078816d2ca114eb038b7bec9f791_56640b5a-5f60-4aa4-9bab-d4fbf3e16764.webp?v=1782720489"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d6a15a7554f078816d2ca114eb038b7bec9f791_56640b5a-5f60-4aa4-9bab-d4fbf3e16764.webp?v=1782720489","width":2000},{"alt":null,"id":27630843887715,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63d3dd3446f14033e01f8fce4d61ec3b389b236d_f04dc4c1-01f5-4ea1-ae83-3a96f0e45386.webp?v=1782720490"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63d3dd3446f14033e01f8fce4d61ec3b389b236d_f04dc4c1-01f5-4ea1-ae83-3a96f0e45386.webp?v=1782720490","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":43828728463459,"title":"Nocturne Blue","option1":"Nocturne Blue","option2":null,"option3":null,"sku":"MJB013534M-PTT21","requires_shipping":true,"taxable":true,"featured_image":{"id":36125601890403,"product_id":7920479535203,"position":12,"created_at":"2026-06-29T16:08:07+08:00","updated_at":"2026-06-29T16:08:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63d3dd3446f14033e01f8fce4d61ec3b389b236d_f04dc4c1-01f5-4ea1-ae83-3a96f0e45386.webp?v=1782720490","variant_ids":[43828728463459]},"available":true,"name":"iPhone 17 Pro Max Clear (MagSafe 兼容 \u0026 相機按鈕) 咒術迴戰 澀谷事變咒式系列-咒術文字 - Nocturne Blue","public_title":"Nocturne Blue","options":["Nocturne Blue"],"price":148000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MJB013534M-PTT21","featured_media":{"alt":null,"id":27630843887715,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63d3dd3446f14033e01f8fce4d61ec3b389b236d_f04dc4c1-01f5-4ea1-ae83-3a96f0e45386.webp?v=1782720490"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43828730364003,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"MJB013530G-PTT21","requires_shipping":true,"taxable":true,"featured_image":{"id":36125601661027,"product_id":7920479535203,"position":10,"created_at":"2026-06-29T16:08:06+08:00","updated_at":"2026-06-29T16:08:09+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aaa15a5a32cd2963e7f5e80fe7affe3a381e8d87_e07394ca-3ef8-41bc-b4eb-478ece46ed3c.webp?v=1782720489","variant_ids":[43828730364003]},"available":true,"name":"iPhone 17 Pro Max Clear (MagSafe 兼容 \u0026 相機按鈕) 咒術迴戰 澀谷事變咒式系列-咒術文字 - Ash Black","public_title":"Ash Black","options":["Ash Black"],"price":148000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MJB013530G-PTT21","featured_media":{"alt":null,"id":27630843658339,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aaa15a5a32cd2963e7f5e80fe7affe3a381e8d87_e07394ca-3ef8-41bc-b4eb-478ece46ed3c.webp?v=1782720489"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43828730396771,"title":"Gleam Rosé","option1":"Gleam Rosé","option2":null,"option3":null,"sku":"MJB013534L-PTT21","requires_shipping":true,"taxable":true,"featured_image":{"id":36125601824867,"product_id":7920479535203,"position":11,"created_at":"2026-06-29T16:08:07+08:00","updated_at":"2026-06-29T16:08:09+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d6a15a7554f078816d2ca114eb038b7bec9f791_56640b5a-5f60-4aa4-9bab-d4fbf3e16764.webp?v=1782720489","variant_ids":[43828730396771]},"available":true,"name":"iPhone 17 Pro Max Clear (MagSafe 兼容 \u0026 相機按鈕) 咒術迴戰 澀谷事變咒式系列-咒術文字 - Gleam Rosé","public_title":"Gleam Rosé","options":["Gleam Rosé"],"price":148000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MJB013534L-PTT21","featured_media":{"alt":null,"id":27630843789411,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d6a15a7554f078816d2ca114eb038b7bec9f791_56640b5a-5f60-4aa4-9bab-d4fbf3e16764.webp?v=1782720489"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43828728463459,"title":"Nocturne Blue","option1":"Nocturne Blue","option2":null,"option3":null,"sku":"MJB013534M-PTT21","requires_shipping":true,"taxable":true,"featured_image":{"id":36125601890403,"product_id":7920479535203,"position":12,"created_at":"2026-06-29T16:08:07+08:00","updated_at":"2026-06-29T16:08:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63d3dd3446f14033e01f8fce4d61ec3b389b236d_f04dc4c1-01f5-4ea1-ae83-3a96f0e45386.webp?v=1782720490","variant_ids":[43828728463459]},"available":true,"name":"iPhone 17 Pro Max Clear (MagSafe 兼容 \u0026 相機按鈕) 咒術迴戰 澀谷事變咒式系列-咒術文字 - Nocturne Blue","public_title":"Nocturne Blue","options":["Nocturne Blue"],"price":148000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MJB013534M-PTT21","featured_media":{"alt":null,"id":27630843887715,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63d3dd3446f14033e01f8fce4d61ec3b389b236d_f04dc4c1-01f5-4ea1-ae83-3a96f0e45386.webp?v=1782720490"}},"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: "停產" }