$product = {"id":7911307280483,"title":"iPhone 12 mini Mod NX PosterLad 正常很無聊","handle":"iphone-12-mini-mod-nx-printable-pos04","description":null,"published_at":"2025-11-05T10:31:08+08:00","created_at":"2025-11-04T10:54:35+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-posterlad","device-iPhone 12 Mini","merge","reseller-posterlad"],"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":43812273127523,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-POS04","requires_shipping":true,"taxable":true,"featured_image":{"id":34729382903907,"product_id":7911307280483,"position":5,"created_at":"2025-11-04T10:54:40+08:00","updated_at":"2025-11-04T10:54:42+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3840e2905e8243207de5a9acac310a98b82a7a10.webp?v=1762224882","variant_ids":[43812273127523]},"available":true,"name":"iPhone 12 mini Mod NX PosterLad 正常很無聊 - 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-POS04","featured_media":{"alt":null,"id":26297250480227,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3840e2905e8243207de5a9acac310a98b82a7a10.webp?v=1762224882"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3462f9912502bf59ec4777d505cd541f9848484e.webp?v=1762224879","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/31a0116c83ecf6d2fbb07556eb027b9a573d5150.webp?v=1762224880","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c9c34f0b05bf32cfb7e28d332b57d96d6d6aa9d.webp?v=1762224881","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ac175050303b431ad17c6cf6044995ab7023546.webp?v=1762224881","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3840e2905e8243207de5a9acac310a98b82a7a10.webp?v=1762224882","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a28ef600ecf5471322bdcc4546642be9d8d467af.webp?v=1762224883","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d0740a04094f8b0a8d839c6f9e31a5b3feeda25.webp?v=1762224884","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e1fc7e1c66614ad40425896f8647a628280eb7f.webp?v=1762224885","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4aa1b92d6b67dfda8a6bb23aa4b7b3fe472d8a76.webp?v=1762224886","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72f941b71c60c7532587933c9e00bdfcff93264e.webp?v=1762224887","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1e5bb2d08aa6c6d88d668aff398ce1113f3d6f6.webp?v=1762224888"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3462f9912502bf59ec4777d505cd541f9848484e.webp?v=1762224879","options":["color"],"media":[{"alt":null,"id":26297249202275,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3462f9912502bf59ec4777d505cd541f9848484e.webp?v=1762224879"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3462f9912502bf59ec4777d505cd541f9848484e.webp?v=1762224879","width":2000},{"alt":null,"id":26297249398883,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/31a0116c83ecf6d2fbb07556eb027b9a573d5150.webp?v=1762224880"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/31a0116c83ecf6d2fbb07556eb027b9a573d5150.webp?v=1762224880","width":2000},{"alt":null,"id":26297249628259,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c9c34f0b05bf32cfb7e28d332b57d96d6d6aa9d.webp?v=1762224881"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c9c34f0b05bf32cfb7e28d332b57d96d6d6aa9d.webp?v=1762224881","width":2000},{"alt":null,"id":26297250218083,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ac175050303b431ad17c6cf6044995ab7023546.webp?v=1762224881"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ac175050303b431ad17c6cf6044995ab7023546.webp?v=1762224881","width":2000},{"alt":null,"id":26297250480227,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3840e2905e8243207de5a9acac310a98b82a7a10.webp?v=1762224882"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3840e2905e8243207de5a9acac310a98b82a7a10.webp?v=1762224882","width":2000},{"alt":null,"id":26297250709603,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a28ef600ecf5471322bdcc4546642be9d8d467af.webp?v=1762224883"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a28ef600ecf5471322bdcc4546642be9d8d467af.webp?v=1762224883","width":2000},{"alt":null,"id":26297251004515,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d0740a04094f8b0a8d839c6f9e31a5b3feeda25.webp?v=1762224884"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d0740a04094f8b0a8d839c6f9e31a5b3feeda25.webp?v=1762224884","width":2000},{"alt":null,"id":26297251299427,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e1fc7e1c66614ad40425896f8647a628280eb7f.webp?v=1762224885"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e1fc7e1c66614ad40425896f8647a628280eb7f.webp?v=1762224885","width":2000},{"alt":null,"id":26297251561571,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4aa1b92d6b67dfda8a6bb23aa4b7b3fe472d8a76.webp?v=1762224886"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4aa1b92d6b67dfda8a6bb23aa4b7b3fe472d8a76.webp?v=1762224886","width":2000},{"alt":null,"id":26297251856483,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72f941b71c60c7532587933c9e00bdfcff93264e.webp?v=1762224887"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72f941b71c60c7532587933c9e00bdfcff93264e.webp?v=1762224887","width":2000},{"alt":null,"id":26297252118627,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1e5bb2d08aa6c6d88d668aff398ce1113f3d6f6.webp?v=1762224888"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1e5bb2d08aa6c6d88d668aff398ce1113f3d6f6.webp?v=1762224888","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":43812273127523,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-POS04","requires_shipping":true,"taxable":true,"featured_image":{"id":34729382903907,"product_id":7911307280483,"position":5,"created_at":"2025-11-04T10:54:40+08:00","updated_at":"2025-11-04T10:54:42+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3840e2905e8243207de5a9acac310a98b82a7a10.webp?v=1762224882","variant_ids":[43812273127523]},"available":true,"name":"iPhone 12 mini Mod NX PosterLad 正常很無聊 - 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-POS04","featured_media":{"alt":null,"id":26297250480227,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3840e2905e8243207de5a9acac310a98b82a7a10.webp?v=1762224882"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43812273127523,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-POS04","requires_shipping":true,"taxable":true,"featured_image":{"id":34729382903907,"product_id":7911307280483,"position":5,"created_at":"2025-11-04T10:54:40+08:00","updated_at":"2025-11-04T10:54:42+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3840e2905e8243207de5a9acac310a98b82a7a10.webp?v=1762224882","variant_ids":[43812273127523]},"available":true,"name":"iPhone 12 mini Mod NX PosterLad 正常很無聊 - 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-POS04","featured_media":{"alt":null,"id":26297250480227,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3840e2905e8243207de5a9acac310a98b82a7a10.webp?v=1762224882"}},"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: "停產"
}