$product = {"id":7911218118755,"title":"iPhone 12 mini Mod NX (MagSafe 兼容) PosterLad NOW","handle":"iphone-12-mini-mod-nx-magsafe-printable-pos05","description":null,"published_at":"2025-11-05T10:43:58+08:00","created_at":"2025-11-04T10:39:13+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":43812023369827,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118424-POS05","requires_shipping":true,"taxable":true,"featured_image":{"id":34729146908771,"product_id":7911218118755,"position":3,"created_at":"2025-11-04T10:39:18+08:00","updated_at":"2025-11-04T10:39:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/248379543660c5db4379735b987e6088c6045a1e.webp?v=1762223960","variant_ids":[43812023369827]},"available":true,"name":"iPhone 12 mini Mod NX (MagSafe 兼容) PosterLad NOW - 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-POS05","featured_media":{"alt":null,"id":26297015337059,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/248379543660c5db4379735b987e6088c6045a1e.webp?v=1762223960"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/330da5aca2249365d4323ac14c8268aae403f753.webp?v=1762223958","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02a5139bf4d87155a30a8d6068b6d5d885dad485.webp?v=1762223959","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/248379543660c5db4379735b987e6088c6045a1e.webp?v=1762223960","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d6f29b360cada47b7f8c8ba7637c7aa41e0e566.webp?v=1762223961","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e56e0e0a66758ca42a686e05eeef6db0ee60006e.webp?v=1762223962","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10687f607f48dbb88afd5f3c31708f54680afa8c.webp?v=1762223962","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2a1214389e7fb9920c2bf591d2b230fbbbd2fa1.webp?v=1762223963","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c7be890adb83cd594fbcedad7cc1a455a63f400c.webp?v=1762223964","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6388ec16e45cf46f50dbf71a2bd81e1131cf014.webp?v=1762223965","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6bc60f166a48d6e06d4326f9495996ad9a7aa534.webp?v=1762223965","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/495629aa4463967a5ad672c42a42f07c52c3d4e3.webp?v=1762223966"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/330da5aca2249365d4323ac14c8268aae403f753.webp?v=1762223958","options":["color"],"media":[{"alt":null,"id":26297014714467,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/330da5aca2249365d4323ac14c8268aae403f753.webp?v=1762223958"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/330da5aca2249365d4323ac14c8268aae403f753.webp?v=1762223958","width":2000},{"alt":null,"id":26297015042147,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02a5139bf4d87155a30a8d6068b6d5d885dad485.webp?v=1762223959"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02a5139bf4d87155a30a8d6068b6d5d885dad485.webp?v=1762223959","width":2000},{"alt":null,"id":26297015337059,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/248379543660c5db4379735b987e6088c6045a1e.webp?v=1762223960"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/248379543660c5db4379735b987e6088c6045a1e.webp?v=1762223960","width":2000},{"alt":null,"id":26297015730275,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d6f29b360cada47b7f8c8ba7637c7aa41e0e566.webp?v=1762223961"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d6f29b360cada47b7f8c8ba7637c7aa41e0e566.webp?v=1762223961","width":2000},{"alt":null,"id":26297016025187,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e56e0e0a66758ca42a686e05eeef6db0ee60006e.webp?v=1762223962"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e56e0e0a66758ca42a686e05eeef6db0ee60006e.webp?v=1762223962","width":2000},{"alt":null,"id":26297016451171,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10687f607f48dbb88afd5f3c31708f54680afa8c.webp?v=1762223962"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10687f607f48dbb88afd5f3c31708f54680afa8c.webp?v=1762223962","width":2000},{"alt":null,"id":26297016778851,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2a1214389e7fb9920c2bf591d2b230fbbbd2fa1.webp?v=1762223963"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2a1214389e7fb9920c2bf591d2b230fbbbd2fa1.webp?v=1762223963","width":2000},{"alt":null,"id":26297017073763,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c7be890adb83cd594fbcedad7cc1a455a63f400c.webp?v=1762223964"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c7be890adb83cd594fbcedad7cc1a455a63f400c.webp?v=1762223964","width":2000},{"alt":null,"id":26297017335907,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6388ec16e45cf46f50dbf71a2bd81e1131cf014.webp?v=1762223965"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6388ec16e45cf46f50dbf71a2bd81e1131cf014.webp?v=1762223965","width":2000},{"alt":null,"id":26297017630819,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6bc60f166a48d6e06d4326f9495996ad9a7aa534.webp?v=1762223965"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6bc60f166a48d6e06d4326f9495996ad9a7aa534.webp?v=1762223965","width":2000},{"alt":null,"id":26297017860195,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/495629aa4463967a5ad672c42a42f07c52c3d4e3.webp?v=1762223966"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/495629aa4463967a5ad672c42a42f07c52c3d4e3.webp?v=1762223966","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":43812023369827,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118424-POS05","requires_shipping":true,"taxable":true,"featured_image":{"id":34729146908771,"product_id":7911218118755,"position":3,"created_at":"2025-11-04T10:39:18+08:00","updated_at":"2025-11-04T10:39:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/248379543660c5db4379735b987e6088c6045a1e.webp?v=1762223960","variant_ids":[43812023369827]},"available":true,"name":"iPhone 12 mini Mod NX (MagSafe 兼容) PosterLad NOW - 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-POS05","featured_media":{"alt":null,"id":26297015337059,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/248379543660c5db4379735b987e6088c6045a1e.webp?v=1762223960"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43812023369827,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118424-POS05","requires_shipping":true,"taxable":true,"featured_image":{"id":34729146908771,"product_id":7911218118755,"position":3,"created_at":"2025-11-04T10:39:18+08:00","updated_at":"2025-11-04T10:39:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/248379543660c5db4379735b987e6088c6045a1e.webp?v=1762223960","variant_ids":[43812023369827]},"available":true,"name":"iPhone 12 mini Mod NX (MagSafe 兼容) PosterLad NOW - 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-POS05","featured_media":{"alt":null,"id":26297015337059,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/248379543660c5db4379735b987e6088c6045a1e.webp?v=1762223960"}},"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: "停產" }