$product = {"id":7911253213283,"title":"iPhone 12 mini Mod NX (MagSafe 兼容) PosterLad 色彩之雨","handle":"iphone-12-mini-mod-nx-magsafe-printable-pos02","description":null,"published_at":"2025-11-05T10:38:53+08:00","created_at":"2025-11-04T10:45:14+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-posterlad","device-iPhone 12 Mini","merge","reseller-posterlad"],"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":43812119937123,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118424-POS02","requires_shipping":true,"taxable":true,"featured_image":{"id":34729237282915,"product_id":7911253213283,"position":1,"created_at":"2025-11-04T10:45:19+08:00","updated_at":"2025-11-04T10:45:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5cb1e151d85d8decf878bba0f9a81230506ceea4.webp?v=1762224321","variant_ids":[43812119937123]},"available":true,"name":"iPhone 12 mini Mod NX (MagSafe 兼容) PosterLad 色彩之雨 - 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-POS02","featured_media":{"alt":null,"id":26297105481827,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5cb1e151d85d8decf878bba0f9a81230506ceea4.webp?v=1762224321"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5cb1e151d85d8decf878bba0f9a81230506ceea4.webp?v=1762224321","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ce98e3d9d6bae3c7259367bfb058a72ebf2b4521.webp?v=1762224321","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3bd1f3e82c87a7a7d1bf2d605212a1c214ca4057.webp?v=1762224322","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8da752bf3473617fc916751bcc093a6a6705e8b5.webp?v=1762224323","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5433f1c601d527f88934a99a8fab9a7dfa715af.webp?v=1762224324","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/64f85f85513d10665a9a0b848a3b00d3804a4ea9.webp?v=1762224325","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e9a4c4589f7511df5a5463a56f8f457939994bb.webp?v=1762224326","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d2e9ee758bbe3e9c5d562628df4ac85f31924654.webp?v=1762224327","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/513de711fd2f4011e2aee00abba231f430bc5dcf.webp?v=1762224328","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd3f8d8ae91c247700eb39ab288037b3cd5d24d4.webp?v=1762224329","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b02b27e4709d7785b28f978bafa25e61ed339252.webp?v=1762224329"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5cb1e151d85d8decf878bba0f9a81230506ceea4.webp?v=1762224321","options":["color"],"media":[{"alt":null,"id":26297105481827,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5cb1e151d85d8decf878bba0f9a81230506ceea4.webp?v=1762224321"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5cb1e151d85d8decf878bba0f9a81230506ceea4.webp?v=1762224321","width":2000},{"alt":null,"id":26297105711203,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ce98e3d9d6bae3c7259367bfb058a72ebf2b4521.webp?v=1762224321"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ce98e3d9d6bae3c7259367bfb058a72ebf2b4521.webp?v=1762224321","width":2000},{"alt":null,"id":26297105907811,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3bd1f3e82c87a7a7d1bf2d605212a1c214ca4057.webp?v=1762224322"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3bd1f3e82c87a7a7d1bf2d605212a1c214ca4057.webp?v=1762224322","width":2000},{"alt":null,"id":26297106137187,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8da752bf3473617fc916751bcc093a6a6705e8b5.webp?v=1762224323"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8da752bf3473617fc916751bcc093a6a6705e8b5.webp?v=1762224323","width":2000},{"alt":null,"id":26297106366563,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5433f1c601d527f88934a99a8fab9a7dfa715af.webp?v=1762224324"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5433f1c601d527f88934a99a8fab9a7dfa715af.webp?v=1762224324","width":2000},{"alt":null,"id":26297106464867,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/64f85f85513d10665a9a0b848a3b00d3804a4ea9.webp?v=1762224325"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/64f85f85513d10665a9a0b848a3b00d3804a4ea9.webp?v=1762224325","width":2000},{"alt":null,"id":26297106563171,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e9a4c4589f7511df5a5463a56f8f457939994bb.webp?v=1762224326"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e9a4c4589f7511df5a5463a56f8f457939994bb.webp?v=1762224326","width":2000},{"alt":null,"id":26297106858083,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d2e9ee758bbe3e9c5d562628df4ac85f31924654.webp?v=1762224327"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d2e9ee758bbe3e9c5d562628df4ac85f31924654.webp?v=1762224327","width":2000},{"alt":null,"id":26297106956387,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/513de711fd2f4011e2aee00abba231f430bc5dcf.webp?v=1762224328"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/513de711fd2f4011e2aee00abba231f430bc5dcf.webp?v=1762224328","width":2000},{"alt":null,"id":26297107185763,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd3f8d8ae91c247700eb39ab288037b3cd5d24d4.webp?v=1762224329"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd3f8d8ae91c247700eb39ab288037b3cd5d24d4.webp?v=1762224329","width":2000},{"alt":null,"id":26297107480675,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b02b27e4709d7785b28f978bafa25e61ed339252.webp?v=1762224329"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b02b27e4709d7785b28f978bafa25e61ed339252.webp?v=1762224329","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":43812119937123,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118424-POS02","requires_shipping":true,"taxable":true,"featured_image":{"id":34729237282915,"product_id":7911253213283,"position":1,"created_at":"2025-11-04T10:45:19+08:00","updated_at":"2025-11-04T10:45:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5cb1e151d85d8decf878bba0f9a81230506ceea4.webp?v=1762224321","variant_ids":[43812119937123]},"available":true,"name":"iPhone 12 mini Mod NX (MagSafe 兼容) PosterLad 色彩之雨 - 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-POS02","featured_media":{"alt":null,"id":26297105481827,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5cb1e151d85d8decf878bba0f9a81230506ceea4.webp?v=1762224321"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43812119937123,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118424-POS02","requires_shipping":true,"taxable":true,"featured_image":{"id":34729237282915,"product_id":7911253213283,"position":1,"created_at":"2025-11-04T10:45:19+08:00","updated_at":"2025-11-04T10:45:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5cb1e151d85d8decf878bba0f9a81230506ceea4.webp?v=1762224321","variant_ids":[43812119937123]},"available":true,"name":"iPhone 12 mini Mod NX (MagSafe 兼容) PosterLad 色彩之雨 - 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-POS02","featured_media":{"alt":null,"id":26297105481827,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5cb1e151d85d8decf878bba0f9a81230506ceea4.webp?v=1762224321"}},"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: "停產" }