$product = {"id":7938085814371,"title":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) 進擊的巨人 Attack on Titan 地鳴","handle":"iphone-12-pro-mod-nx-magsafe-xw10","description":null,"published_at":"2025-12-12T09:58:13+08:00","created_at":"2025-12-11T17:00:33+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-attack-on-titan","device-iPhone 12 Pro","merge","reseller-attack-on-titan"],"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":43885046759523,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"MPB01185C1-XW10","requires_shipping":true,"taxable":true,"featured_image":{"id":34933783298147,"product_id":7938085814371,"position":6,"created_at":"2025-12-11T17:00:40+08:00","updated_at":"2025-12-11T17:00:42+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eefbd8fcdb512e609cfc0d39c2d5bb9ba74a987a.webp?v=1765443642","variant_ids":[43885046759523]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) 進擊的巨人 Attack on Titan 地鳴 - 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-XW10","featured_media":{"alt":null,"id":26496152469603,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eefbd8fcdb512e609cfc0d39c2d5bb9ba74a987a.webp?v=1765443642"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43885050134627,"title":"White","option1":"White","option2":null,"option3":null,"sku":"MPB0118504-XW10","requires_shipping":true,"taxable":true,"featured_image":{"id":34933782773859,"product_id":7938085814371,"position":3,"created_at":"2025-12-11T17:00:39+08:00","updated_at":"2025-12-11T17:00:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b33fb031e297be40063b64a8552421c9a1585136.webp?v=1765443641","variant_ids":[43885050134627]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) 進擊的巨人 Attack on Titan 地鳴 - 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-XW10","featured_media":{"alt":null,"id":26496151945315,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b33fb031e297be40063b64a8552421c9a1585136.webp?v=1765443641"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43885050167395,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MPB01185J5-XW10","requires_shipping":true,"taxable":true,"featured_image":{"id":34933784117347,"product_id":7938085814371,"position":9,"created_at":"2025-12-11T17:00:42+08:00","updated_at":"2025-12-11T17:00:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c633487223c390c6d686e814d23d315ee50a04f.webp?v=1765443644","variant_ids":[43885050167395]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) 進擊的巨人 Attack on Titan 地鳴 - 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-XW10","featured_media":{"alt":null,"id":26496153124963,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c633487223c390c6d686e814d23d315ee50a04f.webp?v=1765443644"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43885050200163,"title":"Graphite","option1":"Graphite","option2":null,"option3":null,"sku":"MPB0118569-XW10","requires_shipping":true,"taxable":true,"featured_image":{"id":34933782085731,"product_id":7938085814371,"position":1,"created_at":"2025-12-11T17:00:36+08:00","updated_at":"2025-12-11T17:00:38+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ceccc673beb49ab71aef95b25044702de3550ff.webp?v=1765443638","variant_ids":[43885050200163]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) 進擊的巨人 Attack on Titan 地鳴 - 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-XW10","featured_media":{"alt":null,"id":26496151289955,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ceccc673beb49ab71aef95b25044702de3550ff.webp?v=1765443638"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43885050331235,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118524-XW10","requires_shipping":true,"taxable":true,"featured_image":{"id":34933784510563,"product_id":7938085814371,"position":11,"created_at":"2025-12-11T17:00:43+08:00","updated_at":"2025-12-11T17:00:45+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96e979e30a71b1f62da3f6ca9090f77c672b8b33.webp?v=1765443645","variant_ids":[43885050331235]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) 進擊的巨人 Attack on Titan 地鳴 - 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-XW10","featured_media":{"alt":null,"id":26496153485411,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96e979e30a71b1f62da3f6ca9090f77c672b8b33.webp?v=1765443645"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ceccc673beb49ab71aef95b25044702de3550ff.webp?v=1765443638","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a24f30cc026f2e04827692696362fdca1ccdd9a.webp?v=1765443640","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b33fb031e297be40063b64a8552421c9a1585136.webp?v=1765443641","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc8c15d5f7754a9719c9148fca8755908702a32a.webp?v=1765443641","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f0d401fc5f16302f0c63d7d3fb44beac2897458.webp?v=1765443642","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eefbd8fcdb512e609cfc0d39c2d5bb9ba74a987a.webp?v=1765443642","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b349a4f6a250f94f9afdf1a6b7cbe7d88ed68623.webp?v=1765443643","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d1789157dc664cd0c31bbdb5e8f7192334e52d0.webp?v=1765443643","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c633487223c390c6d686e814d23d315ee50a04f.webp?v=1765443644","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69d529e22c452b24dab044de1feba0e0a4811dce.webp?v=1765443644","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96e979e30a71b1f62da3f6ca9090f77c672b8b33.webp?v=1765443645"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ceccc673beb49ab71aef95b25044702de3550ff.webp?v=1765443638","options":["color"],"media":[{"alt":null,"id":26496151289955,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ceccc673beb49ab71aef95b25044702de3550ff.webp?v=1765443638"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ceccc673beb49ab71aef95b25044702de3550ff.webp?v=1765443638","width":2000},{"alt":null,"id":26496151748707,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a24f30cc026f2e04827692696362fdca1ccdd9a.webp?v=1765443640"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a24f30cc026f2e04827692696362fdca1ccdd9a.webp?v=1765443640","width":2000},{"alt":null,"id":26496151945315,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b33fb031e297be40063b64a8552421c9a1585136.webp?v=1765443641"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b33fb031e297be40063b64a8552421c9a1585136.webp?v=1765443641","width":2000},{"alt":null,"id":26496152141923,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc8c15d5f7754a9719c9148fca8755908702a32a.webp?v=1765443641"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc8c15d5f7754a9719c9148fca8755908702a32a.webp?v=1765443641","width":2000},{"alt":null,"id":26496152272995,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f0d401fc5f16302f0c63d7d3fb44beac2897458.webp?v=1765443642"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f0d401fc5f16302f0c63d7d3fb44beac2897458.webp?v=1765443642","width":2000},{"alt":null,"id":26496152469603,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eefbd8fcdb512e609cfc0d39c2d5bb9ba74a987a.webp?v=1765443642"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eefbd8fcdb512e609cfc0d39c2d5bb9ba74a987a.webp?v=1765443642","width":2000},{"alt":null,"id":26496152666211,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b349a4f6a250f94f9afdf1a6b7cbe7d88ed68623.webp?v=1765443643"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b349a4f6a250f94f9afdf1a6b7cbe7d88ed68623.webp?v=1765443643","width":2000},{"alt":null,"id":26496152895587,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d1789157dc664cd0c31bbdb5e8f7192334e52d0.webp?v=1765443643"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d1789157dc664cd0c31bbdb5e8f7192334e52d0.webp?v=1765443643","width":2000},{"alt":null,"id":26496153124963,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c633487223c390c6d686e814d23d315ee50a04f.webp?v=1765443644"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c633487223c390c6d686e814d23d315ee50a04f.webp?v=1765443644","width":2000},{"alt":null,"id":26496153419875,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69d529e22c452b24dab044de1feba0e0a4811dce.webp?v=1765443644"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69d529e22c452b24dab044de1feba0e0a4811dce.webp?v=1765443644","width":2000},{"alt":null,"id":26496153485411,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96e979e30a71b1f62da3f6ca9090f77c672b8b33.webp?v=1765443645"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96e979e30a71b1f62da3f6ca9090f77c672b8b33.webp?v=1765443645","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":43885046759523,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"MPB01185C1-XW10","requires_shipping":true,"taxable":true,"featured_image":{"id":34933783298147,"product_id":7938085814371,"position":6,"created_at":"2025-12-11T17:00:40+08:00","updated_at":"2025-12-11T17:00:42+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eefbd8fcdb512e609cfc0d39c2d5bb9ba74a987a.webp?v=1765443642","variant_ids":[43885046759523]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) 進擊的巨人 Attack on Titan 地鳴 - 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-XW10","featured_media":{"alt":null,"id":26496152469603,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eefbd8fcdb512e609cfc0d39c2d5bb9ba74a987a.webp?v=1765443642"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43885050134627,"title":"White","option1":"White","option2":null,"option3":null,"sku":"MPB0118504-XW10","requires_shipping":true,"taxable":true,"featured_image":{"id":34933782773859,"product_id":7938085814371,"position":3,"created_at":"2025-12-11T17:00:39+08:00","updated_at":"2025-12-11T17:00:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b33fb031e297be40063b64a8552421c9a1585136.webp?v=1765443641","variant_ids":[43885050134627]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) 進擊的巨人 Attack on Titan 地鳴 - 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-XW10","featured_media":{"alt":null,"id":26496151945315,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b33fb031e297be40063b64a8552421c9a1585136.webp?v=1765443641"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43885050167395,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MPB01185J5-XW10","requires_shipping":true,"taxable":true,"featured_image":{"id":34933784117347,"product_id":7938085814371,"position":9,"created_at":"2025-12-11T17:00:42+08:00","updated_at":"2025-12-11T17:00:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c633487223c390c6d686e814d23d315ee50a04f.webp?v=1765443644","variant_ids":[43885050167395]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) 進擊的巨人 Attack on Titan 地鳴 - 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-XW10","featured_media":{"alt":null,"id":26496153124963,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c633487223c390c6d686e814d23d315ee50a04f.webp?v=1765443644"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43885050200163,"title":"Graphite","option1":"Graphite","option2":null,"option3":null,"sku":"MPB0118569-XW10","requires_shipping":true,"taxable":true,"featured_image":{"id":34933782085731,"product_id":7938085814371,"position":1,"created_at":"2025-12-11T17:00:36+08:00","updated_at":"2025-12-11T17:00:38+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ceccc673beb49ab71aef95b25044702de3550ff.webp?v=1765443638","variant_ids":[43885050200163]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) 進擊的巨人 Attack on Titan 地鳴 - 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-XW10","featured_media":{"alt":null,"id":26496151289955,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ceccc673beb49ab71aef95b25044702de3550ff.webp?v=1765443638"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43885050331235,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118524-XW10","requires_shipping":true,"taxable":true,"featured_image":{"id":34933784510563,"product_id":7938085814371,"position":11,"created_at":"2025-12-11T17:00:43+08:00","updated_at":"2025-12-11T17:00:45+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96e979e30a71b1f62da3f6ca9090f77c672b8b33.webp?v=1765443645","variant_ids":[43885050331235]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) 進擊的巨人 Attack on Titan 地鳴 - 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-XW10","featured_media":{"alt":null,"id":26496153485411,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96e979e30a71b1f62da3f6ca9090f77c672b8b33.webp?v=1765443645"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43885046759523,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"MPB01185C1-XW10","requires_shipping":true,"taxable":true,"featured_image":{"id":34933783298147,"product_id":7938085814371,"position":6,"created_at":"2025-12-11T17:00:40+08:00","updated_at":"2025-12-11T17:00:42+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eefbd8fcdb512e609cfc0d39c2d5bb9ba74a987a.webp?v=1765443642","variant_ids":[43885046759523]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) 進擊的巨人 Attack on Titan 地鳴 - 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-XW10","featured_media":{"alt":null,"id":26496152469603,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eefbd8fcdb512e609cfc0d39c2d5bb9ba74a987a.webp?v=1765443642"}},"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: "停產" }