$product = {"id":7931231010915,"title":"iPhone 12 mini Mod NX (MagSafe 兼容) 白白日記 By Darylhochi Um...","handle":"iphone-12-mini-mod-nx-magsafe-ei82","description":null,"published_at":"2025-11-28T11:10:54+08:00","created_at":"2025-11-28T09:31:47+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-darylhochi","device-iPhone 12 Mini","merge","reseller-darylhochi"],"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":43860881997923,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118424-EI82","requires_shipping":true,"taxable":true,"featured_image":{"id":34861494665315,"product_id":7931231010915,"position":4,"created_at":"2025-11-28T10:10:24+08:00","updated_at":"2025-11-28T10:10:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1af7e6e43826c364d27a8ec0b1adc020d9062d00.webp?v=1764295826","variant_ids":[43860881997923]},"available":true,"name":"iPhone 12 mini Mod NX (MagSafe 兼容) 白白日記 By Darylhochi Um... - 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-EI82","featured_media":{"alt":null,"id":26425914196067,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1af7e6e43826c364d27a8ec0b1adc020d9062d00.webp?v=1764295826"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cefd63744f29aefcb07fed64e6f4b168a27ed596.webp?v=1764295819","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1992f7c65d90ad74b36b2f6d0332396fa812022.webp?v=1764295820","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc11b33a0bae9e4eac27e7b5fbdf7b00e5ac97c7.webp?v=1764295821","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1af7e6e43826c364d27a8ec0b1adc020d9062d00.webp?v=1764295826","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e270c25ef5f68c3fd96ac79b1553622f0673f0ae.webp?v=1764295829","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e4fc1e5b6134a6bcc61c17113c8765e286e5e59b.webp?v=1764295831","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3f84151dcdf1e3e8fee3549ae6da814dee61e0ed.webp?v=1764295831","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/deffa7e952624d20ce7da34cc75f554848c1e312.webp?v=1764295833","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c73500a4c2ad47265e264fd3b14b4269c9d15efb.webp?v=1764295833","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf529069b8051e1d9eb897611d83560a1a12ccb6.webp?v=1764295834","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf1c0209de4b418c2621f66f1f7c746208a10c68.webp?v=1764295834"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cefd63744f29aefcb07fed64e6f4b168a27ed596.webp?v=1764295819","options":["color"],"media":[{"alt":null,"id":26425913999459,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cefd63744f29aefcb07fed64e6f4b168a27ed596.webp?v=1764295819"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cefd63744f29aefcb07fed64e6f4b168a27ed596.webp?v=1764295819","width":2000},{"alt":null,"id":26425914064995,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1992f7c65d90ad74b36b2f6d0332396fa812022.webp?v=1764295820"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1992f7c65d90ad74b36b2f6d0332396fa812022.webp?v=1764295820","width":2000},{"alt":null,"id":26425914097763,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc11b33a0bae9e4eac27e7b5fbdf7b00e5ac97c7.webp?v=1764295821"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc11b33a0bae9e4eac27e7b5fbdf7b00e5ac97c7.webp?v=1764295821","width":2000},{"alt":null,"id":26425914196067,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1af7e6e43826c364d27a8ec0b1adc020d9062d00.webp?v=1764295826"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1af7e6e43826c364d27a8ec0b1adc020d9062d00.webp?v=1764295826","width":2000},{"alt":null,"id":26425914359907,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e270c25ef5f68c3fd96ac79b1553622f0673f0ae.webp?v=1764295829"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e270c25ef5f68c3fd96ac79b1553622f0673f0ae.webp?v=1764295829","width":2000},{"alt":null,"id":26425914490979,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e4fc1e5b6134a6bcc61c17113c8765e286e5e59b.webp?v=1764295831"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e4fc1e5b6134a6bcc61c17113c8765e286e5e59b.webp?v=1764295831","width":2000},{"alt":null,"id":26425914589283,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3f84151dcdf1e3e8fee3549ae6da814dee61e0ed.webp?v=1764295831"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3f84151dcdf1e3e8fee3549ae6da814dee61e0ed.webp?v=1764295831","width":2000},{"alt":null,"id":26425914687587,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/deffa7e952624d20ce7da34cc75f554848c1e312.webp?v=1764295833"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/deffa7e952624d20ce7da34cc75f554848c1e312.webp?v=1764295833","width":2000},{"alt":null,"id":26425914818659,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c73500a4c2ad47265e264fd3b14b4269c9d15efb.webp?v=1764295833"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c73500a4c2ad47265e264fd3b14b4269c9d15efb.webp?v=1764295833","width":2000},{"alt":null,"id":26425914851427,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf529069b8051e1d9eb897611d83560a1a12ccb6.webp?v=1764295834"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf529069b8051e1d9eb897611d83560a1a12ccb6.webp?v=1764295834","width":2000},{"alt":null,"id":26425914916963,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf1c0209de4b418c2621f66f1f7c746208a10c68.webp?v=1764295834"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf1c0209de4b418c2621f66f1f7c746208a10c68.webp?v=1764295834","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":43860881997923,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118424-EI82","requires_shipping":true,"taxable":true,"featured_image":{"id":34861494665315,"product_id":7931231010915,"position":4,"created_at":"2025-11-28T10:10:24+08:00","updated_at":"2025-11-28T10:10:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1af7e6e43826c364d27a8ec0b1adc020d9062d00.webp?v=1764295826","variant_ids":[43860881997923]},"available":true,"name":"iPhone 12 mini Mod NX (MagSafe 兼容) 白白日記 By Darylhochi Um... - 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-EI82","featured_media":{"alt":null,"id":26425914196067,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1af7e6e43826c364d27a8ec0b1adc020d9062d00.webp?v=1764295826"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43860881997923,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118424-EI82","requires_shipping":true,"taxable":true,"featured_image":{"id":34861494665315,"product_id":7931231010915,"position":4,"created_at":"2025-11-28T10:10:24+08:00","updated_at":"2025-11-28T10:10:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1af7e6e43826c364d27a8ec0b1adc020d9062d00.webp?v=1764295826","variant_ids":[43860881997923]},"available":true,"name":"iPhone 12 mini Mod NX (MagSafe 兼容) 白白日記 By Darylhochi Um... - 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-EI82","featured_media":{"alt":null,"id":26425914196067,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1af7e6e43826c364d27a8ec0b1adc020d9062d00.webp?v=1764295826"}},"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: "停產"
}