$product = {"id":7937874034787,"title":"iPhone 12 mini Mod NX (MagSafe 兼容) 進擊的巨人 Attack on Titan 進擊的巨人","handle":"iphone-12-mini-mod-nx-magsafe-xu08","description":null,"published_at":"2025-12-12T10:42:30+08:00","created_at":"2025-12-11T15:47:38+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-attack-on-titan","device-iPhone 12 Mini","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":43884238471267,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118424-XU08","requires_shipping":true,"taxable":true,"featured_image":{"id":34932899774563,"product_id":7937874034787,"position":2,"created_at":"2025-12-11T15:47:43+08:00","updated_at":"2025-12-11T15:47:45+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89ba3c4427d2a834fabb53579436c1a4d87de136.webp?v=1765439265","variant_ids":[43884238471267]},"available":true,"name":"iPhone 12 mini 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":"MPB0118424-XU08","featured_media":{"alt":null,"id":26495271600227,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89ba3c4427d2a834fabb53579436c1a4d87de136.webp?v=1765439265"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b90b5c7d871a6808b1365b2ecb719d1a9b7cdd3.webp?v=1765439264","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89ba3c4427d2a834fabb53579436c1a4d87de136.webp?v=1765439265","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3975811ae54b39508e46e549a9ebbc76f9d59c59.webp?v=1765439265","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2921a56a35111f9020db1d08c775385bd0ca723d.webp?v=1765439266","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45c6c872e065d69376e02bd765b3a6cdc27e92bb.webp?v=1765439266","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77c7158fa60f00dac3afddc0d993b5e746993405.webp?v=1765439267","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09b205aa49c77c985ae7e87b6ffd9bfe8742be81.webp?v=1765439267","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a47cdcf1ef3551034548b9471da7bbe8126272e.webp?v=1765439268","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f39fcc6a1488d6fb99b29863f2499d7755df505.webp?v=1765439268","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c98122c4e8a0fd18a88e2a6828ef62fa5528414.webp?v=1765439269","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f8d9e2bc3375c21ddfc17b3814658f8f4e32f0c.webp?v=1765439269"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b90b5c7d871a6808b1365b2ecb719d1a9b7cdd3.webp?v=1765439264","options":["color"],"media":[{"alt":null,"id":26495271305315,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b90b5c7d871a6808b1365b2ecb719d1a9b7cdd3.webp?v=1765439264"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b90b5c7d871a6808b1365b2ecb719d1a9b7cdd3.webp?v=1765439264","width":2000},{"alt":null,"id":26495271600227,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89ba3c4427d2a834fabb53579436c1a4d87de136.webp?v=1765439265"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89ba3c4427d2a834fabb53579436c1a4d87de136.webp?v=1765439265","width":2000},{"alt":null,"id":26495271796835,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3975811ae54b39508e46e549a9ebbc76f9d59c59.webp?v=1765439265"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3975811ae54b39508e46e549a9ebbc76f9d59c59.webp?v=1765439265","width":2000},{"alt":null,"id":26495272026211,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2921a56a35111f9020db1d08c775385bd0ca723d.webp?v=1765439266"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2921a56a35111f9020db1d08c775385bd0ca723d.webp?v=1765439266","width":2000},{"alt":null,"id":26495272353891,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45c6c872e065d69376e02bd765b3a6cdc27e92bb.webp?v=1765439266"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45c6c872e065d69376e02bd765b3a6cdc27e92bb.webp?v=1765439266","width":2000},{"alt":null,"id":26495272583267,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77c7158fa60f00dac3afddc0d993b5e746993405.webp?v=1765439267"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77c7158fa60f00dac3afddc0d993b5e746993405.webp?v=1765439267","width":2000},{"alt":null,"id":26495272779875,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09b205aa49c77c985ae7e87b6ffd9bfe8742be81.webp?v=1765439267"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09b205aa49c77c985ae7e87b6ffd9bfe8742be81.webp?v=1765439267","width":2000},{"alt":null,"id":26495272976483,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a47cdcf1ef3551034548b9471da7bbe8126272e.webp?v=1765439268"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a47cdcf1ef3551034548b9471da7bbe8126272e.webp?v=1765439268","width":2000},{"alt":null,"id":26495273107555,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f39fcc6a1488d6fb99b29863f2499d7755df505.webp?v=1765439268"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f39fcc6a1488d6fb99b29863f2499d7755df505.webp?v=1765439268","width":2000},{"alt":null,"id":26495273238627,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c98122c4e8a0fd18a88e2a6828ef62fa5528414.webp?v=1765439269"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c98122c4e8a0fd18a88e2a6828ef62fa5528414.webp?v=1765439269","width":2000},{"alt":null,"id":26495273435235,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f8d9e2bc3375c21ddfc17b3814658f8f4e32f0c.webp?v=1765439269"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f8d9e2bc3375c21ddfc17b3814658f8f4e32f0c.webp?v=1765439269","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":43884238471267,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118424-XU08","requires_shipping":true,"taxable":true,"featured_image":{"id":34932899774563,"product_id":7937874034787,"position":2,"created_at":"2025-12-11T15:47:43+08:00","updated_at":"2025-12-11T15:47:45+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89ba3c4427d2a834fabb53579436c1a4d87de136.webp?v=1765439265","variant_ids":[43884238471267]},"available":true,"name":"iPhone 12 mini 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":"MPB0118424-XU08","featured_media":{"alt":null,"id":26495271600227,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89ba3c4427d2a834fabb53579436c1a4d87de136.webp?v=1765439265"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43884238471267,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118424-XU08","requires_shipping":true,"taxable":true,"featured_image":{"id":34932899774563,"product_id":7937874034787,"position":2,"created_at":"2025-12-11T15:47:43+08:00","updated_at":"2025-12-11T15:47:45+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89ba3c4427d2a834fabb53579436c1a4d87de136.webp?v=1765439265","variant_ids":[43884238471267]},"available":true,"name":"iPhone 12 mini 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":"MPB0118424-XU08","featured_media":{"alt":null,"id":26495271600227,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89ba3c4427d2a834fabb53579436c1a4d87de136.webp?v=1765439265"}},"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: "停產" }