$product = {"id":7911267270755,"title":"iPhone 12 Pro Max Mod NX PosterLad BE YOU","handle":"iphone-12-pro-max-mod-nx-printable-pos11","description":null,"published_at":"2025-11-05T10:36:51+08:00","created_at":"2025-11-04T10:47:40+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-posterlad","device-iPhone 12 Pro Max","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":43812157259875,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118724-POS11","requires_shipping":true,"taxable":true,"featured_image":{"id":34729273819235,"product_id":7911267270755,"position":2,"created_at":"2025-11-04T10:47:45+08:00","updated_at":"2025-11-04T10:47:47+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbb5a7e29682e2cdac992ffb26ce0addc0bc8fa9.webp?v=1762224467","variant_ids":[43812157259875]},"available":true,"name":"iPhone 12 Pro Max Mod NX PosterLad BE YOU - 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-POS11","featured_media":{"alt":null,"id":26297141952611,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbb5a7e29682e2cdac992ffb26ce0addc0bc8fa9.webp?v=1762224467"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/433fc8e5d8ce8ede5d4fa5d924e16b86e0984d72.webp?v=1762224466","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbb5a7e29682e2cdac992ffb26ce0addc0bc8fa9.webp?v=1762224467","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ff68e9ef80869597d757cfb8d6925b9461160a4.webp?v=1762224468","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6767ba8a5518a2f8db008a845d4dd1333f5b368d.webp?v=1762224469","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b8d391289d482caeea038c30acc429d4f536c2e8.webp?v=1762224470","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f50aed957b31c87a070dfea7c86ac66b49c9497.webp?v=1762224471","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58b1bb060a147d4f5b409f8ee343d044953d659b.webp?v=1762224472","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e5619c15ade240c9e49b0e370821603554bdabe3.webp?v=1762224472","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4eb8fafc365e293943bb02e3676b1e59cc6fb02b.webp?v=1762224473"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/433fc8e5d8ce8ede5d4fa5d924e16b86e0984d72.webp?v=1762224466","options":["color"],"media":[{"alt":null,"id":26297141756003,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/433fc8e5d8ce8ede5d4fa5d924e16b86e0984d72.webp?v=1762224466"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/433fc8e5d8ce8ede5d4fa5d924e16b86e0984d72.webp?v=1762224466","width":2000},{"alt":null,"id":26297141952611,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbb5a7e29682e2cdac992ffb26ce0addc0bc8fa9.webp?v=1762224467"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbb5a7e29682e2cdac992ffb26ce0addc0bc8fa9.webp?v=1762224467","width":2000},{"alt":null,"id":26297142149219,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ff68e9ef80869597d757cfb8d6925b9461160a4.webp?v=1762224468"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ff68e9ef80869597d757cfb8d6925b9461160a4.webp?v=1762224468","width":2000},{"alt":null,"id":26297142378595,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6767ba8a5518a2f8db008a845d4dd1333f5b368d.webp?v=1762224469"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6767ba8a5518a2f8db008a845d4dd1333f5b368d.webp?v=1762224469","width":2000},{"alt":null,"id":26297142673507,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b8d391289d482caeea038c30acc429d4f536c2e8.webp?v=1762224470"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b8d391289d482caeea038c30acc429d4f536c2e8.webp?v=1762224470","width":2000},{"alt":null,"id":26297143001187,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f50aed957b31c87a070dfea7c86ac66b49c9497.webp?v=1762224471"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f50aed957b31c87a070dfea7c86ac66b49c9497.webp?v=1762224471","width":2000},{"alt":null,"id":26297143296099,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58b1bb060a147d4f5b409f8ee343d044953d659b.webp?v=1762224472"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58b1bb060a147d4f5b409f8ee343d044953d659b.webp?v=1762224472","width":2000},{"alt":null,"id":26297143558243,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e5619c15ade240c9e49b0e370821603554bdabe3.webp?v=1762224472"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e5619c15ade240c9e49b0e370821603554bdabe3.webp?v=1762224472","width":2000},{"alt":null,"id":26297143754851,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4eb8fafc365e293943bb02e3676b1e59cc6fb02b.webp?v=1762224473"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4eb8fafc365e293943bb02e3676b1e59cc6fb02b.webp?v=1762224473","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$bumper = null;
$variants = [{"id":43812157259875,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118724-POS11","requires_shipping":true,"taxable":true,"featured_image":{"id":34729273819235,"product_id":7911267270755,"position":2,"created_at":"2025-11-04T10:47:45+08:00","updated_at":"2025-11-04T10:47:47+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbb5a7e29682e2cdac992ffb26ce0addc0bc8fa9.webp?v=1762224467","variant_ids":[43812157259875]},"available":true,"name":"iPhone 12 Pro Max Mod NX PosterLad BE YOU - 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-POS11","featured_media":{"alt":null,"id":26297141952611,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbb5a7e29682e2cdac992ffb26ce0addc0bc8fa9.webp?v=1762224467"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43812157259875,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118724-POS11","requires_shipping":true,"taxable":true,"featured_image":{"id":34729273819235,"product_id":7911267270755,"position":2,"created_at":"2025-11-04T10:47:45+08:00","updated_at":"2025-11-04T10:47:47+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbb5a7e29682e2cdac992ffb26ce0addc0bc8fa9.webp?v=1762224467","variant_ids":[43812157259875]},"available":true,"name":"iPhone 12 Pro Max Mod NX PosterLad BE YOU - 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-POS11","featured_media":{"alt":null,"id":26297141952611,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbb5a7e29682e2cdac992ffb26ce0addc0bc8fa9.webp?v=1762224467"}},"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: "停產"
}