$product = {"id":7911248232547,"title":"iPhone 12 mini Mod NX PosterLad 樹林","handle":"iphone-12-mini-mod-nx-printable-pos10","description":null,"published_at":"2025-11-05T10:39:36+08:00","created_at":"2025-11-04T10:44:21+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":90000,"price_min":90000,"price_max":90000,"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":43812106960995,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-POS10","requires_shipping":true,"taxable":true,"featured_image":{"id":34729227649123,"product_id":7911248232547,"position":11,"created_at":"2025-11-04T10:44:33+08:00","updated_at":"2025-11-04T10:44:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ec567fd8dba6bb1b2f0284213173b528eb6d7da.webp?v=1762224275","variant_ids":[43812106960995]},"available":true,"name":"iPhone 12 mini Mod NX PosterLad 樹林 - Black","public_title":"Black","options":["Black"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-POS10","featured_media":{"alt":null,"id":26297095880803,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ec567fd8dba6bb1b2f0284213173b528eb6d7da.webp?v=1762224275"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e21fd88768bbb0dac74291608840e43e5020055a.webp?v=1762224267","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d46b5ac4e44a2be0cef8675a9f27311c55b071d6.webp?v=1762224268","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1ae16caad7ea1435f1eba2a95abd2539d36bbc2.webp?v=1762224269","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10cc7f194eb95abc12dc9a45984c631b1c275c40.webp?v=1762224270","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d383d12015fbd638ee0111c73293528c2dcead53.webp?v=1762224270","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/61e3a026f775831b563902abe783b1c2ae93e151.webp?v=1762224271","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a8a1822d9fcf1dc976b8bd8b6f24274a5f94f9db.webp?v=1762224272","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/49ab3719458c8063d507e761db827580857cbde1.webp?v=1762224273","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3bb0e119bbc1d2194bb6a2b37b98f56d804d3837.webp?v=1762224273","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c5f5688c558c860574e7a5f074b79f11aed8639.webp?v=1762224274","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ec567fd8dba6bb1b2f0284213173b528eb6d7da.webp?v=1762224275"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e21fd88768bbb0dac74291608840e43e5020055a.webp?v=1762224267","options":["color"],"media":[{"alt":null,"id":26297093259363,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e21fd88768bbb0dac74291608840e43e5020055a.webp?v=1762224267"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e21fd88768bbb0dac74291608840e43e5020055a.webp?v=1762224267","width":2000},{"alt":null,"id":26297093554275,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d46b5ac4e44a2be0cef8675a9f27311c55b071d6.webp?v=1762224268"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d46b5ac4e44a2be0cef8675a9f27311c55b071d6.webp?v=1762224268","width":2000},{"alt":null,"id":26297093914723,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1ae16caad7ea1435f1eba2a95abd2539d36bbc2.webp?v=1762224269"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1ae16caad7ea1435f1eba2a95abd2539d36bbc2.webp?v=1762224269","width":2000},{"alt":null,"id":26297094144099,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10cc7f194eb95abc12dc9a45984c631b1c275c40.webp?v=1762224270"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10cc7f194eb95abc12dc9a45984c631b1c275c40.webp?v=1762224270","width":2000},{"alt":null,"id":26297094406243,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d383d12015fbd638ee0111c73293528c2dcead53.webp?v=1762224270"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d383d12015fbd638ee0111c73293528c2dcead53.webp?v=1762224270","width":2000},{"alt":null,"id":26297094570083,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/61e3a026f775831b563902abe783b1c2ae93e151.webp?v=1762224271"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/61e3a026f775831b563902abe783b1c2ae93e151.webp?v=1762224271","width":2000},{"alt":null,"id":26297094799459,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a8a1822d9fcf1dc976b8bd8b6f24274a5f94f9db.webp?v=1762224272"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a8a1822d9fcf1dc976b8bd8b6f24274a5f94f9db.webp?v=1762224272","width":2000},{"alt":null,"id":26297095159907,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/49ab3719458c8063d507e761db827580857cbde1.webp?v=1762224273"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/49ab3719458c8063d507e761db827580857cbde1.webp?v=1762224273","width":2000},{"alt":null,"id":26297095389283,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3bb0e119bbc1d2194bb6a2b37b98f56d804d3837.webp?v=1762224273"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3bb0e119bbc1d2194bb6a2b37b98f56d804d3837.webp?v=1762224273","width":2000},{"alt":null,"id":26297095585891,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c5f5688c558c860574e7a5f074b79f11aed8639.webp?v=1762224274"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c5f5688c558c860574e7a5f074b79f11aed8639.webp?v=1762224274","width":2000},{"alt":null,"id":26297095880803,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ec567fd8dba6bb1b2f0284213173b528eb6d7da.webp?v=1762224275"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ec567fd8dba6bb1b2f0284213173b528eb6d7da.webp?v=1762224275","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":43812106960995,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-POS10","requires_shipping":true,"taxable":true,"featured_image":{"id":34729227649123,"product_id":7911248232547,"position":11,"created_at":"2025-11-04T10:44:33+08:00","updated_at":"2025-11-04T10:44:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ec567fd8dba6bb1b2f0284213173b528eb6d7da.webp?v=1762224275","variant_ids":[43812106960995]},"available":true,"name":"iPhone 12 mini Mod NX PosterLad 樹林 - Black","public_title":"Black","options":["Black"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-POS10","featured_media":{"alt":null,"id":26297095880803,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ec567fd8dba6bb1b2f0284213173b528eb6d7da.webp?v=1762224275"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43812106960995,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-POS10","requires_shipping":true,"taxable":true,"featured_image":{"id":34729227649123,"product_id":7911248232547,"position":11,"created_at":"2025-11-04T10:44:33+08:00","updated_at":"2025-11-04T10:44:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ec567fd8dba6bb1b2f0284213173b528eb6d7da.webp?v=1762224275","variant_ids":[43812106960995]},"available":true,"name":"iPhone 12 mini Mod NX PosterLad 樹林 - Black","public_title":"Black","options":["Black"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-POS10","featured_media":{"alt":null,"id":26297095880803,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ec567fd8dba6bb1b2f0284213173b528eb6d7da.webp?v=1762224275"}},"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: "停產" }