$product = {"id":7876114841699,"title":"iPhone 12 mini Mod NX (MagSafe 兼容) 爽爽貓 by SECOND 好運發生","handle":"iphone-12-mini-mod-nx-magsafe-printable-ea109","description":null,"published_at":"2025-09-04T09:42:10+08:00","created_at":"2025-09-03T12:04:57+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-songsongmeow","device-iPhone 12 Mini","merge","reseller-songsongmeow"],"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":43675469906019,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118424-EA109","requires_shipping":true,"taxable":true,"featured_image":{"id":34416430874723,"product_id":7876114841699,"position":9,"created_at":"2025-09-03T12:05:07+08:00","updated_at":"2025-09-03T12:05:09+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36d09c25cfe091dd747beb96a8eec6c19e4892fb.webp?v=1756872309","variant_ids":[43675469906019]},"available":true,"name":"iPhone 12 mini Mod NX (MagSafe 兼容) 爽爽貓 by SECOND 好運發生 - 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-EA109","featured_media":{"alt":null,"id":25988705353827,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36d09c25cfe091dd747beb96a8eec6c19e4892fb.webp?v=1756872309"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a1b39ff5199c22107d5f184b334330e0c1cce6e.webp?v=1756872303","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c119fe173d314a1d1d3c4ce7a18948748f3654b3.webp?v=1756872304","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5f88bd30f0f1c313cc15ac3ed78c4d7033af9df.webp?v=1756872305","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a29ec86ba2d88d61f8ac9133069cdb6735033e86.webp?v=1756872306","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88850a3f3eb72bbabaa320e9343e632d84fd9b50.webp?v=1756872306","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c77b810d836540689a21e1fce43acfb7fdb857f8.webp?v=1756872307","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/81ad496f8ba25af066f1699291bc3e807eebef5d.webp?v=1756872307","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b81d00d1804af37e1286368c42eb10c913af730a.webp?v=1756872308","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36d09c25cfe091dd747beb96a8eec6c19e4892fb.webp?v=1756872309","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6b8ca7fcc940fa384038555f07e28e4f2f3d5c8.webp?v=1756872310","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f522fde90bb7306740b472e1735c7e52fef8095a.webp?v=1756872311"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a1b39ff5199c22107d5f184b334330e0c1cce6e.webp?v=1756872303","options":["color"],"media":[{"alt":null,"id":25988703584355,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a1b39ff5199c22107d5f184b334330e0c1cce6e.webp?v=1756872303"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a1b39ff5199c22107d5f184b334330e0c1cce6e.webp?v=1756872303","width":2000},{"alt":null,"id":25988703813731,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c119fe173d314a1d1d3c4ce7a18948748f3654b3.webp?v=1756872304"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c119fe173d314a1d1d3c4ce7a18948748f3654b3.webp?v=1756872304","width":2000},{"alt":null,"id":25988704043107,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5f88bd30f0f1c313cc15ac3ed78c4d7033af9df.webp?v=1756872305"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5f88bd30f0f1c313cc15ac3ed78c4d7033af9df.webp?v=1756872305","width":2000},{"alt":null,"id":25988704305251,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a29ec86ba2d88d61f8ac9133069cdb6735033e86.webp?v=1756872306"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a29ec86ba2d88d61f8ac9133069cdb6735033e86.webp?v=1756872306","width":2000},{"alt":null,"id":25988704632931,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88850a3f3eb72bbabaa320e9343e632d84fd9b50.webp?v=1756872306"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88850a3f3eb72bbabaa320e9343e632d84fd9b50.webp?v=1756872306","width":2000},{"alt":null,"id":25988704862307,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c77b810d836540689a21e1fce43acfb7fdb857f8.webp?v=1756872307"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c77b810d836540689a21e1fce43acfb7fdb857f8.webp?v=1756872307","width":2000},{"alt":null,"id":25988705026147,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/81ad496f8ba25af066f1699291bc3e807eebef5d.webp?v=1756872307"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/81ad496f8ba25af066f1699291bc3e807eebef5d.webp?v=1756872307","width":2000},{"alt":null,"id":25988705189987,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b81d00d1804af37e1286368c42eb10c913af730a.webp?v=1756872308"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b81d00d1804af37e1286368c42eb10c913af730a.webp?v=1756872308","width":2000},{"alt":null,"id":25988705353827,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36d09c25cfe091dd747beb96a8eec6c19e4892fb.webp?v=1756872309"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36d09c25cfe091dd747beb96a8eec6c19e4892fb.webp?v=1756872309","width":2000},{"alt":null,"id":25988705550435,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6b8ca7fcc940fa384038555f07e28e4f2f3d5c8.webp?v=1756872310"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6b8ca7fcc940fa384038555f07e28e4f2f3d5c8.webp?v=1756872310","width":2000},{"alt":null,"id":25988705779811,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f522fde90bb7306740b472e1735c7e52fef8095a.webp?v=1756872311"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f522fde90bb7306740b472e1735c7e52fef8095a.webp?v=1756872311","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":43675469906019,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118424-EA109","requires_shipping":true,"taxable":true,"featured_image":{"id":34416430874723,"product_id":7876114841699,"position":9,"created_at":"2025-09-03T12:05:07+08:00","updated_at":"2025-09-03T12:05:09+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36d09c25cfe091dd747beb96a8eec6c19e4892fb.webp?v=1756872309","variant_ids":[43675469906019]},"available":true,"name":"iPhone 12 mini Mod NX (MagSafe 兼容) 爽爽貓 by SECOND 好運發生 - 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-EA109","featured_media":{"alt":null,"id":25988705353827,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36d09c25cfe091dd747beb96a8eec6c19e4892fb.webp?v=1756872309"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43675469906019,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118424-EA109","requires_shipping":true,"taxable":true,"featured_image":{"id":34416430874723,"product_id":7876114841699,"position":9,"created_at":"2025-09-03T12:05:07+08:00","updated_at":"2025-09-03T12:05:09+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36d09c25cfe091dd747beb96a8eec6c19e4892fb.webp?v=1756872309","variant_ids":[43675469906019]},"available":true,"name":"iPhone 12 mini Mod NX (MagSafe 兼容) 爽爽貓 by SECOND 好運發生 - 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-EA109","featured_media":{"alt":null,"id":25988705353827,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36d09c25cfe091dd747beb96a8eec6c19e4892fb.webp?v=1756872309"}},"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: "停產" }