$product = {"id":7921216815203,"title":"iPhone 14 Pro Mod NX (MagSafe 兼容) 懶散兔與啾先生 貓貓","handle":"iphone-14-pro-mod-nx-magsafe-ec82","description":null,"published_at":"2025-11-14T10:40:45+08:00","created_at":"2025-11-11T10:22:33+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-bylobster","device-iPhone 14 Pro","merge","reseller-bylobster"],"price":110000,"price_min":110000,"price_max":110000,"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":43831196811363,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MPB01262J5-EC82","requires_shipping":true,"taxable":true,"featured_image":{"id":36054666903651,"product_id":7921216815203,"position":13,"created_at":"2026-06-23T09:57:42+08:00","updated_at":"2026-06-23T09:57:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/109a7318a175bc706be862a9c2926f6303fea1ab_6ae9d10a-718f-406d-8f39-2dbc5ec5f8c6.webp?v=1782179864","variant_ids":[43831196811363]},"available":true,"name":"iPhone 14 Pro Mod NX (MagSafe 兼容) 懶散兔與啾先生 貓貓 - Navy Blue","public_title":"Navy Blue","options":["Navy Blue"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB01262J5-EC82","featured_media":{"alt":null,"id":27567517302883,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/109a7318a175bc706be862a9c2926f6303fea1ab_6ae9d10a-718f-406d-8f39-2dbc5ec5f8c6.webp?v=1782179864"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43831196975203,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0126224-EC82","requires_shipping":true,"taxable":true,"featured_image":{"id":36054667296867,"product_id":7921216815203,"position":14,"created_at":"2026-06-23T09:57:42+08:00","updated_at":"2026-06-23T09:57:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c49d162ce301fa6e1afbe8d1f6ed39f301b3d997_ad92db8d-46f5-426c-aec1-e8e379dd554b.webp?v=1782179864","variant_ids":[43831196975203]},"available":true,"name":"iPhone 14 Pro Mod NX (MagSafe 兼容) 懶散兔與啾先生 貓貓 - Black","public_title":"Black","options":["Black"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126224-EC82","featured_media":{"alt":null,"id":27567517696099,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c49d162ce301fa6e1afbe8d1f6ed39f301b3d997_ad92db8d-46f5-426c-aec1-e8e379dd554b.webp?v=1782179864"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43831197073507,"title":"White","option1":"White","option2":null,"option3":null,"sku":"MPB0126204-EC82","requires_shipping":true,"taxable":true,"featured_image":{"id":36054667460707,"product_id":7921216815203,"position":15,"created_at":"2026-06-23T09:57:43+08:00","updated_at":"2026-06-23T09:57:45+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6a3edea746619c0e1659ba190dc1a94e3f44c6d_55fd4f08-4fe4-4f85-943b-bd2ef4c2b057.webp?v=1782179865","variant_ids":[43831197073507]},"available":true,"name":"iPhone 14 Pro Mod NX (MagSafe 兼容) 懶散兔與啾先生 貓貓 - White","public_title":"White","options":["White"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126204-EC82","featured_media":{"alt":null,"id":27567517859939,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6a3edea746619c0e1659ba190dc1a94e3f44c6d_55fd4f08-4fe4-4f85-943b-bd2ef4c2b057.webp?v=1782179865"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e7627dfb736bf2b4e1530d9dd1957ec9a9544d4.webp?v=1762827756","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ed2df426cb87703e3c1624094a8d782723db440b.webp?v=1762827757","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/109a7318a175bc706be862a9c2926f6303fea1ab.webp?v=1762827758","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5417d83a9d466b2130486ff8e601b0e77f242e85.webp?v=1762827758","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5e28527861b286f0b3a6242aaa92af8b81db44c.webp?v=1762827759","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d4552a77afc2e7e03017c1699e0d252f7d6f44eb.webp?v=1762827760","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6a3edea746619c0e1659ba190dc1a94e3f44c6d.webp?v=1762827761","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c49d162ce301fa6e1afbe8d1f6ed39f301b3d997.webp?v=1762827762","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c29fc15ffeebac55bf9d3cb3b6b5797cde220174.webp?v=1762827763","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9ba7a62c1121c6fc7088b787b43deaf01b4c023.webp?v=1762827764","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0382db4ed9fb85dcfe4c4a2d43d5822ee4ad8474.webp?v=1762827764","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a65bdfef72027ed9268f64d0d9a6e584000b5145.webp?v=1762827765","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/109a7318a175bc706be862a9c2926f6303fea1ab_6ae9d10a-718f-406d-8f39-2dbc5ec5f8c6.webp?v=1782179864","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c49d162ce301fa6e1afbe8d1f6ed39f301b3d997_ad92db8d-46f5-426c-aec1-e8e379dd554b.webp?v=1782179864","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6a3edea746619c0e1659ba190dc1a94e3f44c6d_55fd4f08-4fe4-4f85-943b-bd2ef4c2b057.webp?v=1782179865"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e7627dfb736bf2b4e1530d9dd1957ec9a9544d4.webp?v=1762827756","options":["color"],"media":[{"alt":null,"id":26352084713571,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e7627dfb736bf2b4e1530d9dd1957ec9a9544d4.webp?v=1762827756"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e7627dfb736bf2b4e1530d9dd1957ec9a9544d4.webp?v=1762827756","width":2000},{"alt":null,"id":26352084942947,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ed2df426cb87703e3c1624094a8d782723db440b.webp?v=1762827757"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ed2df426cb87703e3c1624094a8d782723db440b.webp?v=1762827757","width":2000},{"alt":null,"id":26352085172323,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/109a7318a175bc706be862a9c2926f6303fea1ab.webp?v=1762827758"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/109a7318a175bc706be862a9c2926f6303fea1ab.webp?v=1762827758","width":2000},{"alt":null,"id":26352085598307,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5417d83a9d466b2130486ff8e601b0e77f242e85.webp?v=1762827758"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5417d83a9d466b2130486ff8e601b0e77f242e85.webp?v=1762827758","width":2000},{"alt":null,"id":26352085827683,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5e28527861b286f0b3a6242aaa92af8b81db44c.webp?v=1762827759"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5e28527861b286f0b3a6242aaa92af8b81db44c.webp?v=1762827759","width":2000},{"alt":null,"id":26352086351971,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d4552a77afc2e7e03017c1699e0d252f7d6f44eb.webp?v=1762827760"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d4552a77afc2e7e03017c1699e0d252f7d6f44eb.webp?v=1762827760","width":2000},{"alt":null,"id":26352086581347,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6a3edea746619c0e1659ba190dc1a94e3f44c6d.webp?v=1762827761"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6a3edea746619c0e1659ba190dc1a94e3f44c6d.webp?v=1762827761","width":2000},{"alt":null,"id":26352087171171,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c49d162ce301fa6e1afbe8d1f6ed39f301b3d997.webp?v=1762827762"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c49d162ce301fa6e1afbe8d1f6ed39f301b3d997.webp?v=1762827762","width":2000},{"alt":null,"id":26352087433315,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c29fc15ffeebac55bf9d3cb3b6b5797cde220174.webp?v=1762827763"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c29fc15ffeebac55bf9d3cb3b6b5797cde220174.webp?v=1762827763","width":2000},{"alt":null,"id":26352087760995,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9ba7a62c1121c6fc7088b787b43deaf01b4c023.webp?v=1762827764"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9ba7a62c1121c6fc7088b787b43deaf01b4c023.webp?v=1762827764","width":2000},{"alt":null,"id":26352088088675,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0382db4ed9fb85dcfe4c4a2d43d5822ee4ad8474.webp?v=1762827764"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0382db4ed9fb85dcfe4c4a2d43d5822ee4ad8474.webp?v=1762827764","width":2000},{"alt":null,"id":26352088744035,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a65bdfef72027ed9268f64d0d9a6e584000b5145.webp?v=1762827765"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a65bdfef72027ed9268f64d0d9a6e584000b5145.webp?v=1762827765","width":2000},{"alt":null,"id":27567517302883,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/109a7318a175bc706be862a9c2926f6303fea1ab_6ae9d10a-718f-406d-8f39-2dbc5ec5f8c6.webp?v=1782179864"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/109a7318a175bc706be862a9c2926f6303fea1ab_6ae9d10a-718f-406d-8f39-2dbc5ec5f8c6.webp?v=1782179864","width":2000},{"alt":null,"id":27567517696099,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c49d162ce301fa6e1afbe8d1f6ed39f301b3d997_ad92db8d-46f5-426c-aec1-e8e379dd554b.webp?v=1782179864"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c49d162ce301fa6e1afbe8d1f6ed39f301b3d997_ad92db8d-46f5-426c-aec1-e8e379dd554b.webp?v=1782179864","width":2000},{"alt":null,"id":27567517859939,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6a3edea746619c0e1659ba190dc1a94e3f44c6d_55fd4f08-4fe4-4f85-943b-bd2ef4c2b057.webp?v=1782179865"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6a3edea746619c0e1659ba190dc1a94e3f44c6d_55fd4f08-4fe4-4f85-943b-bd2ef4c2b057.webp?v=1782179865","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":43831196811363,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MPB01262J5-EC82","requires_shipping":true,"taxable":true,"featured_image":{"id":36054666903651,"product_id":7921216815203,"position":13,"created_at":"2026-06-23T09:57:42+08:00","updated_at":"2026-06-23T09:57:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/109a7318a175bc706be862a9c2926f6303fea1ab_6ae9d10a-718f-406d-8f39-2dbc5ec5f8c6.webp?v=1782179864","variant_ids":[43831196811363]},"available":true,"name":"iPhone 14 Pro Mod NX (MagSafe 兼容) 懶散兔與啾先生 貓貓 - Navy Blue","public_title":"Navy Blue","options":["Navy Blue"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB01262J5-EC82","featured_media":{"alt":null,"id":27567517302883,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/109a7318a175bc706be862a9c2926f6303fea1ab_6ae9d10a-718f-406d-8f39-2dbc5ec5f8c6.webp?v=1782179864"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43831196975203,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0126224-EC82","requires_shipping":true,"taxable":true,"featured_image":{"id":36054667296867,"product_id":7921216815203,"position":14,"created_at":"2026-06-23T09:57:42+08:00","updated_at":"2026-06-23T09:57:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c49d162ce301fa6e1afbe8d1f6ed39f301b3d997_ad92db8d-46f5-426c-aec1-e8e379dd554b.webp?v=1782179864","variant_ids":[43831196975203]},"available":true,"name":"iPhone 14 Pro Mod NX (MagSafe 兼容) 懶散兔與啾先生 貓貓 - Black","public_title":"Black","options":["Black"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126224-EC82","featured_media":{"alt":null,"id":27567517696099,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c49d162ce301fa6e1afbe8d1f6ed39f301b3d997_ad92db8d-46f5-426c-aec1-e8e379dd554b.webp?v=1782179864"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43831197073507,"title":"White","option1":"White","option2":null,"option3":null,"sku":"MPB0126204-EC82","requires_shipping":true,"taxable":true,"featured_image":{"id":36054667460707,"product_id":7921216815203,"position":15,"created_at":"2026-06-23T09:57:43+08:00","updated_at":"2026-06-23T09:57:45+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6a3edea746619c0e1659ba190dc1a94e3f44c6d_55fd4f08-4fe4-4f85-943b-bd2ef4c2b057.webp?v=1782179865","variant_ids":[43831197073507]},"available":true,"name":"iPhone 14 Pro Mod NX (MagSafe 兼容) 懶散兔與啾先生 貓貓 - White","public_title":"White","options":["White"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126204-EC82","featured_media":{"alt":null,"id":27567517859939,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6a3edea746619c0e1659ba190dc1a94e3f44c6d_55fd4f08-4fe4-4f85-943b-bd2ef4c2b057.webp?v=1782179865"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43831196811363,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MPB01262J5-EC82","requires_shipping":true,"taxable":true,"featured_image":{"id":36054666903651,"product_id":7921216815203,"position":13,"created_at":"2026-06-23T09:57:42+08:00","updated_at":"2026-06-23T09:57:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/109a7318a175bc706be862a9c2926f6303fea1ab_6ae9d10a-718f-406d-8f39-2dbc5ec5f8c6.webp?v=1782179864","variant_ids":[43831196811363]},"available":true,"name":"iPhone 14 Pro Mod NX (MagSafe 兼容) 懶散兔與啾先生 貓貓 - Navy Blue","public_title":"Navy Blue","options":["Navy Blue"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB01262J5-EC82","featured_media":{"alt":null,"id":27567517302883,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/109a7318a175bc706be862a9c2926f6303fea1ab_6ae9d10a-718f-406d-8f39-2dbc5ec5f8c6.webp?v=1782179864"}},"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: "停產" }