$product = {"id":7911302529123,"title":"iPhone X Mod NX PosterLad NOW","handle":"iphone-x-mod-nx-printable-pos05","description":null,"published_at":"2025-11-05T10:31:53+08:00","created_at":"2025-11-04T10:53:49+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-posterlad","device-iPhone X","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":43812259364963,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0106424-POS05","requires_shipping":true,"taxable":true,"featured_image":{"id":34729370517603,"product_id":7911302529123,"position":3,"created_at":"2025-11-04T10:53:53+08:00","updated_at":"2025-11-04T10:53:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/772241feff215d9d4a3635a48813c1edfa856179.webp?v=1762224835","variant_ids":[43812259364963]},"available":true,"name":"iPhone X Mod NX PosterLad NOW - Black","public_title":"Black","options":["Black"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0106424-POS05","featured_media":{"alt":null,"id":26297238093923,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/772241feff215d9d4a3635a48813c1edfa856179.webp?v=1762224835"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fd8695f4464ab2e50a07839e0b11a6eb993b8b2.webp?v=1762224833","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e560154cba9899ee08b5a5558fe4ba1f86f67e21.webp?v=1762224834","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/772241feff215d9d4a3635a48813c1edfa856179.webp?v=1762224835","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/05d03ae96be1dc9beb21acdd93c0f3afafccddc9.webp?v=1762224836","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0212ebe0bb9dcd06c17a0d638f54a47f574734eb.webp?v=1762224836","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf1a877aac602960d19e5c6db85959aed9b7d1ad.webp?v=1762224837","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/340cbe06f3207372d84b902e9663ffb3181a2207.webp?v=1762224838","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d575b6094780a4113e1a1305657e8159e572dc9.webp?v=1762224839","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9faa99be6028b5ae4ab6911e083847a457348431.webp?v=1762224840","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bdb06174fa982a38b33cec21af8ab99d50529426.webp?v=1762224841"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fd8695f4464ab2e50a07839e0b11a6eb993b8b2.webp?v=1762224833","options":["color"],"media":[{"alt":null,"id":26297237766243,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fd8695f4464ab2e50a07839e0b11a6eb993b8b2.webp?v=1762224833"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fd8695f4464ab2e50a07839e0b11a6eb993b8b2.webp?v=1762224833","width":2000},{"alt":null,"id":26297237897315,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e560154cba9899ee08b5a5558fe4ba1f86f67e21.webp?v=1762224834"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e560154cba9899ee08b5a5558fe4ba1f86f67e21.webp?v=1762224834","width":2000},{"alt":null,"id":26297238093923,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/772241feff215d9d4a3635a48813c1edfa856179.webp?v=1762224835"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/772241feff215d9d4a3635a48813c1edfa856179.webp?v=1762224835","width":2000},{"alt":null,"id":26297238323299,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/05d03ae96be1dc9beb21acdd93c0f3afafccddc9.webp?v=1762224836"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/05d03ae96be1dc9beb21acdd93c0f3afafccddc9.webp?v=1762224836","width":2000},{"alt":null,"id":26297238618211,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0212ebe0bb9dcd06c17a0d638f54a47f574734eb.webp?v=1762224836"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0212ebe0bb9dcd06c17a0d638f54a47f574734eb.webp?v=1762224836","width":2000},{"alt":null,"id":26297238782051,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf1a877aac602960d19e5c6db85959aed9b7d1ad.webp?v=1762224837"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf1a877aac602960d19e5c6db85959aed9b7d1ad.webp?v=1762224837","width":2000},{"alt":null,"id":26297239076963,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/340cbe06f3207372d84b902e9663ffb3181a2207.webp?v=1762224838"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/340cbe06f3207372d84b902e9663ffb3181a2207.webp?v=1762224838","width":2000},{"alt":null,"id":26297239240803,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d575b6094780a4113e1a1305657e8159e572dc9.webp?v=1762224839"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d575b6094780a4113e1a1305657e8159e572dc9.webp?v=1762224839","width":2000},{"alt":null,"id":26297239470179,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9faa99be6028b5ae4ab6911e083847a457348431.webp?v=1762224840"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9faa99be6028b5ae4ab6911e083847a457348431.webp?v=1762224840","width":2000},{"alt":null,"id":26297239601251,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bdb06174fa982a38b33cec21af8ab99d50529426.webp?v=1762224841"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bdb06174fa982a38b33cec21af8ab99d50529426.webp?v=1762224841","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$bumper = null;
$variants = [{"id":43812259364963,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0106424-POS05","requires_shipping":true,"taxable":true,"featured_image":{"id":34729370517603,"product_id":7911302529123,"position":3,"created_at":"2025-11-04T10:53:53+08:00","updated_at":"2025-11-04T10:53:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/772241feff215d9d4a3635a48813c1edfa856179.webp?v=1762224835","variant_ids":[43812259364963]},"available":true,"name":"iPhone X Mod NX PosterLad NOW - Black","public_title":"Black","options":["Black"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0106424-POS05","featured_media":{"alt":null,"id":26297238093923,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/772241feff215d9d4a3635a48813c1edfa856179.webp?v=1762224835"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43812259364963,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0106424-POS05","requires_shipping":true,"taxable":true,"featured_image":{"id":34729370517603,"product_id":7911302529123,"position":3,"created_at":"2025-11-04T10:53:53+08:00","updated_at":"2025-11-04T10:53:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/772241feff215d9d4a3635a48813c1edfa856179.webp?v=1762224835","variant_ids":[43812259364963]},"available":true,"name":"iPhone X Mod NX PosterLad NOW - Black","public_title":"Black","options":["Black"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0106424-POS05","featured_media":{"alt":null,"id":26297238093923,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/772241feff215d9d4a3635a48813c1edfa856179.webp?v=1762224835"}},"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: "停產"
}