$product = {"id":7886194868323,"title":"iPhone 12 mini Mod NX 馬來貘LAIMO 阿楊","handle":"iphone-12-mini-mod-nx-printable-lmo01","description":null,"published_at":"2025-09-17T10:40:50+08:00","created_at":"2025-09-17T10:13:47+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-cherng","device-iPhone 12 Mini","merge","reseller-cherng"],"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":43735017095267,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-LMO01","requires_shipping":true,"taxable":true,"featured_image":{"id":34500448059491,"product_id":7886194868323,"position":5,"created_at":"2025-09-17T10:13:55+08:00","updated_at":"2025-09-17T10:13:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ca92a8aba6633d2f812bcfa990a5b268c358411.webp?v=1758075237","variant_ids":[43735017095267]},"available":true,"name":"iPhone 12 mini Mod NX 馬來貘LAIMO 阿楊 - 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-LMO01","featured_media":{"alt":null,"id":26072039784547,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ca92a8aba6633d2f812bcfa990a5b268c358411.webp?v=1758075237"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1aeefcc1a7501473e02aa8ca09860d5edc546b9d.webp?v=1758075233","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0615a6eb9e9a0513f4271708ea186230f83a746c.webp?v=1758075235","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5217541a352d7f51646364d587ac5dc31773c719.webp?v=1758075236","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0737f601a214cf93409ad6957bca2451352f7533.webp?v=1758075236","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ca92a8aba6633d2f812bcfa990a5b268c358411.webp?v=1758075237","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29d52c733dd5d4b9ba36fd72b3b9e0234d030d07.webp?v=1758075237","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f915ae94954f4a4dae25cce5811a7cae05de449e.webp?v=1758075237","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff9db80c4b54e7949e6552bffb0380046c1d64ce.webp?v=1758075238","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae7d822ff9d6402cffb453f288b1c63270efdb2d.webp?v=1758075239","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b3e1b5ba527870725085ad88c15f83c45f064efa.webp?v=1758075239","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dfca90893230ebdeb67faef410b456678f52d30f.webp?v=1758075240"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1aeefcc1a7501473e02aa8ca09860d5edc546b9d.webp?v=1758075233","options":["color"],"media":[{"alt":null,"id":26072038768739,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1aeefcc1a7501473e02aa8ca09860d5edc546b9d.webp?v=1758075233"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1aeefcc1a7501473e02aa8ca09860d5edc546b9d.webp?v=1758075233","width":2000},{"alt":null,"id":26072039227491,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0615a6eb9e9a0513f4271708ea186230f83a746c.webp?v=1758075235"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0615a6eb9e9a0513f4271708ea186230f83a746c.webp?v=1758075235","width":2000},{"alt":null,"id":26072039391331,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5217541a352d7f51646364d587ac5dc31773c719.webp?v=1758075236"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5217541a352d7f51646364d587ac5dc31773c719.webp?v=1758075236","width":2000},{"alt":null,"id":26072039620707,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0737f601a214cf93409ad6957bca2451352f7533.webp?v=1758075236"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0737f601a214cf93409ad6957bca2451352f7533.webp?v=1758075236","width":2000},{"alt":null,"id":26072039784547,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ca92a8aba6633d2f812bcfa990a5b268c358411.webp?v=1758075237"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ca92a8aba6633d2f812bcfa990a5b268c358411.webp?v=1758075237","width":2000},{"alt":null,"id":26072039948387,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29d52c733dd5d4b9ba36fd72b3b9e0234d030d07.webp?v=1758075237"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29d52c733dd5d4b9ba36fd72b3b9e0234d030d07.webp?v=1758075237","width":2000},{"alt":null,"id":26072040210531,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f915ae94954f4a4dae25cce5811a7cae05de449e.webp?v=1758075237"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f915ae94954f4a4dae25cce5811a7cae05de449e.webp?v=1758075237","width":2000},{"alt":null,"id":26072040341603,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff9db80c4b54e7949e6552bffb0380046c1d64ce.webp?v=1758075238"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff9db80c4b54e7949e6552bffb0380046c1d64ce.webp?v=1758075238","width":2000},{"alt":null,"id":26072040472675,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae7d822ff9d6402cffb453f288b1c63270efdb2d.webp?v=1758075239"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae7d822ff9d6402cffb453f288b1c63270efdb2d.webp?v=1758075239","width":2000},{"alt":null,"id":26072040603747,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b3e1b5ba527870725085ad88c15f83c45f064efa.webp?v=1758075239"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b3e1b5ba527870725085ad88c15f83c45f064efa.webp?v=1758075239","width":2000},{"alt":null,"id":26072040833123,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dfca90893230ebdeb67faef410b456678f52d30f.webp?v=1758075240"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dfca90893230ebdeb67faef410b456678f52d30f.webp?v=1758075240","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":43735017095267,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-LMO01","requires_shipping":true,"taxable":true,"featured_image":{"id":34500448059491,"product_id":7886194868323,"position":5,"created_at":"2025-09-17T10:13:55+08:00","updated_at":"2025-09-17T10:13:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ca92a8aba6633d2f812bcfa990a5b268c358411.webp?v=1758075237","variant_ids":[43735017095267]},"available":true,"name":"iPhone 12 mini Mod NX 馬來貘LAIMO 阿楊 - 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-LMO01","featured_media":{"alt":null,"id":26072039784547,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ca92a8aba6633d2f812bcfa990a5b268c358411.webp?v=1758075237"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43735017095267,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-LMO01","requires_shipping":true,"taxable":true,"featured_image":{"id":34500448059491,"product_id":7886194868323,"position":5,"created_at":"2025-09-17T10:13:55+08:00","updated_at":"2025-09-17T10:13:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ca92a8aba6633d2f812bcfa990a5b268c358411.webp?v=1758075237","variant_ids":[43735017095267]},"available":true,"name":"iPhone 12 mini Mod NX 馬來貘LAIMO 阿楊 - 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-LMO01","featured_media":{"alt":null,"id":26072039784547,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ca92a8aba6633d2f812bcfa990a5b268c358411.webp?v=1758075237"}},"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: "停產" }