$product = {"id":7987834323043,"title":"iPhone 12 mini SolidSuit (MagSafe 兼容) Pingu 企鵝家族 出發吧!","handle":"iphone-12-mini-solidsuit-classic-magsafe-yc08","description":null,"published_at":"2026-03-31T09:58:09+08:00","created_at":"2026-03-30T14:39:04+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-pingu","device-iPhone 12 Mini","merge","reseller-pingu"],"price":125000,"price_min":125000,"price_max":125000,"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":44089448005731,"title":"Parakeet Green","option1":"Parakeet Green","option2":null,"option3":null,"sku":"MST011840E-YC08","requires_shipping":true,"taxable":true,"featured_image":{"id":35562335862883,"product_id":7987834323043,"position":5,"created_at":"2026-03-30T14:39:10+08:00","updated_at":"2026-03-30T14:39:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c710b99a4d3e6ccbb11af386b0f41d0463040e0.webp?v=1774852751","variant_ids":[44089448005731]},"available":true,"name":"iPhone 12 mini SolidSuit (MagSafe 兼容) Pingu 企鵝家族 出發吧! - Parakeet Green","public_title":"Parakeet Green","options":["Parakeet Green"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST011840E-YC08","featured_media":{"alt":null,"id":27095897964643,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c710b99a4d3e6ccbb11af386b0f41d0463040e0.webp?v=1774852751"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44089448038499,"title":"Seaweed Green","option1":"Seaweed Green","option2":null,"option3":null,"sku":"MST01184Z8-YC08","requires_shipping":true,"taxable":true,"featured_image":{"id":35562335436899,"product_id":7987834323043,"position":3,"created_at":"2026-03-30T14:39:09+08:00","updated_at":"2026-03-30T14:39:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4020addde0f1a160ff91a13613bfdfcb0ba4b300.webp?v=1774852751","variant_ids":[44089448038499]},"available":true,"name":"iPhone 12 mini SolidSuit (MagSafe 兼容) Pingu 企鵝家族 出發吧! - Seaweed Green","public_title":"Seaweed Green","options":["Seaweed Green"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST01184Z8-YC08","featured_media":{"alt":null,"id":27095897571427,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4020addde0f1a160ff91a13613bfdfcb0ba4b300.webp?v=1774852751"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44089448071267,"title":"Tide Blue","option1":"Tide Blue","option2":null,"option3":null,"sku":"MST01184Z9-YC08","requires_shipping":true,"taxable":true,"featured_image":{"id":35562335633507,"product_id":7987834323043,"position":4,"created_at":"2026-03-30T14:39:09+08:00","updated_at":"2026-03-30T14:39:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c5846704b6138a172bb018edc0d07e16751257a.webp?v=1774852751","variant_ids":[44089448071267]},"available":true,"name":"iPhone 12 mini SolidSuit (MagSafe 兼容) Pingu 企鵝家族 出發吧! - Tide Blue","public_title":"Tide Blue","options":["Tide Blue"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST01184Z9-YC08","featured_media":{"alt":null,"id":27095897768035,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c5846704b6138a172bb018edc0d07e16751257a.webp?v=1774852751"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44089448104035,"title":"Bordeaux Red","option1":"Bordeaux Red","option2":null,"option3":null,"sku":"MST011840D-YC08","requires_shipping":true,"taxable":true,"featured_image":{"id":35562335993955,"product_id":7987834323043,"position":6,"created_at":"2026-03-30T14:39:10+08:00","updated_at":"2026-03-30T14:39:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22965146b0ba83468d161d6510f15fd4006dbdad.webp?v=1774852752","variant_ids":[44089448104035]},"available":true,"name":"iPhone 12 mini SolidSuit (MagSafe 兼容) Pingu 企鵝家族 出發吧! - Bordeaux Red","public_title":"Bordeaux Red","options":["Bordeaux Red"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST011840D-YC08","featured_media":{"alt":null,"id":27095898128483,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22965146b0ba83468d161d6510f15fd4006dbdad.webp?v=1774852752"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44089448136803,"title":"Ocean Blue","option1":"Ocean Blue","option2":null,"option3":null,"sku":"MST011840A-YC08","requires_shipping":true,"taxable":true,"featured_image":{"id":35562335273059,"product_id":7987834323043,"position":2,"created_at":"2026-03-30T14:39:08+08:00","updated_at":"2026-03-30T14:39:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb7d31689e4eb6b0a7241faadaee80d6f13855f9.webp?v=1774852750","variant_ids":[44089448136803]},"available":true,"name":"iPhone 12 mini SolidSuit (MagSafe 兼容) Pingu 企鵝家族 出發吧! - Ocean Blue","public_title":"Ocean Blue","options":["Ocean Blue"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST011840A-YC08","featured_media":{"alt":null,"id":27095897407587,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb7d31689e4eb6b0a7241faadaee80d6f13855f9.webp?v=1774852750"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44089448169571,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0118452-YC08","requires_shipping":true,"taxable":true,"featured_image":{"id":35562335109219,"product_id":7987834323043,"position":1,"created_at":"2026-03-30T14:39:07+08:00","updated_at":"2026-03-30T14:39:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a8ed3beb27e3fffc2b9ae3badab797aaa0ef2510.webp?v=1774852750","variant_ids":[44089448169571]},"available":true,"name":"iPhone 12 mini SolidSuit (MagSafe 兼容) Pingu 企鵝家族 出發吧! - Black","public_title":"Black","options":["Black"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0118452-YC08","featured_media":{"alt":null,"id":27095897243747,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a8ed3beb27e3fffc2b9ae3badab797aaa0ef2510.webp?v=1774852750"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a8ed3beb27e3fffc2b9ae3badab797aaa0ef2510.webp?v=1774852750","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb7d31689e4eb6b0a7241faadaee80d6f13855f9.webp?v=1774852750","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4020addde0f1a160ff91a13613bfdfcb0ba4b300.webp?v=1774852751","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c5846704b6138a172bb018edc0d07e16751257a.webp?v=1774852751","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c710b99a4d3e6ccbb11af386b0f41d0463040e0.webp?v=1774852751","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22965146b0ba83468d161d6510f15fd4006dbdad.webp?v=1774852752","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4cddbfd1d08f035d20f963477bd9a85d1ac07788.webp?v=1774852753"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a8ed3beb27e3fffc2b9ae3badab797aaa0ef2510.webp?v=1774852750","options":["color"],"media":[{"alt":null,"id":27095897243747,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a8ed3beb27e3fffc2b9ae3badab797aaa0ef2510.webp?v=1774852750"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a8ed3beb27e3fffc2b9ae3badab797aaa0ef2510.webp?v=1774852750","width":2000},{"alt":null,"id":27095897407587,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb7d31689e4eb6b0a7241faadaee80d6f13855f9.webp?v=1774852750"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb7d31689e4eb6b0a7241faadaee80d6f13855f9.webp?v=1774852750","width":2000},{"alt":null,"id":27095897571427,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4020addde0f1a160ff91a13613bfdfcb0ba4b300.webp?v=1774852751"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4020addde0f1a160ff91a13613bfdfcb0ba4b300.webp?v=1774852751","width":2000},{"alt":null,"id":27095897768035,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c5846704b6138a172bb018edc0d07e16751257a.webp?v=1774852751"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c5846704b6138a172bb018edc0d07e16751257a.webp?v=1774852751","width":2000},{"alt":null,"id":27095897964643,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c710b99a4d3e6ccbb11af386b0f41d0463040e0.webp?v=1774852751"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c710b99a4d3e6ccbb11af386b0f41d0463040e0.webp?v=1774852751","width":2000},{"alt":null,"id":27095898128483,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22965146b0ba83468d161d6510f15fd4006dbdad.webp?v=1774852752"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22965146b0ba83468d161d6510f15fd4006dbdad.webp?v=1774852752","width":2000},{"alt":null,"id":27095898226787,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4cddbfd1d08f035d20f963477bd9a85d1ac07788.webp?v=1774852753"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4cddbfd1d08f035d20f963477bd9a85d1ac07788.webp?v=1774852753","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":44089448005731,"title":"Parakeet Green","option1":"Parakeet Green","option2":null,"option3":null,"sku":"MST011840E-YC08","requires_shipping":true,"taxable":true,"featured_image":{"id":35562335862883,"product_id":7987834323043,"position":5,"created_at":"2026-03-30T14:39:10+08:00","updated_at":"2026-03-30T14:39:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c710b99a4d3e6ccbb11af386b0f41d0463040e0.webp?v=1774852751","variant_ids":[44089448005731]},"available":true,"name":"iPhone 12 mini SolidSuit (MagSafe 兼容) Pingu 企鵝家族 出發吧! - Parakeet Green","public_title":"Parakeet Green","options":["Parakeet Green"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST011840E-YC08","featured_media":{"alt":null,"id":27095897964643,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c710b99a4d3e6ccbb11af386b0f41d0463040e0.webp?v=1774852751"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44089448038499,"title":"Seaweed Green","option1":"Seaweed Green","option2":null,"option3":null,"sku":"MST01184Z8-YC08","requires_shipping":true,"taxable":true,"featured_image":{"id":35562335436899,"product_id":7987834323043,"position":3,"created_at":"2026-03-30T14:39:09+08:00","updated_at":"2026-03-30T14:39:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4020addde0f1a160ff91a13613bfdfcb0ba4b300.webp?v=1774852751","variant_ids":[44089448038499]},"available":true,"name":"iPhone 12 mini SolidSuit (MagSafe 兼容) Pingu 企鵝家族 出發吧! - Seaweed Green","public_title":"Seaweed Green","options":["Seaweed Green"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST01184Z8-YC08","featured_media":{"alt":null,"id":27095897571427,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4020addde0f1a160ff91a13613bfdfcb0ba4b300.webp?v=1774852751"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44089448071267,"title":"Tide Blue","option1":"Tide Blue","option2":null,"option3":null,"sku":"MST01184Z9-YC08","requires_shipping":true,"taxable":true,"featured_image":{"id":35562335633507,"product_id":7987834323043,"position":4,"created_at":"2026-03-30T14:39:09+08:00","updated_at":"2026-03-30T14:39:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c5846704b6138a172bb018edc0d07e16751257a.webp?v=1774852751","variant_ids":[44089448071267]},"available":true,"name":"iPhone 12 mini SolidSuit (MagSafe 兼容) Pingu 企鵝家族 出發吧! - Tide Blue","public_title":"Tide Blue","options":["Tide Blue"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST01184Z9-YC08","featured_media":{"alt":null,"id":27095897768035,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c5846704b6138a172bb018edc0d07e16751257a.webp?v=1774852751"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44089448104035,"title":"Bordeaux Red","option1":"Bordeaux Red","option2":null,"option3":null,"sku":"MST011840D-YC08","requires_shipping":true,"taxable":true,"featured_image":{"id":35562335993955,"product_id":7987834323043,"position":6,"created_at":"2026-03-30T14:39:10+08:00","updated_at":"2026-03-30T14:39:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22965146b0ba83468d161d6510f15fd4006dbdad.webp?v=1774852752","variant_ids":[44089448104035]},"available":true,"name":"iPhone 12 mini SolidSuit (MagSafe 兼容) Pingu 企鵝家族 出發吧! - Bordeaux Red","public_title":"Bordeaux Red","options":["Bordeaux Red"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST011840D-YC08","featured_media":{"alt":null,"id":27095898128483,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22965146b0ba83468d161d6510f15fd4006dbdad.webp?v=1774852752"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44089448136803,"title":"Ocean Blue","option1":"Ocean Blue","option2":null,"option3":null,"sku":"MST011840A-YC08","requires_shipping":true,"taxable":true,"featured_image":{"id":35562335273059,"product_id":7987834323043,"position":2,"created_at":"2026-03-30T14:39:08+08:00","updated_at":"2026-03-30T14:39:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb7d31689e4eb6b0a7241faadaee80d6f13855f9.webp?v=1774852750","variant_ids":[44089448136803]},"available":true,"name":"iPhone 12 mini SolidSuit (MagSafe 兼容) Pingu 企鵝家族 出發吧! - Ocean Blue","public_title":"Ocean Blue","options":["Ocean Blue"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST011840A-YC08","featured_media":{"alt":null,"id":27095897407587,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb7d31689e4eb6b0a7241faadaee80d6f13855f9.webp?v=1774852750"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44089448169571,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0118452-YC08","requires_shipping":true,"taxable":true,"featured_image":{"id":35562335109219,"product_id":7987834323043,"position":1,"created_at":"2026-03-30T14:39:07+08:00","updated_at":"2026-03-30T14:39:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a8ed3beb27e3fffc2b9ae3badab797aaa0ef2510.webp?v=1774852750","variant_ids":[44089448169571]},"available":true,"name":"iPhone 12 mini SolidSuit (MagSafe 兼容) Pingu 企鵝家族 出發吧! - Black","public_title":"Black","options":["Black"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0118452-YC08","featured_media":{"alt":null,"id":27095897243747,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a8ed3beb27e3fffc2b9ae3badab797aaa0ef2510.webp?v=1774852750"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":44089448005731,"title":"Parakeet Green","option1":"Parakeet Green","option2":null,"option3":null,"sku":"MST011840E-YC08","requires_shipping":true,"taxable":true,"featured_image":{"id":35562335862883,"product_id":7987834323043,"position":5,"created_at":"2026-03-30T14:39:10+08:00","updated_at":"2026-03-30T14:39:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c710b99a4d3e6ccbb11af386b0f41d0463040e0.webp?v=1774852751","variant_ids":[44089448005731]},"available":true,"name":"iPhone 12 mini SolidSuit (MagSafe 兼容) Pingu 企鵝家族 出發吧! - Parakeet Green","public_title":"Parakeet Green","options":["Parakeet Green"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST011840E-YC08","featured_media":{"alt":null,"id":27095897964643,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c710b99a4d3e6ccbb11af386b0f41d0463040e0.webp?v=1774852751"}},"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: "停產" }