$product = {"id":7937937768547,"title":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) 進擊的巨人 Attack on Titan 城牆巨人","handle":"iphone-12-pro-mod-nx-magsafe-xu15","description":null,"published_at":"2025-12-12T10:28:43+08:00","created_at":"2025-12-11T16:02:23+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":43884475482211,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"MPB01185C1-XU15","requires_shipping":true,"taxable":true,"featured_image":{"id":34933160837219,"product_id":7937937768547,"position":2,"created_at":"2025-12-11T16:02:27+08:00","updated_at":"2025-12-11T16:02:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e2dfabbb3e8d48e99b055e5baf357013bbf4bf97.webp?v=1765440149","variant_ids":[43884475482211]},"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-XU15","featured_media":{"alt":null,"id":26495532564579,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e2dfabbb3e8d48e99b055e5baf357013bbf4bf97.webp?v=1765440149"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43884479447139,"title":"Graphite","option1":"Graphite","option2":null,"option3":null,"sku":"MPB0118569-XU15","requires_shipping":true,"taxable":true,"featured_image":{"id":34933161001059,"product_id":7937937768547,"position":3,"created_at":"2025-12-11T16:02:28+08:00","updated_at":"2025-12-11T16:02:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5377949ca24df9c13d3601abbc23e035c5253229.webp?v=1765440149","variant_ids":[43884479447139]},"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-XU15","featured_media":{"alt":null,"id":26495532728419,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5377949ca24df9c13d3601abbc23e035c5253229.webp?v=1765440149"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43884479610979,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118524-XU15","requires_shipping":true,"taxable":true,"featured_image":{"id":34933160575075,"product_id":7937937768547,"position":1,"created_at":"2025-12-11T16:02:27+08:00","updated_at":"2025-12-11T16:02:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec2f5cedf2b20a74f7ea513829f96424838b0b6b.webp?v=1765440148","variant_ids":[43884479610979]},"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-XU15","featured_media":{"alt":null,"id":26495532302435,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec2f5cedf2b20a74f7ea513829f96424838b0b6b.webp?v=1765440148"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43884479676515,"title":"White","option1":"White","option2":null,"option3":null,"sku":"MPB0118504-XU15","requires_shipping":true,"taxable":true,"featured_image":{"id":34933161427043,"product_id":7937937768547,"position":5,"created_at":"2025-12-11T16:02:29+08:00","updated_at":"2025-12-11T16:02:31+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59542fa04e318d12205af08a9e962339efc63d10.webp?v=1765440151","variant_ids":[43884479676515]},"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-XU15","featured_media":{"alt":null,"id":26495533154403,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59542fa04e318d12205af08a9e962339efc63d10.webp?v=1765440151"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43884479709283,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MPB01185J5-XU15","requires_shipping":true,"taxable":true,"featured_image":{"id":34933161164899,"product_id":7937937768547,"position":4,"created_at":"2025-12-11T16:02:28+08:00","updated_at":"2025-12-11T16:02:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c0cf3a97609ecb926b1521cae1434389d9c2c806.webp?v=1765440150","variant_ids":[43884479709283]},"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-XU15","featured_media":{"alt":null,"id":26495532892259,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c0cf3a97609ecb926b1521cae1434389d9c2c806.webp?v=1765440150"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec2f5cedf2b20a74f7ea513829f96424838b0b6b.webp?v=1765440148","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e2dfabbb3e8d48e99b055e5baf357013bbf4bf97.webp?v=1765440149","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5377949ca24df9c13d3601abbc23e035c5253229.webp?v=1765440149","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c0cf3a97609ecb926b1521cae1434389d9c2c806.webp?v=1765440150","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59542fa04e318d12205af08a9e962339efc63d10.webp?v=1765440151","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d9b3929eb0e73afcdce82221255cc24bcb0ba05.webp?v=1765440151","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c766b3612e92216f721054a424d57b0f2a66412.webp?v=1765440152","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aea0ed5d1bcd6f4e66ada7da086a0c57dcb27473.webp?v=1765440152","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7abb5be865834c4827fb087a423de53d199609f3.webp?v=1765440153","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fc5316dd01c48ebdf4b3dbf3f5fa673729edc28.webp?v=1765440153","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35241c01c12ec40e59727b51d9acb6e2dcf49c8c.webp?v=1765440154"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec2f5cedf2b20a74f7ea513829f96424838b0b6b.webp?v=1765440148","options":["color"],"media":[{"alt":null,"id":26495532302435,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec2f5cedf2b20a74f7ea513829f96424838b0b6b.webp?v=1765440148"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec2f5cedf2b20a74f7ea513829f96424838b0b6b.webp?v=1765440148","width":2000},{"alt":null,"id":26495532564579,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e2dfabbb3e8d48e99b055e5baf357013bbf4bf97.webp?v=1765440149"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e2dfabbb3e8d48e99b055e5baf357013bbf4bf97.webp?v=1765440149","width":2000},{"alt":null,"id":26495532728419,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5377949ca24df9c13d3601abbc23e035c5253229.webp?v=1765440149"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5377949ca24df9c13d3601abbc23e035c5253229.webp?v=1765440149","width":2000},{"alt":null,"id":26495532892259,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c0cf3a97609ecb926b1521cae1434389d9c2c806.webp?v=1765440150"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c0cf3a97609ecb926b1521cae1434389d9c2c806.webp?v=1765440150","width":2000},{"alt":null,"id":26495533154403,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59542fa04e318d12205af08a9e962339efc63d10.webp?v=1765440151"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59542fa04e318d12205af08a9e962339efc63d10.webp?v=1765440151","width":2000},{"alt":null,"id":26495533285475,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d9b3929eb0e73afcdce82221255cc24bcb0ba05.webp?v=1765440151"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d9b3929eb0e73afcdce82221255cc24bcb0ba05.webp?v=1765440151","width":2000},{"alt":null,"id":26495533416547,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c766b3612e92216f721054a424d57b0f2a66412.webp?v=1765440152"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c766b3612e92216f721054a424d57b0f2a66412.webp?v=1765440152","width":2000},{"alt":null,"id":26495533514851,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aea0ed5d1bcd6f4e66ada7da086a0c57dcb27473.webp?v=1765440152"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aea0ed5d1bcd6f4e66ada7da086a0c57dcb27473.webp?v=1765440152","width":2000},{"alt":null,"id":26495533580387,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7abb5be865834c4827fb087a423de53d199609f3.webp?v=1765440153"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7abb5be865834c4827fb087a423de53d199609f3.webp?v=1765440153","width":2000},{"alt":null,"id":26495533809763,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fc5316dd01c48ebdf4b3dbf3f5fa673729edc28.webp?v=1765440153"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fc5316dd01c48ebdf4b3dbf3f5fa673729edc28.webp?v=1765440153","width":2000},{"alt":null,"id":26495533940835,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35241c01c12ec40e59727b51d9acb6e2dcf49c8c.webp?v=1765440154"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35241c01c12ec40e59727b51d9acb6e2dcf49c8c.webp?v=1765440154","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":43884475482211,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"MPB01185C1-XU15","requires_shipping":true,"taxable":true,"featured_image":{"id":34933160837219,"product_id":7937937768547,"position":2,"created_at":"2025-12-11T16:02:27+08:00","updated_at":"2025-12-11T16:02:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e2dfabbb3e8d48e99b055e5baf357013bbf4bf97.webp?v=1765440149","variant_ids":[43884475482211]},"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-XU15","featured_media":{"alt":null,"id":26495532564579,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e2dfabbb3e8d48e99b055e5baf357013bbf4bf97.webp?v=1765440149"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43884479447139,"title":"Graphite","option1":"Graphite","option2":null,"option3":null,"sku":"MPB0118569-XU15","requires_shipping":true,"taxable":true,"featured_image":{"id":34933161001059,"product_id":7937937768547,"position":3,"created_at":"2025-12-11T16:02:28+08:00","updated_at":"2025-12-11T16:02:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5377949ca24df9c13d3601abbc23e035c5253229.webp?v=1765440149","variant_ids":[43884479447139]},"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-XU15","featured_media":{"alt":null,"id":26495532728419,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5377949ca24df9c13d3601abbc23e035c5253229.webp?v=1765440149"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43884479610979,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118524-XU15","requires_shipping":true,"taxable":true,"featured_image":{"id":34933160575075,"product_id":7937937768547,"position":1,"created_at":"2025-12-11T16:02:27+08:00","updated_at":"2025-12-11T16:02:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec2f5cedf2b20a74f7ea513829f96424838b0b6b.webp?v=1765440148","variant_ids":[43884479610979]},"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-XU15","featured_media":{"alt":null,"id":26495532302435,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec2f5cedf2b20a74f7ea513829f96424838b0b6b.webp?v=1765440148"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43884479676515,"title":"White","option1":"White","option2":null,"option3":null,"sku":"MPB0118504-XU15","requires_shipping":true,"taxable":true,"featured_image":{"id":34933161427043,"product_id":7937937768547,"position":5,"created_at":"2025-12-11T16:02:29+08:00","updated_at":"2025-12-11T16:02:31+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59542fa04e318d12205af08a9e962339efc63d10.webp?v=1765440151","variant_ids":[43884479676515]},"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-XU15","featured_media":{"alt":null,"id":26495533154403,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59542fa04e318d12205af08a9e962339efc63d10.webp?v=1765440151"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43884479709283,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MPB01185J5-XU15","requires_shipping":true,"taxable":true,"featured_image":{"id":34933161164899,"product_id":7937937768547,"position":4,"created_at":"2025-12-11T16:02:28+08:00","updated_at":"2025-12-11T16:02:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c0cf3a97609ecb926b1521cae1434389d9c2c806.webp?v=1765440150","variant_ids":[43884479709283]},"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-XU15","featured_media":{"alt":null,"id":26495532892259,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c0cf3a97609ecb926b1521cae1434389d9c2c806.webp?v=1765440150"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43884475482211,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"MPB01185C1-XU15","requires_shipping":true,"taxable":true,"featured_image":{"id":34933160837219,"product_id":7937937768547,"position":2,"created_at":"2025-12-11T16:02:27+08:00","updated_at":"2025-12-11T16:02:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e2dfabbb3e8d48e99b055e5baf357013bbf4bf97.webp?v=1765440149","variant_ids":[43884475482211]},"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-XU15","featured_media":{"alt":null,"id":26495532564579,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e2dfabbb3e8d48e99b055e5baf357013bbf4bf97.webp?v=1765440149"}},"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: "停產" }