$product = {"id":7922011144291,"title":"iPhone 12 mini Mod NX (MagSafe 兼容) TOCOROCOMUGI 糰子貓","handle":"iphone-12-mini-mod-nx-magsafe-toc08","description":null,"published_at":"2025-11-14T08:13:34+08:00","created_at":"2025-11-13T10:30:40+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-tocorocomugi","device-iPhone 12 Mini","merge","reseller-tocorocomugi"],"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":43834899202147,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118424-TOC08","requires_shipping":true,"taxable":true,"featured_image":{"id":34794320986211,"product_id":7922011144291,"position":11,"created_at":"2025-11-13T10:30:53+08:00","updated_at":"2025-11-13T10:30:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7410509e005225821bf08ed944a72e3785c089b8.webp?v=1763001054","variant_ids":[43834899202147]},"available":true,"name":"iPhone 12 mini Mod NX (MagSafe 兼容) TOCOROCOMUGI 糰子貓 - 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-TOC08","featured_media":{"alt":null,"id":26359740170339,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7410509e005225821bf08ed944a72e3785c089b8.webp?v=1763001054"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf300c7b77aa03d1c8289adc40ea01a5fbaec90b.webp?v=1763001046","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2ec067a7df37040834e834f8bb47cab8f882e54.webp?v=1763001047","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b69b9e378971dda7ca3e74726816bb849013b74d.webp?v=1763001048","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01245944c021299485e5435f496e7025ddb4f0e1.webp?v=1763001049","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1be7a6a0aadb14be1aee21ec0a981fab090031cd.webp?v=1763001049","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/907adf8e11288d36180ea52ff3d14629b4569e92.webp?v=1763001050","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1e163be60c1ed5706ba5e1de623c08aa4e210d9.webp?v=1763001051","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/56b610bf1b64180f5349bc7557a16846c2149315.webp?v=1763001051","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d5863326b7cbc6551c781f968b71fb10854d672.webp?v=1763001052","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06cc6b27ee22b08df39050196c1784247e00af75.webp?v=1763001054","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7410509e005225821bf08ed944a72e3785c089b8.webp?v=1763001054"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf300c7b77aa03d1c8289adc40ea01a5fbaec90b.webp?v=1763001046","options":["color"],"media":[{"alt":null,"id":26359737712739,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf300c7b77aa03d1c8289adc40ea01a5fbaec90b.webp?v=1763001046"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf300c7b77aa03d1c8289adc40ea01a5fbaec90b.webp?v=1763001046","width":2000},{"alt":null,"id":26359737974883,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2ec067a7df37040834e834f8bb47cab8f882e54.webp?v=1763001047"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2ec067a7df37040834e834f8bb47cab8f882e54.webp?v=1763001047","width":2000},{"alt":null,"id":26359738171491,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b69b9e378971dda7ca3e74726816bb849013b74d.webp?v=1763001048"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b69b9e378971dda7ca3e74726816bb849013b74d.webp?v=1763001048","width":2000},{"alt":null,"id":26359738531939,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01245944c021299485e5435f496e7025ddb4f0e1.webp?v=1763001049"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01245944c021299485e5435f496e7025ddb4f0e1.webp?v=1763001049","width":2000},{"alt":null,"id":26359738794083,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1be7a6a0aadb14be1aee21ec0a981fab090031cd.webp?v=1763001049"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1be7a6a0aadb14be1aee21ec0a981fab090031cd.webp?v=1763001049","width":2000},{"alt":null,"id":26359738990691,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/907adf8e11288d36180ea52ff3d14629b4569e92.webp?v=1763001050"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/907adf8e11288d36180ea52ff3d14629b4569e92.webp?v=1763001050","width":2000},{"alt":null,"id":26359739121763,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1e163be60c1ed5706ba5e1de623c08aa4e210d9.webp?v=1763001051"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1e163be60c1ed5706ba5e1de623c08aa4e210d9.webp?v=1763001051","width":2000},{"alt":null,"id":26359739220067,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/56b610bf1b64180f5349bc7557a16846c2149315.webp?v=1763001051"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/56b610bf1b64180f5349bc7557a16846c2149315.webp?v=1763001051","width":2000},{"alt":null,"id":26359739383907,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d5863326b7cbc6551c781f968b71fb10854d672.webp?v=1763001052"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d5863326b7cbc6551c781f968b71fb10854d672.webp?v=1763001052","width":2000},{"alt":null,"id":26359739875427,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06cc6b27ee22b08df39050196c1784247e00af75.webp?v=1763001054"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06cc6b27ee22b08df39050196c1784247e00af75.webp?v=1763001054","width":2000},{"alt":null,"id":26359740170339,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7410509e005225821bf08ed944a72e3785c089b8.webp?v=1763001054"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7410509e005225821bf08ed944a72e3785c089b8.webp?v=1763001054","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":43834899202147,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118424-TOC08","requires_shipping":true,"taxable":true,"featured_image":{"id":34794320986211,"product_id":7922011144291,"position":11,"created_at":"2025-11-13T10:30:53+08:00","updated_at":"2025-11-13T10:30:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7410509e005225821bf08ed944a72e3785c089b8.webp?v=1763001054","variant_ids":[43834899202147]},"available":true,"name":"iPhone 12 mini Mod NX (MagSafe 兼容) TOCOROCOMUGI 糰子貓 - 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-TOC08","featured_media":{"alt":null,"id":26359740170339,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7410509e005225821bf08ed944a72e3785c089b8.webp?v=1763001054"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43834899202147,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118424-TOC08","requires_shipping":true,"taxable":true,"featured_image":{"id":34794320986211,"product_id":7922011144291,"position":11,"created_at":"2025-11-13T10:30:53+08:00","updated_at":"2025-11-13T10:30:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7410509e005225821bf08ed944a72e3785c089b8.webp?v=1763001054","variant_ids":[43834899202147]},"available":true,"name":"iPhone 12 mini Mod NX (MagSafe 兼容) TOCOROCOMUGI 糰子貓 - 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-TOC08","featured_media":{"alt":null,"id":26359740170339,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7410509e005225821bf08ed944a72e3785c089b8.webp?v=1763001054"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; $device_handle = null; $brand_handle = null; $type = ""; var sellingStatus // 只有設計款(SKU 含 '-')才需要合圖 if ($isMerge && $defaultVariant.sku.includes('-')) { $(document).ready(function() { var productImg = $product.images[0]; var bumperImg = window.getProductImageUrl($defaultVariant.sku.split('-')[0]); var layers = ($type === 'mod-nx-backplate' || $type === 'mod-backplate') ? [productImg, bumperImg] : [bumperImg, productImg]; window.mergeProductImages(layers).then(function (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: "停產" }