$product = {"id":7920417570915,"title":"iPhone 12 mini Mod NX 小貓貓們 Little Cattos Sunflowers","handle":"iphone-12-mini-mod-nx-ltc08","description":null,"published_at":"2025-11-11T09:15:47+08:00","created_at":"2025-11-10T11:19:20+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-littlecattos","device-iPhone 12 Mini","merge","reseller-littlecattos"],"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":43828537065571,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-LTC08","requires_shipping":true,"taxable":true,"featured_image":{"id":34781074784355,"product_id":7920417570915,"position":6,"created_at":"2025-11-10T11:19:24+08:00","updated_at":"2025-11-10T11:19:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/831743ea64a5f359a0bd4b5098aa77b7fa7f1bf4.webp?v=1762744766","variant_ids":[43828537065571]},"available":true,"name":"iPhone 12 mini Mod NX 小貓貓們 Little Cattos Sunflowers - 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-LTC08","featured_media":{"alt":null,"id":26347151458403,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/831743ea64a5f359a0bd4b5098aa77b7fa7f1bf4.webp?v=1762744766"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/885f5f44c1829f2e4b1d510bf6d50c7f19c79670.webp?v=1762744763","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf7c3c0024364665510f36665be03bc8fcdbd615.webp?v=1762744764","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a7014a6fa0976e73c43a76997091eb6f54f735f.webp?v=1762744764","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1dfd9d32dd23f59658bc6ffaa7f232bdf08b6d36.webp?v=1762744765","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23ee85de1dad2f2d36ff1ccc3503b77ea29f5a67.webp?v=1762744766","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/831743ea64a5f359a0bd4b5098aa77b7fa7f1bf4.webp?v=1762744766","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0fa0372f3a0dbc4311c1bc615bad30f53ae9fb6d.webp?v=1762744767","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/966fdbb11b69a10d69b50b061f29c32bb44b741c.webp?v=1762744768","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65d61c9b56e7e11e75e51bc7ac77fd81936cd1d0.webp?v=1762744768","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51758c271956366385e35e0af37d635f4c8afd03.webp?v=1762744769","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/606883776a37a7792a59192f651f1678857e0cfd.webp?v=1762744770"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/885f5f44c1829f2e4b1d510bf6d50c7f19c79670.webp?v=1762744763","options":["color"],"media":[{"alt":null,"id":26347150213219,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/885f5f44c1829f2e4b1d510bf6d50c7f19c79670.webp?v=1762744763"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/885f5f44c1829f2e4b1d510bf6d50c7f19c79670.webp?v=1762744763","width":2000},{"alt":null,"id":26347150475363,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf7c3c0024364665510f36665be03bc8fcdbd615.webp?v=1762744764"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf7c3c0024364665510f36665be03bc8fcdbd615.webp?v=1762744764","width":2000},{"alt":null,"id":26347150737507,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a7014a6fa0976e73c43a76997091eb6f54f735f.webp?v=1762744764"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a7014a6fa0976e73c43a76997091eb6f54f735f.webp?v=1762744764","width":2000},{"alt":null,"id":26347151065187,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1dfd9d32dd23f59658bc6ffaa7f232bdf08b6d36.webp?v=1762744765"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1dfd9d32dd23f59658bc6ffaa7f232bdf08b6d36.webp?v=1762744765","width":2000},{"alt":null,"id":26347151294563,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23ee85de1dad2f2d36ff1ccc3503b77ea29f5a67.webp?v=1762744766"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23ee85de1dad2f2d36ff1ccc3503b77ea29f5a67.webp?v=1762744766","width":2000},{"alt":null,"id":26347151458403,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/831743ea64a5f359a0bd4b5098aa77b7fa7f1bf4.webp?v=1762744766"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/831743ea64a5f359a0bd4b5098aa77b7fa7f1bf4.webp?v=1762744766","width":2000},{"alt":null,"id":26347151589475,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0fa0372f3a0dbc4311c1bc615bad30f53ae9fb6d.webp?v=1762744767"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0fa0372f3a0dbc4311c1bc615bad30f53ae9fb6d.webp?v=1762744767","width":2000},{"alt":null,"id":26347151753315,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/966fdbb11b69a10d69b50b061f29c32bb44b741c.webp?v=1762744768"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/966fdbb11b69a10d69b50b061f29c32bb44b741c.webp?v=1762744768","width":2000},{"alt":null,"id":26347151917155,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65d61c9b56e7e11e75e51bc7ac77fd81936cd1d0.webp?v=1762744768"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65d61c9b56e7e11e75e51bc7ac77fd81936cd1d0.webp?v=1762744768","width":2000},{"alt":null,"id":26347152015459,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51758c271956366385e35e0af37d635f4c8afd03.webp?v=1762744769"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51758c271956366385e35e0af37d635f4c8afd03.webp?v=1762744769","width":2000},{"alt":null,"id":26347152113763,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/606883776a37a7792a59192f651f1678857e0cfd.webp?v=1762744770"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/606883776a37a7792a59192f651f1678857e0cfd.webp?v=1762744770","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":43828537065571,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-LTC08","requires_shipping":true,"taxable":true,"featured_image":{"id":34781074784355,"product_id":7920417570915,"position":6,"created_at":"2025-11-10T11:19:24+08:00","updated_at":"2025-11-10T11:19:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/831743ea64a5f359a0bd4b5098aa77b7fa7f1bf4.webp?v=1762744766","variant_ids":[43828537065571]},"available":true,"name":"iPhone 12 mini Mod NX 小貓貓們 Little Cattos Sunflowers - 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-LTC08","featured_media":{"alt":null,"id":26347151458403,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/831743ea64a5f359a0bd4b5098aa77b7fa7f1bf4.webp?v=1762744766"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43828537065571,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-LTC08","requires_shipping":true,"taxable":true,"featured_image":{"id":34781074784355,"product_id":7920417570915,"position":6,"created_at":"2025-11-10T11:19:24+08:00","updated_at":"2025-11-10T11:19:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/831743ea64a5f359a0bd4b5098aa77b7fa7f1bf4.webp?v=1762744766","variant_ids":[43828537065571]},"available":true,"name":"iPhone 12 mini Mod NX 小貓貓們 Little Cattos Sunflowers - 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-LTC08","featured_media":{"alt":null,"id":26347151458403,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/831743ea64a5f359a0bd4b5098aa77b7fa7f1bf4.webp?v=1762744766"}},"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: "停產"
}