$product = {"id":7893867266147,"title":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Chubbynida 烈焰海之舞","handle":"iphone-12-pro-mod-nx-magsafe-printable-chu06","description":null,"published_at":"2025-10-09T09:22:59+08:00","created_at":"2025-10-07T10:32:08+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-chubbynida","device-iPhone 12 Pro","merge","reseller-chubbynida"],"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":43763573129315,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"MPB01185C1-CHU06","requires_shipping":true,"taxable":true,"featured_image":{"id":34553307725923,"product_id":7893867266147,"position":10,"created_at":"2025-10-07T10:32:17+08:00","updated_at":"2025-10-07T10:32:19+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a9c93f4d7ea6c565a6cb51b5e7da221464e1b0ae.webp?v=1759804339","variant_ids":[43763573129315]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Chubbynida 烈焰海之舞 - Lavender","public_title":"Lavender","options":["Lavender"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB01185C1-CHU06","featured_media":{"alt":null,"id":26122955358307,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a9c93f4d7ea6c565a6cb51b5e7da221464e1b0ae.webp?v=1759804339"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43763575488611,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118524-CHU06","requires_shipping":true,"taxable":true,"featured_image":{"id":34553307496547,"product_id":7893867266147,"position":9,"created_at":"2025-10-07T10:32:16+08:00","updated_at":"2025-10-07T10:32:18+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84a6f806746bbdc0e3233da51dd515911c703011.webp?v=1759804338","variant_ids":[43763575488611]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Chubbynida 烈焰海之舞 - Black","public_title":"Black","options":["Black"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118524-CHU06","featured_media":{"alt":null,"id":26122955128931,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84a6f806746bbdc0e3233da51dd515911c703011.webp?v=1759804338"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43763575554147,"title":"White","option1":"White","option2":null,"option3":null,"sku":"MPB0118504-CHU06","requires_shipping":true,"taxable":true,"featured_image":{"id":34553305661539,"product_id":7893867266147,"position":2,"created_at":"2025-10-07T10:32:09+08:00","updated_at":"2025-10-07T10:32:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df627e97dd43befb0e56eabef60990802ee5c7c2.webp?v=1759804332","variant_ids":[43763575554147]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Chubbynida 烈焰海之舞 - White","public_title":"White","options":["White"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118504-CHU06","featured_media":{"alt":null,"id":26122953293923,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df627e97dd43befb0e56eabef60990802ee5c7c2.webp?v=1759804332"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43763575619683,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MPB01185J5-CHU06","requires_shipping":true,"taxable":true,"featured_image":{"id":34553307299939,"product_id":7893867266147,"position":8,"created_at":"2025-10-07T10:32:15+08:00","updated_at":"2025-10-07T10:32:17+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/12b2418a27c718862eb8ef8d62b00dea55f75363.webp?v=1759804337","variant_ids":[43763575619683]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Chubbynida 烈焰海之舞 - 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":"MPB01185J5-CHU06","featured_media":{"alt":null,"id":26122954932323,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/12b2418a27c718862eb8ef8d62b00dea55f75363.webp?v=1759804337"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43763575652451,"title":"Graphite","option1":"Graphite","option2":null,"option3":null,"sku":"MPB0118569-CHU06","requires_shipping":true,"taxable":true,"featured_image":{"id":34553306611811,"product_id":7893867266147,"position":6,"created_at":"2025-10-07T10:32:12+08:00","updated_at":"2025-10-07T10:32:14+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eee1147ee7918bd15ea6335af633c18de4b90708.webp?v=1759804334","variant_ids":[43763575652451]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Chubbynida 烈焰海之舞 - Graphite","public_title":"Graphite","options":["Graphite"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118569-CHU06","featured_media":{"alt":null,"id":26122954244195,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eee1147ee7918bd15ea6335af633c18de4b90708.webp?v=1759804334"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/773891632adadf70059045a98e5f5a2ab6e79dc3.webp?v=1759804331","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df627e97dd43befb0e56eabef60990802ee5c7c2.webp?v=1759804332","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8342db682cd5da5c085d9770b26e9b800aa9904f.webp?v=1759804332","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87d8f2989fe9d5412a71eaadb36629d01a12bcdd.webp?v=1759804333","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85696d6c410bc2e38f4c40e63024c087bfff1cb2.webp?v=1759804333","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eee1147ee7918bd15ea6335af633c18de4b90708.webp?v=1759804334","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1fb2a96d44f143a0561aaadf69996df90ef69618.webp?v=1759804337","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/12b2418a27c718862eb8ef8d62b00dea55f75363.webp?v=1759804337","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84a6f806746bbdc0e3233da51dd515911c703011.webp?v=1759804338","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a9c93f4d7ea6c565a6cb51b5e7da221464e1b0ae.webp?v=1759804339","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fce552dad04e0fcd49766d511249deac0179d0e7.webp?v=1759804339"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/773891632adadf70059045a98e5f5a2ab6e79dc3.webp?v=1759804331","options":["color"],"media":[{"alt":null,"id":26122953064547,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/773891632adadf70059045a98e5f5a2ab6e79dc3.webp?v=1759804331"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/773891632adadf70059045a98e5f5a2ab6e79dc3.webp?v=1759804331","width":2000},{"alt":null,"id":26122953293923,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df627e97dd43befb0e56eabef60990802ee5c7c2.webp?v=1759804332"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df627e97dd43befb0e56eabef60990802ee5c7c2.webp?v=1759804332","width":2000},{"alt":null,"id":26122953490531,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8342db682cd5da5c085d9770b26e9b800aa9904f.webp?v=1759804332"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8342db682cd5da5c085d9770b26e9b800aa9904f.webp?v=1759804332","width":2000},{"alt":null,"id":26122953719907,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87d8f2989fe9d5412a71eaadb36629d01a12bcdd.webp?v=1759804333"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87d8f2989fe9d5412a71eaadb36629d01a12bcdd.webp?v=1759804333","width":2000},{"alt":null,"id":26122954014819,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85696d6c410bc2e38f4c40e63024c087bfff1cb2.webp?v=1759804333"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85696d6c410bc2e38f4c40e63024c087bfff1cb2.webp?v=1759804333","width":2000},{"alt":null,"id":26122954244195,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eee1147ee7918bd15ea6335af633c18de4b90708.webp?v=1759804334"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eee1147ee7918bd15ea6335af633c18de4b90708.webp?v=1759804334","width":2000},{"alt":null,"id":26122954604643,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1fb2a96d44f143a0561aaadf69996df90ef69618.webp?v=1759804337"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1fb2a96d44f143a0561aaadf69996df90ef69618.webp?v=1759804337","width":2000},{"alt":null,"id":26122954932323,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/12b2418a27c718862eb8ef8d62b00dea55f75363.webp?v=1759804337"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/12b2418a27c718862eb8ef8d62b00dea55f75363.webp?v=1759804337","width":2000},{"alt":null,"id":26122955128931,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84a6f806746bbdc0e3233da51dd515911c703011.webp?v=1759804338"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84a6f806746bbdc0e3233da51dd515911c703011.webp?v=1759804338","width":2000},{"alt":null,"id":26122955358307,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a9c93f4d7ea6c565a6cb51b5e7da221464e1b0ae.webp?v=1759804339"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a9c93f4d7ea6c565a6cb51b5e7da221464e1b0ae.webp?v=1759804339","width":2000},{"alt":null,"id":26122955653219,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fce552dad04e0fcd49766d511249deac0179d0e7.webp?v=1759804339"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fce552dad04e0fcd49766d511249deac0179d0e7.webp?v=1759804339","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":43763573129315,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"MPB01185C1-CHU06","requires_shipping":true,"taxable":true,"featured_image":{"id":34553307725923,"product_id":7893867266147,"position":10,"created_at":"2025-10-07T10:32:17+08:00","updated_at":"2025-10-07T10:32:19+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a9c93f4d7ea6c565a6cb51b5e7da221464e1b0ae.webp?v=1759804339","variant_ids":[43763573129315]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Chubbynida 烈焰海之舞 - Lavender","public_title":"Lavender","options":["Lavender"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB01185C1-CHU06","featured_media":{"alt":null,"id":26122955358307,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a9c93f4d7ea6c565a6cb51b5e7da221464e1b0ae.webp?v=1759804339"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43763575488611,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118524-CHU06","requires_shipping":true,"taxable":true,"featured_image":{"id":34553307496547,"product_id":7893867266147,"position":9,"created_at":"2025-10-07T10:32:16+08:00","updated_at":"2025-10-07T10:32:18+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84a6f806746bbdc0e3233da51dd515911c703011.webp?v=1759804338","variant_ids":[43763575488611]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Chubbynida 烈焰海之舞 - Black","public_title":"Black","options":["Black"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118524-CHU06","featured_media":{"alt":null,"id":26122955128931,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84a6f806746bbdc0e3233da51dd515911c703011.webp?v=1759804338"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43763575554147,"title":"White","option1":"White","option2":null,"option3":null,"sku":"MPB0118504-CHU06","requires_shipping":true,"taxable":true,"featured_image":{"id":34553305661539,"product_id":7893867266147,"position":2,"created_at":"2025-10-07T10:32:09+08:00","updated_at":"2025-10-07T10:32:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df627e97dd43befb0e56eabef60990802ee5c7c2.webp?v=1759804332","variant_ids":[43763575554147]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Chubbynida 烈焰海之舞 - White","public_title":"White","options":["White"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118504-CHU06","featured_media":{"alt":null,"id":26122953293923,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df627e97dd43befb0e56eabef60990802ee5c7c2.webp?v=1759804332"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43763575619683,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MPB01185J5-CHU06","requires_shipping":true,"taxable":true,"featured_image":{"id":34553307299939,"product_id":7893867266147,"position":8,"created_at":"2025-10-07T10:32:15+08:00","updated_at":"2025-10-07T10:32:17+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/12b2418a27c718862eb8ef8d62b00dea55f75363.webp?v=1759804337","variant_ids":[43763575619683]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Chubbynida 烈焰海之舞 - 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":"MPB01185J5-CHU06","featured_media":{"alt":null,"id":26122954932323,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/12b2418a27c718862eb8ef8d62b00dea55f75363.webp?v=1759804337"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43763575652451,"title":"Graphite","option1":"Graphite","option2":null,"option3":null,"sku":"MPB0118569-CHU06","requires_shipping":true,"taxable":true,"featured_image":{"id":34553306611811,"product_id":7893867266147,"position":6,"created_at":"2025-10-07T10:32:12+08:00","updated_at":"2025-10-07T10:32:14+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eee1147ee7918bd15ea6335af633c18de4b90708.webp?v=1759804334","variant_ids":[43763575652451]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Chubbynida 烈焰海之舞 - Graphite","public_title":"Graphite","options":["Graphite"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118569-CHU06","featured_media":{"alt":null,"id":26122954244195,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eee1147ee7918bd15ea6335af633c18de4b90708.webp?v=1759804334"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43763573129315,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"MPB01185C1-CHU06","requires_shipping":true,"taxable":true,"featured_image":{"id":34553307725923,"product_id":7893867266147,"position":10,"created_at":"2025-10-07T10:32:17+08:00","updated_at":"2025-10-07T10:32:19+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a9c93f4d7ea6c565a6cb51b5e7da221464e1b0ae.webp?v=1759804339","variant_ids":[43763573129315]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Chubbynida 烈焰海之舞 - Lavender","public_title":"Lavender","options":["Lavender"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB01185C1-CHU06","featured_media":{"alt":null,"id":26122955358307,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a9c93f4d7ea6c565a6cb51b5e7da221464e1b0ae.webp?v=1759804339"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; $device_handle = null var sellingStatus if ($bumper) { $(document).ready(function() { var productImg = $product.images[0] var bumperVariants = $bumper.variants; var bumperColors = new Object(); var currentVariant = ''; var productType = ''; bumperVariants.forEach(variant => { bumperColors[`${variant.title.split(' (')[0].toLowerCase()}`] = variant.featured_image.src; }); if (productType === 'mod-nx-backplate' || productType === 'mod-backplate') { mergeImages( [productImg, bumperColors[currentVariant]], { crossOrigin: 'anonymous' } ).then(mergedImg => { $('.merged-img').attr('src', mergedImg); }); } else { mergeImages( [bumperColors[currentVariant], productImg], { crossOrigin: 'anonymous' } ).then(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: "停產" }