$product = {"id":7937979056227,"title":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) 進擊的巨人 Attack on Titan 全員集結","handle":"iphone-12-pro-mod-nx-magsafe-xw08","description":null,"published_at":"2025-12-12T10:20:53+08:00","created_at":"2025-12-11T16:34:04+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":43884634734691,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"MPB01185C1-XW08","requires_shipping":true,"taxable":true,"featured_image":{"id":34933351284835,"product_id":7937979056227,"position":1,"created_at":"2025-12-11T16:34:08+08:00","updated_at":"2025-12-11T16:34:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2462db341f3caa9ee1a0718d960b7f3ac6299759.webp?v=1765442050","variant_ids":[43884634734691]},"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-XW08","featured_media":{"alt":null,"id":26495721898083,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2462db341f3caa9ee1a0718d960b7f3ac6299759.webp?v=1765442050"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43884637880419,"title":"White","option1":"White","option2":null,"option3":null,"sku":"MPB0118504-XW08","requires_shipping":true,"taxable":true,"featured_image":{"id":34933352661091,"product_id":7937979056227,"position":11,"created_at":"2025-12-11T16:34:15+08:00","updated_at":"2025-12-11T16:34:17+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f12ae2461a491330cb71375d2ee17d41965ff96a.webp?v=1765442057","variant_ids":[43884637880419]},"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-XW08","featured_media":{"alt":null,"id":26495723307107,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f12ae2461a491330cb71375d2ee17d41965ff96a.webp?v=1765442057"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43884637913187,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MPB01185J5-XW08","requires_shipping":true,"taxable":true,"featured_image":{"id":34933351415907,"product_id":7937979056227,"position":2,"created_at":"2025-12-11T16:34:09+08:00","updated_at":"2025-12-11T16:34:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0503ecd33d8fd23e0dcdff80eab3fdb24dfa253.webp?v=1765442051","variant_ids":[43884637913187]},"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-XW08","featured_media":{"alt":null,"id":26495722029155,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0503ecd33d8fd23e0dcdff80eab3fdb24dfa253.webp?v=1765442051"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43884637945955,"title":"Graphite","option1":"Graphite","option2":null,"option3":null,"sku":"MPB0118569-XW08","requires_shipping":true,"taxable":true,"featured_image":{"id":34933352235107,"product_id":7937979056227,"position":8,"created_at":"2025-12-11T16:34:12+08:00","updated_at":"2025-12-11T16:34:14+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e88e1c088207a96d29a99d30916416973d1c8d83.webp?v=1765442054","variant_ids":[43884637945955]},"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-XW08","featured_media":{"alt":null,"id":26495722848355,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e88e1c088207a96d29a99d30916416973d1c8d83.webp?v=1765442054"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43884638077027,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118524-XW08","requires_shipping":true,"taxable":true,"featured_image":{"id":34933352038499,"product_id":7937979056227,"position":6,"created_at":"2025-12-11T16:34:11+08:00","updated_at":"2025-12-11T16:34:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/70afbc33057b0624b9808f15b7fdfcabafb25f8f.webp?v=1765442052","variant_ids":[43884638077027]},"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-XW08","featured_media":{"alt":null,"id":26495722651747,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/70afbc33057b0624b9808f15b7fdfcabafb25f8f.webp?v=1765442052"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2462db341f3caa9ee1a0718d960b7f3ac6299759.webp?v=1765442050","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0503ecd33d8fd23e0dcdff80eab3fdb24dfa253.webp?v=1765442051","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/64af3af9dff8f03d88300320124909889b9ffc0a.webp?v=1765442051","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d946cce963c87e6d3f51b8d83e929103ad474d9.webp?v=1765442052","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1d1e729b6157e26bdb2c42b8c722c7165297bda.webp?v=1765442052","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/70afbc33057b0624b9808f15b7fdfcabafb25f8f.webp?v=1765442052","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/450237abe4f1cab9832f9832cf2e8bfaf9a72eca.webp?v=1765442053","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e88e1c088207a96d29a99d30916416973d1c8d83.webp?v=1765442054","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/463fa56dcb020d85743b0acef9aef4b9be79d973.webp?v=1765442054","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc0968dd0e9be5cc6464feaccd4db83d81f7f5a6.webp?v=1765442055","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f12ae2461a491330cb71375d2ee17d41965ff96a.webp?v=1765442057"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2462db341f3caa9ee1a0718d960b7f3ac6299759.webp?v=1765442050","options":["color"],"media":[{"alt":null,"id":26495721898083,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2462db341f3caa9ee1a0718d960b7f3ac6299759.webp?v=1765442050"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2462db341f3caa9ee1a0718d960b7f3ac6299759.webp?v=1765442050","width":2000},{"alt":null,"id":26495722029155,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0503ecd33d8fd23e0dcdff80eab3fdb24dfa253.webp?v=1765442051"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0503ecd33d8fd23e0dcdff80eab3fdb24dfa253.webp?v=1765442051","width":2000},{"alt":null,"id":26495722160227,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/64af3af9dff8f03d88300320124909889b9ffc0a.webp?v=1765442051"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/64af3af9dff8f03d88300320124909889b9ffc0a.webp?v=1765442051","width":2000},{"alt":null,"id":26495722389603,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d946cce963c87e6d3f51b8d83e929103ad474d9.webp?v=1765442052"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d946cce963c87e6d3f51b8d83e929103ad474d9.webp?v=1765442052","width":2000},{"alt":null,"id":26495722520675,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1d1e729b6157e26bdb2c42b8c722c7165297bda.webp?v=1765442052"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1d1e729b6157e26bdb2c42b8c722c7165297bda.webp?v=1765442052","width":2000},{"alt":null,"id":26495722651747,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/70afbc33057b0624b9808f15b7fdfcabafb25f8f.webp?v=1765442052"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/70afbc33057b0624b9808f15b7fdfcabafb25f8f.webp?v=1765442052","width":2000},{"alt":null,"id":26495722782819,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/450237abe4f1cab9832f9832cf2e8bfaf9a72eca.webp?v=1765442053"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/450237abe4f1cab9832f9832cf2e8bfaf9a72eca.webp?v=1765442053","width":2000},{"alt":null,"id":26495722848355,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e88e1c088207a96d29a99d30916416973d1c8d83.webp?v=1765442054"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e88e1c088207a96d29a99d30916416973d1c8d83.webp?v=1765442054","width":2000},{"alt":null,"id":26495722979427,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/463fa56dcb020d85743b0acef9aef4b9be79d973.webp?v=1765442054"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/463fa56dcb020d85743b0acef9aef4b9be79d973.webp?v=1765442054","width":2000},{"alt":null,"id":26495723176035,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc0968dd0e9be5cc6464feaccd4db83d81f7f5a6.webp?v=1765442055"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc0968dd0e9be5cc6464feaccd4db83d81f7f5a6.webp?v=1765442055","width":2000},{"alt":null,"id":26495723307107,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f12ae2461a491330cb71375d2ee17d41965ff96a.webp?v=1765442057"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f12ae2461a491330cb71375d2ee17d41965ff96a.webp?v=1765442057","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":43884634734691,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"MPB01185C1-XW08","requires_shipping":true,"taxable":true,"featured_image":{"id":34933351284835,"product_id":7937979056227,"position":1,"created_at":"2025-12-11T16:34:08+08:00","updated_at":"2025-12-11T16:34:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2462db341f3caa9ee1a0718d960b7f3ac6299759.webp?v=1765442050","variant_ids":[43884634734691]},"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-XW08","featured_media":{"alt":null,"id":26495721898083,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2462db341f3caa9ee1a0718d960b7f3ac6299759.webp?v=1765442050"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43884637880419,"title":"White","option1":"White","option2":null,"option3":null,"sku":"MPB0118504-XW08","requires_shipping":true,"taxable":true,"featured_image":{"id":34933352661091,"product_id":7937979056227,"position":11,"created_at":"2025-12-11T16:34:15+08:00","updated_at":"2025-12-11T16:34:17+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f12ae2461a491330cb71375d2ee17d41965ff96a.webp?v=1765442057","variant_ids":[43884637880419]},"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-XW08","featured_media":{"alt":null,"id":26495723307107,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f12ae2461a491330cb71375d2ee17d41965ff96a.webp?v=1765442057"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43884637913187,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MPB01185J5-XW08","requires_shipping":true,"taxable":true,"featured_image":{"id":34933351415907,"product_id":7937979056227,"position":2,"created_at":"2025-12-11T16:34:09+08:00","updated_at":"2025-12-11T16:34:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0503ecd33d8fd23e0dcdff80eab3fdb24dfa253.webp?v=1765442051","variant_ids":[43884637913187]},"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-XW08","featured_media":{"alt":null,"id":26495722029155,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0503ecd33d8fd23e0dcdff80eab3fdb24dfa253.webp?v=1765442051"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43884637945955,"title":"Graphite","option1":"Graphite","option2":null,"option3":null,"sku":"MPB0118569-XW08","requires_shipping":true,"taxable":true,"featured_image":{"id":34933352235107,"product_id":7937979056227,"position":8,"created_at":"2025-12-11T16:34:12+08:00","updated_at":"2025-12-11T16:34:14+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e88e1c088207a96d29a99d30916416973d1c8d83.webp?v=1765442054","variant_ids":[43884637945955]},"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-XW08","featured_media":{"alt":null,"id":26495722848355,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e88e1c088207a96d29a99d30916416973d1c8d83.webp?v=1765442054"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43884638077027,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118524-XW08","requires_shipping":true,"taxable":true,"featured_image":{"id":34933352038499,"product_id":7937979056227,"position":6,"created_at":"2025-12-11T16:34:11+08:00","updated_at":"2025-12-11T16:34:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/70afbc33057b0624b9808f15b7fdfcabafb25f8f.webp?v=1765442052","variant_ids":[43884638077027]},"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-XW08","featured_media":{"alt":null,"id":26495722651747,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/70afbc33057b0624b9808f15b7fdfcabafb25f8f.webp?v=1765442052"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43884634734691,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"MPB01185C1-XW08","requires_shipping":true,"taxable":true,"featured_image":{"id":34933351284835,"product_id":7937979056227,"position":1,"created_at":"2025-12-11T16:34:08+08:00","updated_at":"2025-12-11T16:34:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2462db341f3caa9ee1a0718d960b7f3ac6299759.webp?v=1765442050","variant_ids":[43884634734691]},"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-XW08","featured_media":{"alt":null,"id":26495721898083,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2462db341f3caa9ee1a0718d960b7f3ac6299759.webp?v=1765442050"}},"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: "停產" }