$product = {"id":7921197711459,"title":"iPhone 14 Plus SolidSuit (MagSafe 兼容) 懶散兔與啾先生 煙火","handle":"iphone-14-plus-solidsuit-classic-magsafe-ec75","description":null,"published_at":"2025-11-14T10:44:14+08:00","created_at":"2025-11-11T10:17:54+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-bylobster","device-iPhone 14 Plus","merge","reseller-bylobster"],"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":43831121182819,"title":"Neon Orange","option1":"Neon Orange","option2":null,"option3":null,"sku":"MST012610F-EC75","requires_shipping":true,"taxable":true,"featured_image":{"id":34786549530723,"product_id":7921197711459,"position":2,"created_at":"2025-11-11T10:18:00+08:00","updated_at":"2025-11-11T10:18:02+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/773dc39145543cbb7fc20c5dee48e7d471491ec3.webp?v=1762827482","variant_ids":[43831121182819]},"available":true,"name":"iPhone 14 Plus SolidSuit (MagSafe 兼容) 懶散兔與啾先生 煙火 - Neon Orange","public_title":"Neon Orange","options":["Neon Orange"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST012610F-EC75","featured_media":{"alt":null,"id":26352005939299,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/773dc39145543cbb7fc20c5dee48e7d471491ec3.webp?v=1762827482"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43831123607651,"title":"Bordeaux Red","option1":"Bordeaux Red","option2":null,"option3":null,"sku":"MST012610D-EC75","requires_shipping":true,"taxable":true,"featured_image":{"id":34786550382691,"product_id":7921197711459,"position":7,"created_at":"2025-11-11T10:18:03+08:00","updated_at":"2025-11-11T10:18:05+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bab890b70cf19c921bb3d37ff8d23b43e63165a.webp?v=1762827485","variant_ids":[43831123607651]},"available":true,"name":"iPhone 14 Plus SolidSuit (MagSafe 兼容) 懶散兔與啾先生 煙火 - 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":"MST012610D-EC75","featured_media":{"alt":null,"id":26352006824035,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bab890b70cf19c921bb3d37ff8d23b43e63165a.webp?v=1762827485"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43831123640419,"title":"Blush Pink","option1":"Blush Pink","option2":null,"option3":null,"sku":"MST0126157-EC75","requires_shipping":true,"taxable":true,"featured_image":{"id":34786549727331,"product_id":7921197711459,"position":3,"created_at":"2025-11-11T10:18:00+08:00","updated_at":"2025-11-11T10:18:02+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/007772c2b9160b7e181ca1c36953c65f2fb6a8d2.webp?v=1762827482","variant_ids":[43831123640419]},"available":true,"name":"iPhone 14 Plus SolidSuit (MagSafe 兼容) 懶散兔與啾先生 煙火 - Blush Pink","public_title":"Blush Pink","options":["Blush Pink"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0126157-EC75","featured_media":{"alt":null,"id":26352006201443,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/007772c2b9160b7e181ca1c36953c65f2fb6a8d2.webp?v=1762827482"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43831123673187,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0126152-EC75","requires_shipping":true,"taxable":true,"featured_image":{"id":34786549891171,"product_id":7921197711459,"position":4,"created_at":"2025-11-11T10:18:01+08:00","updated_at":"2025-11-11T10:18:03+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66b3898edddd898922158603afa67c24078b50c0.webp?v=1762827483","variant_ids":[43831123673187]},"available":true,"name":"iPhone 14 Plus SolidSuit (MagSafe 兼容) 懶散兔與啾先生 煙火 - Black","public_title":"Black","options":["Black"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0126152-EC75","featured_media":{"alt":null,"id":26352006365283,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66b3898edddd898922158603afa67c24078b50c0.webp?v=1762827483"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43831123705955,"title":"Cobalt Blue","option1":"Cobalt Blue","option2":null,"option3":null,"sku":"MST01261O9-EC75","requires_shipping":true,"taxable":true,"featured_image":{"id":34786550186083,"product_id":7921197711459,"position":6,"created_at":"2025-11-11T10:18:02+08:00","updated_at":"2025-11-11T10:18:04+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b83ef73900466e01922e25537659744ad1a2fbb.webp?v=1762827484","variant_ids":[43831123705955]},"available":true,"name":"iPhone 14 Plus SolidSuit (MagSafe 兼容) 懶散兔與啾先生 煙火 - Cobalt Blue","public_title":"Cobalt Blue","options":["Cobalt Blue"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST01261O9-EC75","featured_media":{"alt":null,"id":26352006627427,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b83ef73900466e01922e25537659744ad1a2fbb.webp?v=1762827484"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43831123771491,"title":"Classic Blue","option1":"Classic Blue","option2":null,"option3":null,"sku":"MST012610C-EC75","requires_shipping":true,"taxable":true,"featured_image":{"id":34786549235811,"product_id":7921197711459,"position":1,"created_at":"2025-11-11T10:17:59+08:00","updated_at":"2025-11-11T10:18:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/12a2926ab0c69d5628f479ab22f806e03b3d9a29.webp?v=1762827481","variant_ids":[43831123771491]},"available":true,"name":"iPhone 14 Plus SolidSuit (MagSafe 兼容) 懶散兔與啾先生 煙火 - Classic Blue","public_title":"Classic Blue","options":["Classic Blue"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST012610C-EC75","featured_media":{"alt":null,"id":26352005677155,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/12a2926ab0c69d5628f479ab22f806e03b3d9a29.webp?v=1762827481"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/12a2926ab0c69d5628f479ab22f806e03b3d9a29.webp?v=1762827481","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/773dc39145543cbb7fc20c5dee48e7d471491ec3.webp?v=1762827482","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/007772c2b9160b7e181ca1c36953c65f2fb6a8d2.webp?v=1762827482","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66b3898edddd898922158603afa67c24078b50c0.webp?v=1762827483","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/624978e68f8cd4bd3b4862ac13a3954ae13b0ea0.webp?v=1762827484","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b83ef73900466e01922e25537659744ad1a2fbb.webp?v=1762827484","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bab890b70cf19c921bb3d37ff8d23b43e63165a.webp?v=1762827485"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/12a2926ab0c69d5628f479ab22f806e03b3d9a29.webp?v=1762827481","options":["color"],"media":[{"alt":null,"id":26352005677155,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/12a2926ab0c69d5628f479ab22f806e03b3d9a29.webp?v=1762827481"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/12a2926ab0c69d5628f479ab22f806e03b3d9a29.webp?v=1762827481","width":2000},{"alt":null,"id":26352005939299,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/773dc39145543cbb7fc20c5dee48e7d471491ec3.webp?v=1762827482"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/773dc39145543cbb7fc20c5dee48e7d471491ec3.webp?v=1762827482","width":2000},{"alt":null,"id":26352006201443,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/007772c2b9160b7e181ca1c36953c65f2fb6a8d2.webp?v=1762827482"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/007772c2b9160b7e181ca1c36953c65f2fb6a8d2.webp?v=1762827482","width":2000},{"alt":null,"id":26352006365283,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66b3898edddd898922158603afa67c24078b50c0.webp?v=1762827483"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66b3898edddd898922158603afa67c24078b50c0.webp?v=1762827483","width":2000},{"alt":null,"id":26352006496355,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/624978e68f8cd4bd3b4862ac13a3954ae13b0ea0.webp?v=1762827484"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/624978e68f8cd4bd3b4862ac13a3954ae13b0ea0.webp?v=1762827484","width":2000},{"alt":null,"id":26352006627427,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b83ef73900466e01922e25537659744ad1a2fbb.webp?v=1762827484"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b83ef73900466e01922e25537659744ad1a2fbb.webp?v=1762827484","width":2000},{"alt":null,"id":26352006824035,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bab890b70cf19c921bb3d37ff8d23b43e63165a.webp?v=1762827485"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bab890b70cf19c921bb3d37ff8d23b43e63165a.webp?v=1762827485","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":43831121182819,"title":"Neon Orange","option1":"Neon Orange","option2":null,"option3":null,"sku":"MST012610F-EC75","requires_shipping":true,"taxable":true,"featured_image":{"id":34786549530723,"product_id":7921197711459,"position":2,"created_at":"2025-11-11T10:18:00+08:00","updated_at":"2025-11-11T10:18:02+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/773dc39145543cbb7fc20c5dee48e7d471491ec3.webp?v=1762827482","variant_ids":[43831121182819]},"available":true,"name":"iPhone 14 Plus SolidSuit (MagSafe 兼容) 懶散兔與啾先生 煙火 - Neon Orange","public_title":"Neon Orange","options":["Neon Orange"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST012610F-EC75","featured_media":{"alt":null,"id":26352005939299,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/773dc39145543cbb7fc20c5dee48e7d471491ec3.webp?v=1762827482"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43831123607651,"title":"Bordeaux Red","option1":"Bordeaux Red","option2":null,"option3":null,"sku":"MST012610D-EC75","requires_shipping":true,"taxable":true,"featured_image":{"id":34786550382691,"product_id":7921197711459,"position":7,"created_at":"2025-11-11T10:18:03+08:00","updated_at":"2025-11-11T10:18:05+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bab890b70cf19c921bb3d37ff8d23b43e63165a.webp?v=1762827485","variant_ids":[43831123607651]},"available":true,"name":"iPhone 14 Plus SolidSuit (MagSafe 兼容) 懶散兔與啾先生 煙火 - 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":"MST012610D-EC75","featured_media":{"alt":null,"id":26352006824035,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bab890b70cf19c921bb3d37ff8d23b43e63165a.webp?v=1762827485"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43831123640419,"title":"Blush Pink","option1":"Blush Pink","option2":null,"option3":null,"sku":"MST0126157-EC75","requires_shipping":true,"taxable":true,"featured_image":{"id":34786549727331,"product_id":7921197711459,"position":3,"created_at":"2025-11-11T10:18:00+08:00","updated_at":"2025-11-11T10:18:02+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/007772c2b9160b7e181ca1c36953c65f2fb6a8d2.webp?v=1762827482","variant_ids":[43831123640419]},"available":true,"name":"iPhone 14 Plus SolidSuit (MagSafe 兼容) 懶散兔與啾先生 煙火 - Blush Pink","public_title":"Blush Pink","options":["Blush Pink"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0126157-EC75","featured_media":{"alt":null,"id":26352006201443,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/007772c2b9160b7e181ca1c36953c65f2fb6a8d2.webp?v=1762827482"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43831123673187,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0126152-EC75","requires_shipping":true,"taxable":true,"featured_image":{"id":34786549891171,"product_id":7921197711459,"position":4,"created_at":"2025-11-11T10:18:01+08:00","updated_at":"2025-11-11T10:18:03+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66b3898edddd898922158603afa67c24078b50c0.webp?v=1762827483","variant_ids":[43831123673187]},"available":true,"name":"iPhone 14 Plus SolidSuit (MagSafe 兼容) 懶散兔與啾先生 煙火 - Black","public_title":"Black","options":["Black"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0126152-EC75","featured_media":{"alt":null,"id":26352006365283,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66b3898edddd898922158603afa67c24078b50c0.webp?v=1762827483"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43831123705955,"title":"Cobalt Blue","option1":"Cobalt Blue","option2":null,"option3":null,"sku":"MST01261O9-EC75","requires_shipping":true,"taxable":true,"featured_image":{"id":34786550186083,"product_id":7921197711459,"position":6,"created_at":"2025-11-11T10:18:02+08:00","updated_at":"2025-11-11T10:18:04+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b83ef73900466e01922e25537659744ad1a2fbb.webp?v=1762827484","variant_ids":[43831123705955]},"available":true,"name":"iPhone 14 Plus SolidSuit (MagSafe 兼容) 懶散兔與啾先生 煙火 - Cobalt Blue","public_title":"Cobalt Blue","options":["Cobalt Blue"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST01261O9-EC75","featured_media":{"alt":null,"id":26352006627427,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b83ef73900466e01922e25537659744ad1a2fbb.webp?v=1762827484"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43831123771491,"title":"Classic Blue","option1":"Classic Blue","option2":null,"option3":null,"sku":"MST012610C-EC75","requires_shipping":true,"taxable":true,"featured_image":{"id":34786549235811,"product_id":7921197711459,"position":1,"created_at":"2025-11-11T10:17:59+08:00","updated_at":"2025-11-11T10:18:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/12a2926ab0c69d5628f479ab22f806e03b3d9a29.webp?v=1762827481","variant_ids":[43831123771491]},"available":true,"name":"iPhone 14 Plus SolidSuit (MagSafe 兼容) 懶散兔與啾先生 煙火 - Classic Blue","public_title":"Classic Blue","options":["Classic Blue"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST012610C-EC75","featured_media":{"alt":null,"id":26352005677155,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/12a2926ab0c69d5628f479ab22f806e03b3d9a29.webp?v=1762827481"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43831121182819,"title":"Neon Orange","option1":"Neon Orange","option2":null,"option3":null,"sku":"MST012610F-EC75","requires_shipping":true,"taxable":true,"featured_image":{"id":34786549530723,"product_id":7921197711459,"position":2,"created_at":"2025-11-11T10:18:00+08:00","updated_at":"2025-11-11T10:18:02+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/773dc39145543cbb7fc20c5dee48e7d471491ec3.webp?v=1762827482","variant_ids":[43831121182819]},"available":true,"name":"iPhone 14 Plus SolidSuit (MagSafe 兼容) 懶散兔與啾先生 煙火 - Neon Orange","public_title":"Neon Orange","options":["Neon Orange"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST012610F-EC75","featured_media":{"alt":null,"id":26352005939299,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/773dc39145543cbb7fc20c5dee48e7d471491ec3.webp?v=1762827482"}},"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: "停產" }