$product = {"id":7893871362147,"title":"iPhone 12 mini Mod NX Chubbynida 烈焰海之舞","handle":"iphone-12-mini-mod-nx-printable-chu06","description":null,"published_at":"2025-10-09T09:22:11+08:00","created_at":"2025-10-07T10:33:13+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-chubbynida","device-iPhone 12 Mini","merge","reseller-chubbynida"],"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":43763596820579,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-CHU06","requires_shipping":true,"taxable":true,"featured_image":{"id":34553324470371,"product_id":7893871362147,"position":11,"created_at":"2025-10-07T10:33:21+08:00","updated_at":"2025-10-07T10:33:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ff8d56096b642a2c5cf3ece6fa585707b4c455b.webp?v=1759804403","variant_ids":[43763596820579]},"available":true,"name":"iPhone 12 mini Mod NX Chubbynida 烈焰海之舞 - 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-CHU06","featured_media":{"alt":null,"id":26122972102755,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ff8d56096b642a2c5cf3ece6fa585707b4c455b.webp?v=1759804403"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9173bf4ada796d8502858c83d91d230445c6a393.webp?v=1759804396","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d099c83048920551436a472fed4ba770a146ee8.webp?v=1759804397","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/81e02670abdc9f203829c2585c2ac53c331e34d8.webp?v=1759804397","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fdecb273a1c3c49c32925e8911c07b50f9b560b1.webp?v=1759804398","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1db539dae1ad061048908812ec6ccfd5aac243ff.webp?v=1759804399","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5ed81c73dac22c7e341d53c1234b7c5c45739a12.webp?v=1759804400","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/47fe10fefa36ca9b611a48abf85e6b0dc3c8a485.webp?v=1759804400","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0bca27d0ac43d7449a1f1d4034b17e361feb0a79.webp?v=1759804401","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcb67223bd996c1271ac9654b4aee1218beafba2.webp?v=1759804401","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7e7b2fe591845caca7bd1151af988f50d990061d.webp?v=1759804402","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ff8d56096b642a2c5cf3ece6fa585707b4c455b.webp?v=1759804403"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9173bf4ada796d8502858c83d91d230445c6a393.webp?v=1759804396","options":["color"],"media":[{"alt":null,"id":26122969907299,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9173bf4ada796d8502858c83d91d230445c6a393.webp?v=1759804396"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9173bf4ada796d8502858c83d91d230445c6a393.webp?v=1759804396","width":2000},{"alt":null,"id":26122970136675,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d099c83048920551436a472fed4ba770a146ee8.webp?v=1759804397"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d099c83048920551436a472fed4ba770a146ee8.webp?v=1759804397","width":2000},{"alt":null,"id":26122970398819,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/81e02670abdc9f203829c2585c2ac53c331e34d8.webp?v=1759804397"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/81e02670abdc9f203829c2585c2ac53c331e34d8.webp?v=1759804397","width":2000},{"alt":null,"id":26122970628195,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fdecb273a1c3c49c32925e8911c07b50f9b560b1.webp?v=1759804398"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fdecb273a1c3c49c32925e8911c07b50f9b560b1.webp?v=1759804398","width":2000},{"alt":null,"id":26122970890339,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1db539dae1ad061048908812ec6ccfd5aac243ff.webp?v=1759804399"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1db539dae1ad061048908812ec6ccfd5aac243ff.webp?v=1759804399","width":2000},{"alt":null,"id":26122971086947,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5ed81c73dac22c7e341d53c1234b7c5c45739a12.webp?v=1759804400"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5ed81c73dac22c7e341d53c1234b7c5c45739a12.webp?v=1759804400","width":2000},{"alt":null,"id":26122971250787,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/47fe10fefa36ca9b611a48abf85e6b0dc3c8a485.webp?v=1759804400"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/47fe10fefa36ca9b611a48abf85e6b0dc3c8a485.webp?v=1759804400","width":2000},{"alt":null,"id":26122971447395,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0bca27d0ac43d7449a1f1d4034b17e361feb0a79.webp?v=1759804401"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0bca27d0ac43d7449a1f1d4034b17e361feb0a79.webp?v=1759804401","width":2000},{"alt":null,"id":26122971709539,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcb67223bd996c1271ac9654b4aee1218beafba2.webp?v=1759804401"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcb67223bd996c1271ac9654b4aee1218beafba2.webp?v=1759804401","width":2000},{"alt":null,"id":26122971938915,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7e7b2fe591845caca7bd1151af988f50d990061d.webp?v=1759804402"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7e7b2fe591845caca7bd1151af988f50d990061d.webp?v=1759804402","width":2000},{"alt":null,"id":26122972102755,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ff8d56096b642a2c5cf3ece6fa585707b4c455b.webp?v=1759804403"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ff8d56096b642a2c5cf3ece6fa585707b4c455b.webp?v=1759804403","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":43763596820579,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-CHU06","requires_shipping":true,"taxable":true,"featured_image":{"id":34553324470371,"product_id":7893871362147,"position":11,"created_at":"2025-10-07T10:33:21+08:00","updated_at":"2025-10-07T10:33:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ff8d56096b642a2c5cf3ece6fa585707b4c455b.webp?v=1759804403","variant_ids":[43763596820579]},"available":true,"name":"iPhone 12 mini Mod NX Chubbynida 烈焰海之舞 - 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-CHU06","featured_media":{"alt":null,"id":26122972102755,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ff8d56096b642a2c5cf3ece6fa585707b4c455b.webp?v=1759804403"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43763596820579,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-CHU06","requires_shipping":true,"taxable":true,"featured_image":{"id":34553324470371,"product_id":7893871362147,"position":11,"created_at":"2025-10-07T10:33:21+08:00","updated_at":"2025-10-07T10:33:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ff8d56096b642a2c5cf3ece6fa585707b4c455b.webp?v=1759804403","variant_ids":[43763596820579]},"available":true,"name":"iPhone 12 mini Mod NX Chubbynida 烈焰海之舞 - 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-CHU06","featured_media":{"alt":null,"id":26122972102755,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ff8d56096b642a2c5cf3ece6fa585707b4c455b.webp?v=1759804403"}},"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: "停產"
}