$product = {"id":7888609443939,"title":"iPhone 12 Pro Max Mod NX 餃貓FAMILY 餃貓 LUCKY CAT","handle":"iphone-12-pro-max-mod-nx-printable-dm04","description":null,"published_at":"2025-09-23T09:03:48+08:00","created_at":"2025-09-22T16:49:38+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-dumplingcat","device-iPhone 12 Pro Max","merge","reseller-dumplingcat"],"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":43743748128867,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118724-DM04","requires_shipping":true,"taxable":true,"featured_image":{"id":34515712540771,"product_id":7888609443939,"position":3,"created_at":"2025-09-22T16:49:43+08:00","updated_at":"2025-09-22T16:49:45+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37dd6fa70700a40bce2fb9851ab5f968946ac184.webp?v=1758530985","variant_ids":[43743748128867]},"available":true,"name":"iPhone 12 Pro Max Mod NX 餃貓FAMILY 餃貓 LUCKY CAT - Black","public_title":"Black","options":["Black"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118724-DM04","featured_media":{"alt":null,"id":26086150111331,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37dd6fa70700a40bce2fb9851ab5f968946ac184.webp?v=1758530985"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c96a251336865c7176dc51f42fc502e82fc2d31d.webp?v=1758530984","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77a9f25fa0e66c0aed546e0b606aca6a4d6996cf.webp?v=1758530984","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37dd6fa70700a40bce2fb9851ab5f968946ac184.webp?v=1758530985","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06ac4b04f28b977d4a6fa8fc3320cd878d18188a.webp?v=1758530985","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9318825f103641599540a28a96a6d9cba5bc7844.webp?v=1758530986","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a85ac16405cd849dfa4a8f5ceba3bb5d4c56f96.webp?v=1758530986","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/25cda20ee9d3573b4c422fc6f624f00963b25c1c.webp?v=1758530987","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be3eb3ea4e2c00e2271f5c968c2867d71f75e019.webp?v=1758530987","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a662215789be30858e9b31b3b8f846c3ab750def.webp?v=1758530988"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c96a251336865c7176dc51f42fc502e82fc2d31d.webp?v=1758530984","options":["color"],"media":[{"alt":null,"id":26086149226595,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c96a251336865c7176dc51f42fc502e82fc2d31d.webp?v=1758530984"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c96a251336865c7176dc51f42fc502e82fc2d31d.webp?v=1758530984","width":2000},{"alt":null,"id":26086149718115,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77a9f25fa0e66c0aed546e0b606aca6a4d6996cf.webp?v=1758530984"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77a9f25fa0e66c0aed546e0b606aca6a4d6996cf.webp?v=1758530984","width":2000},{"alt":null,"id":26086150111331,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37dd6fa70700a40bce2fb9851ab5f968946ac184.webp?v=1758530985"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37dd6fa70700a40bce2fb9851ab5f968946ac184.webp?v=1758530985","width":2000},{"alt":null,"id":26086150471779,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06ac4b04f28b977d4a6fa8fc3320cd878d18188a.webp?v=1758530985"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06ac4b04f28b977d4a6fa8fc3320cd878d18188a.webp?v=1758530985","width":2000},{"alt":null,"id":26086151061603,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9318825f103641599540a28a96a6d9cba5bc7844.webp?v=1758530986"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9318825f103641599540a28a96a6d9cba5bc7844.webp?v=1758530986","width":2000},{"alt":null,"id":26086151356515,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a85ac16405cd849dfa4a8f5ceba3bb5d4c56f96.webp?v=1758530986"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a85ac16405cd849dfa4a8f5ceba3bb5d4c56f96.webp?v=1758530986","width":2000},{"alt":null,"id":26086151585891,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/25cda20ee9d3573b4c422fc6f624f00963b25c1c.webp?v=1758530987"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/25cda20ee9d3573b4c422fc6f624f00963b25c1c.webp?v=1758530987","width":2000},{"alt":null,"id":26086151815267,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be3eb3ea4e2c00e2271f5c968c2867d71f75e019.webp?v=1758530987"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be3eb3ea4e2c00e2271f5c968c2867d71f75e019.webp?v=1758530987","width":2000},{"alt":null,"id":26086152011875,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a662215789be30858e9b31b3b8f846c3ab750def.webp?v=1758530988"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a662215789be30858e9b31b3b8f846c3ab750def.webp?v=1758530988","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":43743748128867,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118724-DM04","requires_shipping":true,"taxable":true,"featured_image":{"id":34515712540771,"product_id":7888609443939,"position":3,"created_at":"2025-09-22T16:49:43+08:00","updated_at":"2025-09-22T16:49:45+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37dd6fa70700a40bce2fb9851ab5f968946ac184.webp?v=1758530985","variant_ids":[43743748128867]},"available":true,"name":"iPhone 12 Pro Max Mod NX 餃貓FAMILY 餃貓 LUCKY CAT - Black","public_title":"Black","options":["Black"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118724-DM04","featured_media":{"alt":null,"id":26086150111331,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37dd6fa70700a40bce2fb9851ab5f968946ac184.webp?v=1758530985"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43743748128867,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118724-DM04","requires_shipping":true,"taxable":true,"featured_image":{"id":34515712540771,"product_id":7888609443939,"position":3,"created_at":"2025-09-22T16:49:43+08:00","updated_at":"2025-09-22T16:49:45+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37dd6fa70700a40bce2fb9851ab5f968946ac184.webp?v=1758530985","variant_ids":[43743748128867]},"available":true,"name":"iPhone 12 Pro Max Mod NX 餃貓FAMILY 餃貓 LUCKY CAT - Black","public_title":"Black","options":["Black"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118724-DM04","featured_media":{"alt":null,"id":26086150111331,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37dd6fa70700a40bce2fb9851ab5f968946ac184.webp?v=1758530985"}},"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: "停產"
}