$product = {"id":7937960181859,"title":"iPhone 12 mini Mod NX 進擊的巨人 Attack on Titan 城牆保衛戰","handle":"iphone-12-mini-mod-nx-xu02","description":null,"published_at":"2025-12-12T10:23:58+08:00","created_at":"2025-12-11T16:07:51+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-attack-on-titan","device-iPhone 12 Mini","merge","reseller-attack-on-titan"],"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":43884567199843,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-XU02","requires_shipping":true,"taxable":true,"featured_image":{"id":34933255831651,"product_id":7937960181859,"position":11,"created_at":"2025-12-11T16:08:00+08:00","updated_at":"2025-12-11T16:08:03+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a75ea75584a65814a7a4a6b0711d9cfabc923d1.webp?v=1765440483","variant_ids":[43884567199843]},"available":true,"name":"iPhone 12 mini Mod NX 進擊的巨人 Attack on Titan 城牆保衛戰 - 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-XU02","featured_media":{"alt":null,"id":26495627427939,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a75ea75584a65814a7a4a6b0711d9cfabc923d1.webp?v=1765440483"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c9f827964a828ff422c3a88976b823871cfeed9.webp?v=1765440478","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdc296d47e751b4f7839bd244fce8bc67a742be2.webp?v=1765440478","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a1a08470427a0a66744913715650f0dec2d5a64.webp?v=1765440479","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9162f729a3b3486717a3b10115bad52206604772.webp?v=1765440480","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c96b5872c86023a5be8afa94d4a552265d6ef6c9.webp?v=1765440480","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83d1ea0571ec6a665fa60cca0de9bce08c7f03e8.webp?v=1765440480","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f8de578a4a93a92f7a3dbd0c18fa70d32746726.webp?v=1765440481","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d03e89a234f827bdfec7fe5a06de2d2d416ecb8a.webp?v=1765440481","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db2e401b0267292e287aec03865eb55849aa6168.webp?v=1765440482","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d4919d27884d0491117006afe71812ba90cdbec9.webp?v=1765440482","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a75ea75584a65814a7a4a6b0711d9cfabc923d1.webp?v=1765440483"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c9f827964a828ff422c3a88976b823871cfeed9.webp?v=1765440478","options":["color"],"media":[{"alt":null,"id":26495625855075,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c9f827964a828ff422c3a88976b823871cfeed9.webp?v=1765440478"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c9f827964a828ff422c3a88976b823871cfeed9.webp?v=1765440478","width":2000},{"alt":null,"id":26495626051683,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdc296d47e751b4f7839bd244fce8bc67a742be2.webp?v=1765440478"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdc296d47e751b4f7839bd244fce8bc67a742be2.webp?v=1765440478","width":2000},{"alt":null,"id":26495626215523,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a1a08470427a0a66744913715650f0dec2d5a64.webp?v=1765440479"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a1a08470427a0a66744913715650f0dec2d5a64.webp?v=1765440479","width":2000},{"alt":null,"id":26495626346595,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9162f729a3b3486717a3b10115bad52206604772.webp?v=1765440480"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9162f729a3b3486717a3b10115bad52206604772.webp?v=1765440480","width":2000},{"alt":null,"id":26495626543203,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c96b5872c86023a5be8afa94d4a552265d6ef6c9.webp?v=1765440480"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c96b5872c86023a5be8afa94d4a552265d6ef6c9.webp?v=1765440480","width":2000},{"alt":null,"id":26495626707043,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83d1ea0571ec6a665fa60cca0de9bce08c7f03e8.webp?v=1765440480"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83d1ea0571ec6a665fa60cca0de9bce08c7f03e8.webp?v=1765440480","width":2000},{"alt":null,"id":26495626870883,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f8de578a4a93a92f7a3dbd0c18fa70d32746726.webp?v=1765440481"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f8de578a4a93a92f7a3dbd0c18fa70d32746726.webp?v=1765440481","width":2000},{"alt":null,"id":26495627034723,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d03e89a234f827bdfec7fe5a06de2d2d416ecb8a.webp?v=1765440481"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d03e89a234f827bdfec7fe5a06de2d2d416ecb8a.webp?v=1765440481","width":2000},{"alt":null,"id":26495627100259,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db2e401b0267292e287aec03865eb55849aa6168.webp?v=1765440482"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db2e401b0267292e287aec03865eb55849aa6168.webp?v=1765440482","width":2000},{"alt":null,"id":26495627198563,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d4919d27884d0491117006afe71812ba90cdbec9.webp?v=1765440482"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d4919d27884d0491117006afe71812ba90cdbec9.webp?v=1765440482","width":2000},{"alt":null,"id":26495627427939,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a75ea75584a65814a7a4a6b0711d9cfabc923d1.webp?v=1765440483"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a75ea75584a65814a7a4a6b0711d9cfabc923d1.webp?v=1765440483","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":43884567199843,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-XU02","requires_shipping":true,"taxable":true,"featured_image":{"id":34933255831651,"product_id":7937960181859,"position":11,"created_at":"2025-12-11T16:08:00+08:00","updated_at":"2025-12-11T16:08:03+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a75ea75584a65814a7a4a6b0711d9cfabc923d1.webp?v=1765440483","variant_ids":[43884567199843]},"available":true,"name":"iPhone 12 mini Mod NX 進擊的巨人 Attack on Titan 城牆保衛戰 - 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-XU02","featured_media":{"alt":null,"id":26495627427939,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a75ea75584a65814a7a4a6b0711d9cfabc923d1.webp?v=1765440483"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43884567199843,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-XU02","requires_shipping":true,"taxable":true,"featured_image":{"id":34933255831651,"product_id":7937960181859,"position":11,"created_at":"2025-12-11T16:08:00+08:00","updated_at":"2025-12-11T16:08:03+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a75ea75584a65814a7a4a6b0711d9cfabc923d1.webp?v=1765440483","variant_ids":[43884567199843]},"available":true,"name":"iPhone 12 mini Mod NX 進擊的巨人 Attack on Titan 城牆保衛戰 - 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-XU02","featured_media":{"alt":null,"id":26495627427939,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a75ea75584a65814a7a4a6b0711d9cfabc923d1.webp?v=1765440483"}},"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: "停產"
}