$product = {"id":7886187167843,"title":"iPhone 12 mini Mod NX 馬來貘LAIMO 忙到不行","handle":"iphone-12-mini-mod-nx-printable-lmo06","description":null,"published_at":"2025-09-17T10:42:57+08:00","created_at":"2025-09-17T10:12:09+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":43734984720483,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-LMO06","requires_shipping":true,"taxable":true,"featured_image":{"id":34500414046307,"product_id":7886187167843,"position":6,"created_at":"2025-09-17T10:12:16+08:00","updated_at":"2025-09-17T10:12:18+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/256ea3ec5171f752a1543cc623fd06a190c240bb.webp?v=1758075138","variant_ids":[43734984720483]},"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-LMO06","featured_media":{"alt":null,"id":26072005771363,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/256ea3ec5171f752a1543cc623fd06a190c240bb.webp?v=1758075138"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37324d011e9b1b6c16abfc19db676527b5a21b01.webp?v=1758075135","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dfb4d4e3e3af48ec1e65b9bf9957b9efbd45cb3b.webp?v=1758075136","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b523ce1b351cd7c25a2bb6b69cc462e9da5df65.webp?v=1758075136","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5873f47750e73fcb32a562e81b78fd29735589a9.webp?v=1758075137","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d557ef0c966033fd280e27f708a8a429d8df410f.webp?v=1758075137","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/256ea3ec5171f752a1543cc623fd06a190c240bb.webp?v=1758075138","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2db446e40895d9997adf2b89b4d96d5489e2feb9.webp?v=1758075138","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6689d118866fa499d2d54c31a5fc4533a692c2d1.webp?v=1758075139","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e30660e5a4fd4473282fe130cba5e174958d9cc4.webp?v=1758075139","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d75b8cf83a583425bb68e9d80657d4093d4adbf4.webp?v=1758075140","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2d48dd79f74daf8ece7cafcd0929ccdf953494e.webp?v=1758075140"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37324d011e9b1b6c16abfc19db676527b5a21b01.webp?v=1758075135","options":["color"],"media":[{"alt":null,"id":26072005017699,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37324d011e9b1b6c16abfc19db676527b5a21b01.webp?v=1758075135"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37324d011e9b1b6c16abfc19db676527b5a21b01.webp?v=1758075135","width":2000},{"alt":null,"id":26072005116003,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dfb4d4e3e3af48ec1e65b9bf9957b9efbd45cb3b.webp?v=1758075136"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dfb4d4e3e3af48ec1e65b9bf9957b9efbd45cb3b.webp?v=1758075136","width":2000},{"alt":null,"id":26072005247075,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b523ce1b351cd7c25a2bb6b69cc462e9da5df65.webp?v=1758075136"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b523ce1b351cd7c25a2bb6b69cc462e9da5df65.webp?v=1758075136","width":2000},{"alt":null,"id":26072005378147,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5873f47750e73fcb32a562e81b78fd29735589a9.webp?v=1758075137"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5873f47750e73fcb32a562e81b78fd29735589a9.webp?v=1758075137","width":2000},{"alt":null,"id":26072005574755,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d557ef0c966033fd280e27f708a8a429d8df410f.webp?v=1758075137"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d557ef0c966033fd280e27f708a8a429d8df410f.webp?v=1758075137","width":2000},{"alt":null,"id":26072005771363,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/256ea3ec5171f752a1543cc623fd06a190c240bb.webp?v=1758075138"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/256ea3ec5171f752a1543cc623fd06a190c240bb.webp?v=1758075138","width":2000},{"alt":null,"id":26072006066275,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2db446e40895d9997adf2b89b4d96d5489e2feb9.webp?v=1758075138"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2db446e40895d9997adf2b89b4d96d5489e2feb9.webp?v=1758075138","width":2000},{"alt":null,"id":26072006262883,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6689d118866fa499d2d54c31a5fc4533a692c2d1.webp?v=1758075139"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6689d118866fa499d2d54c31a5fc4533a692c2d1.webp?v=1758075139","width":2000},{"alt":null,"id":26072006459491,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e30660e5a4fd4473282fe130cba5e174958d9cc4.webp?v=1758075139"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e30660e5a4fd4473282fe130cba5e174958d9cc4.webp?v=1758075139","width":2000},{"alt":null,"id":26072006754403,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d75b8cf83a583425bb68e9d80657d4093d4adbf4.webp?v=1758075140"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d75b8cf83a583425bb68e9d80657d4093d4adbf4.webp?v=1758075140","width":2000},{"alt":null,"id":26072007016547,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2d48dd79f74daf8ece7cafcd0929ccdf953494e.webp?v=1758075140"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2d48dd79f74daf8ece7cafcd0929ccdf953494e.webp?v=1758075140","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":43734984720483,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-LMO06","requires_shipping":true,"taxable":true,"featured_image":{"id":34500414046307,"product_id":7886187167843,"position":6,"created_at":"2025-09-17T10:12:16+08:00","updated_at":"2025-09-17T10:12:18+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/256ea3ec5171f752a1543cc623fd06a190c240bb.webp?v=1758075138","variant_ids":[43734984720483]},"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-LMO06","featured_media":{"alt":null,"id":26072005771363,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/256ea3ec5171f752a1543cc623fd06a190c240bb.webp?v=1758075138"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43734984720483,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-LMO06","requires_shipping":true,"taxable":true,"featured_image":{"id":34500414046307,"product_id":7886187167843,"position":6,"created_at":"2025-09-17T10:12:16+08:00","updated_at":"2025-09-17T10:12:18+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/256ea3ec5171f752a1543cc623fd06a190c240bb.webp?v=1758075138","variant_ids":[43734984720483]},"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-LMO06","featured_media":{"alt":null,"id":26072005771363,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/256ea3ec5171f752a1543cc623fd06a190c240bb.webp?v=1758075138"}},"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: "停產" }