$product = {"id":7888626942051,"title":"iPhone 12 mini Mod NX 餃貓FAMILY 餃貓一家","handle":"iphone-12-mini-mod-nx-printable-dm03","description":null,"published_at":"2025-09-23T09:01:45+08:00","created_at":"2025-09-22T16:53:25+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-dumplingcat","device-iPhone 12 Mini","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":43743822839907,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-DM03","requires_shipping":true,"taxable":true,"featured_image":{"id":34515799474275,"product_id":7888626942051,"position":9,"created_at":"2025-09-22T16:53:34+08:00","updated_at":"2025-09-22T16:53:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e94c61af58e35516bf3a588058cc7b8d0a767f9.webp?v=1758531215","variant_ids":[43743822839907]},"available":true,"name":"iPhone 12 mini Mod NX 餃貓FAMILY 餃貓一家 - 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-DM03","featured_media":{"alt":null,"id":26086236684387,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e94c61af58e35516bf3a588058cc7b8d0a767f9.webp?v=1758531215"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e90532e167ae56668557f2fc306dd4aa150d6c84.webp?v=1758531212","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a97a9b78dfa139ce0472f147d1a8442ade27f75.webp?v=1758531212","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/182ec874859ed7ddfc8c5bc2d910e7c1775731da.webp?v=1758531213","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e89b86fc3a21def80a2b3af7a6af181fd1be3a1d.webp?v=1758531213","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/726beb8f6b2e95976ed96d1a5f8ea0ca934d7735.webp?v=1758531214","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/134ba64f98b9d122668ded9d30ddda389b976da3.webp?v=1758531214","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a840bbb957a74ce6133b8f92740b331fa9f9723.webp?v=1758531214","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1cc01615d9fdb4c22f4b88f5fbdfddc5c7473a7e.webp?v=1758531215","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e94c61af58e35516bf3a588058cc7b8d0a767f9.webp?v=1758531215","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d00f95d8a86dd2e1b87a3c1c43a9d9f32f4aaa1.webp?v=1758531216","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/750e4fdd275a84943cf612ed802f2ed131e14aae.webp?v=1758531217"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e90532e167ae56668557f2fc306dd4aa150d6c84.webp?v=1758531212","options":["color"],"media":[{"alt":null,"id":26086234947683,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e90532e167ae56668557f2fc306dd4aa150d6c84.webp?v=1758531212"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e90532e167ae56668557f2fc306dd4aa150d6c84.webp?v=1758531212","width":2000},{"alt":null,"id":26086235209827,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a97a9b78dfa139ce0472f147d1a8442ade27f75.webp?v=1758531212"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a97a9b78dfa139ce0472f147d1a8442ade27f75.webp?v=1758531212","width":2000},{"alt":null,"id":26086235340899,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/182ec874859ed7ddfc8c5bc2d910e7c1775731da.webp?v=1758531213"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/182ec874859ed7ddfc8c5bc2d910e7c1775731da.webp?v=1758531213","width":2000},{"alt":null,"id":26086235537507,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e89b86fc3a21def80a2b3af7a6af181fd1be3a1d.webp?v=1758531213"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e89b86fc3a21def80a2b3af7a6af181fd1be3a1d.webp?v=1758531213","width":2000},{"alt":null,"id":26086236061795,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/726beb8f6b2e95976ed96d1a5f8ea0ca934d7735.webp?v=1758531214"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/726beb8f6b2e95976ed96d1a5f8ea0ca934d7735.webp?v=1758531214","width":2000},{"alt":null,"id":26086236225635,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/134ba64f98b9d122668ded9d30ddda389b976da3.webp?v=1758531214"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/134ba64f98b9d122668ded9d30ddda389b976da3.webp?v=1758531214","width":2000},{"alt":null,"id":26086236356707,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a840bbb957a74ce6133b8f92740b331fa9f9723.webp?v=1758531214"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a840bbb957a74ce6133b8f92740b331fa9f9723.webp?v=1758531214","width":2000},{"alt":null,"id":26086236553315,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1cc01615d9fdb4c22f4b88f5fbdfddc5c7473a7e.webp?v=1758531215"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1cc01615d9fdb4c22f4b88f5fbdfddc5c7473a7e.webp?v=1758531215","width":2000},{"alt":null,"id":26086236684387,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e94c61af58e35516bf3a588058cc7b8d0a767f9.webp?v=1758531215"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e94c61af58e35516bf3a588058cc7b8d0a767f9.webp?v=1758531215","width":2000},{"alt":null,"id":26086236815459,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d00f95d8a86dd2e1b87a3c1c43a9d9f32f4aaa1.webp?v=1758531216"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d00f95d8a86dd2e1b87a3c1c43a9d9f32f4aaa1.webp?v=1758531216","width":2000},{"alt":null,"id":26086236913763,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/750e4fdd275a84943cf612ed802f2ed131e14aae.webp?v=1758531217"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/750e4fdd275a84943cf612ed802f2ed131e14aae.webp?v=1758531217","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$bumper = null;
$variants = [{"id":43743822839907,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-DM03","requires_shipping":true,"taxable":true,"featured_image":{"id":34515799474275,"product_id":7888626942051,"position":9,"created_at":"2025-09-22T16:53:34+08:00","updated_at":"2025-09-22T16:53:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e94c61af58e35516bf3a588058cc7b8d0a767f9.webp?v=1758531215","variant_ids":[43743822839907]},"available":true,"name":"iPhone 12 mini Mod NX 餃貓FAMILY 餃貓一家 - 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-DM03","featured_media":{"alt":null,"id":26086236684387,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e94c61af58e35516bf3a588058cc7b8d0a767f9.webp?v=1758531215"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43743822839907,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-DM03","requires_shipping":true,"taxable":true,"featured_image":{"id":34515799474275,"product_id":7888626942051,"position":9,"created_at":"2025-09-22T16:53:34+08:00","updated_at":"2025-09-22T16:53:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e94c61af58e35516bf3a588058cc7b8d0a767f9.webp?v=1758531215","variant_ids":[43743822839907]},"available":true,"name":"iPhone 12 mini Mod NX 餃貓FAMILY 餃貓一家 - 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-DM03","featured_media":{"alt":null,"id":26086236684387,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e94c61af58e35516bf3a588058cc7b8d0a767f9.webp?v=1758531215"}},"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: "停產"
}