$product = {"id":7937572995171,"title":"iPhone 12 mini Mod NX Jin Young Choi 毛茸茸狗狗圖書館","handle":"iphone-12-mini-mod-nx-cjy12","description":null,"published_at":"2025-12-12T09:47:27+08:00","created_at":"2025-12-11T09:50:41+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-jychoioioi","device-iPhone 12 Mini","merge","reseller-jychoioioi"],"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":43883027988579,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-CJY12","requires_shipping":true,"taxable":true,"featured_image":{"id":34930913017955,"product_id":7937572995171,"position":3,"created_at":"2025-12-11T09:50:47+08:00","updated_at":"2025-12-11T09:50:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c9ea8e2da207b4d7c7ee787d32e3dce9722a2c47.webp?v=1765417849","variant_ids":[43883027988579]},"available":true,"name":"iPhone 12 mini Mod NX Jin Young Choi 毛茸茸狗狗圖書館 - 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-CJY12","featured_media":{"alt":null,"id":26493287432291,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c9ea8e2da207b4d7c7ee787d32e3dce9722a2c47.webp?v=1765417849"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b269d0d61b27cf4d8e0407eb6d18bc6f34a69023.webp?v=1765417847","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cbf8cc8d7f2c30c406254bb5a39fee814ad0ed19.webp?v=1765417848","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c9ea8e2da207b4d7c7ee787d32e3dce9722a2c47.webp?v=1765417849","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/97a9b0b7321f9d19889aa7af2928710f34d6161b.webp?v=1765417849","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b3f28deea2bf133813b9faa8e973f8d3dfed8ad9.webp?v=1765417849","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c282fe2c5d3c3a94159b3d9d97c1b9688de74c0.webp?v=1765417850","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c933578a519dd5b9b6ae17afcb8a52a2fe66aede.webp?v=1765417851","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc32ac48462a47b8a9fc847f23eb3c1f6dddfe0f.webp?v=1765417851","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e61dd0e05e574dd0bb1eb3e6e28a253cab0bb875.webp?v=1765417852","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b61e99addfdaefc506b1ae95cb2cdd13e20ad5b3.webp?v=1765417852","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40f0408786dd448b58560d061b4c8a50bce3713d.webp?v=1765417853"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b269d0d61b27cf4d8e0407eb6d18bc6f34a69023.webp?v=1765417847","options":["color"],"media":[{"alt":null,"id":26493287170147,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b269d0d61b27cf4d8e0407eb6d18bc6f34a69023.webp?v=1765417847"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b269d0d61b27cf4d8e0407eb6d18bc6f34a69023.webp?v=1765417847","width":2000},{"alt":null,"id":26493287301219,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cbf8cc8d7f2c30c406254bb5a39fee814ad0ed19.webp?v=1765417848"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cbf8cc8d7f2c30c406254bb5a39fee814ad0ed19.webp?v=1765417848","width":2000},{"alt":null,"id":26493287432291,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c9ea8e2da207b4d7c7ee787d32e3dce9722a2c47.webp?v=1765417849"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c9ea8e2da207b4d7c7ee787d32e3dce9722a2c47.webp?v=1765417849","width":2000},{"alt":null,"id":26493287628899,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/97a9b0b7321f9d19889aa7af2928710f34d6161b.webp?v=1765417849"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/97a9b0b7321f9d19889aa7af2928710f34d6161b.webp?v=1765417849","width":2000},{"alt":null,"id":26493287759971,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b3f28deea2bf133813b9faa8e973f8d3dfed8ad9.webp?v=1765417849"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b3f28deea2bf133813b9faa8e973f8d3dfed8ad9.webp?v=1765417849","width":2000},{"alt":null,"id":26493287956579,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c282fe2c5d3c3a94159b3d9d97c1b9688de74c0.webp?v=1765417850"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c282fe2c5d3c3a94159b3d9d97c1b9688de74c0.webp?v=1765417850","width":2000},{"alt":null,"id":26493288054883,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c933578a519dd5b9b6ae17afcb8a52a2fe66aede.webp?v=1765417851"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c933578a519dd5b9b6ae17afcb8a52a2fe66aede.webp?v=1765417851","width":2000},{"alt":null,"id":26493288251491,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc32ac48462a47b8a9fc847f23eb3c1f6dddfe0f.webp?v=1765417851"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc32ac48462a47b8a9fc847f23eb3c1f6dddfe0f.webp?v=1765417851","width":2000},{"alt":null,"id":26493288546403,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e61dd0e05e574dd0bb1eb3e6e28a253cab0bb875.webp?v=1765417852"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e61dd0e05e574dd0bb1eb3e6e28a253cab0bb875.webp?v=1765417852","width":2000},{"alt":null,"id":26493288743011,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b61e99addfdaefc506b1ae95cb2cdd13e20ad5b3.webp?v=1765417852"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b61e99addfdaefc506b1ae95cb2cdd13e20ad5b3.webp?v=1765417852","width":2000},{"alt":null,"id":26493289005155,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40f0408786dd448b58560d061b4c8a50bce3713d.webp?v=1765417853"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40f0408786dd448b58560d061b4c8a50bce3713d.webp?v=1765417853","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$bumper = null;
$variants = [{"id":43883027988579,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-CJY12","requires_shipping":true,"taxable":true,"featured_image":{"id":34930913017955,"product_id":7937572995171,"position":3,"created_at":"2025-12-11T09:50:47+08:00","updated_at":"2025-12-11T09:50:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c9ea8e2da207b4d7c7ee787d32e3dce9722a2c47.webp?v=1765417849","variant_ids":[43883027988579]},"available":true,"name":"iPhone 12 mini Mod NX Jin Young Choi 毛茸茸狗狗圖書館 - 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-CJY12","featured_media":{"alt":null,"id":26493287432291,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c9ea8e2da207b4d7c7ee787d32e3dce9722a2c47.webp?v=1765417849"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43883027988579,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-CJY12","requires_shipping":true,"taxable":true,"featured_image":{"id":34930913017955,"product_id":7937572995171,"position":3,"created_at":"2025-12-11T09:50:47+08:00","updated_at":"2025-12-11T09:50:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c9ea8e2da207b4d7c7ee787d32e3dce9722a2c47.webp?v=1765417849","variant_ids":[43883027988579]},"available":true,"name":"iPhone 12 mini Mod NX Jin Young Choi 毛茸茸狗狗圖書館 - 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-CJY12","featured_media":{"alt":null,"id":26493287432291,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c9ea8e2da207b4d7c7ee787d32e3dce9722a2c47.webp?v=1765417849"}},"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: "停產"
}