$product = {"id":7892693024867,"title":"iPhone XS Mod NX Aaron Chang Take Ivy","handle":"iphone-xs-mod-nx-printable-aar09","description":null,"published_at":"2025-10-03T09:38:58+08:00","created_at":"2025-10-02T10:13:01+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-aaronchang","device-iPhone XS","merge","reseller-aaronchang"],"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":43756798378083,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0108424-AAR09","requires_shipping":true,"taxable":true,"featured_image":{"id":34543851339875,"product_id":7892693024867,"position":10,"created_at":"2025-10-02T10:13:15+08:00","updated_at":"2025-10-02T10:13:17+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ab6fb39da28ee627bcd107915da5843fb846144.webp?v=1759371197","variant_ids":[43756798378083]},"available":true,"name":"iPhone XS Mod NX Aaron Chang Take Ivy - Black","public_title":"Black","options":["Black"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108424-AAR09","featured_media":{"alt":null,"id":26113606221923,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ab6fb39da28ee627bcd107915da5843fb846144.webp?v=1759371197"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b3000bbaa8db40b4314e217770fea65bc21d820.webp?v=1759371189","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/033a7f4addca469201005d120860333b262c3c12.webp?v=1759371190","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/654e2c138077c21689231f722adaa5cd2ac6c3a6.webp?v=1759371191","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/044c28caaba18e94861b6987747c76976d6f9eea.webp?v=1759371192","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2d91bf438a79e2fa57901bc9c853e64b172a4bf.webp?v=1759371192","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/949c52bbd3a00f23b221b763b8b48f23234b6737.webp?v=1759371193","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03e4b566899c2cfd9f18b2f96111696af2106f25.webp?v=1759371194","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be3edae90a421e094de5246863a3ff1a9c1325dc.webp?v=1759371194","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/504369ebe8e7f007f17efcfa2edb6b36663bb86d.webp?v=1759371195","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ab6fb39da28ee627bcd107915da5843fb846144.webp?v=1759371197"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b3000bbaa8db40b4314e217770fea65bc21d820.webp?v=1759371189","options":["color"],"media":[{"alt":null,"id":26113604190307,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b3000bbaa8db40b4314e217770fea65bc21d820.webp?v=1759371189"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b3000bbaa8db40b4314e217770fea65bc21d820.webp?v=1759371189","width":2000},{"alt":null,"id":26113604386915,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/033a7f4addca469201005d120860333b262c3c12.webp?v=1759371190"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/033a7f4addca469201005d120860333b262c3c12.webp?v=1759371190","width":2000},{"alt":null,"id":26113604780131,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/654e2c138077c21689231f722adaa5cd2ac6c3a6.webp?v=1759371191"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/654e2c138077c21689231f722adaa5cd2ac6c3a6.webp?v=1759371191","width":2000},{"alt":null,"id":26113605206115,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/044c28caaba18e94861b6987747c76976d6f9eea.webp?v=1759371192"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/044c28caaba18e94861b6987747c76976d6f9eea.webp?v=1759371192","width":2000},{"alt":null,"id":26113605369955,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2d91bf438a79e2fa57901bc9c853e64b172a4bf.webp?v=1759371192"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2d91bf438a79e2fa57901bc9c853e64b172a4bf.webp?v=1759371192","width":2000},{"alt":null,"id":26113605533795,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/949c52bbd3a00f23b221b763b8b48f23234b6737.webp?v=1759371193"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/949c52bbd3a00f23b221b763b8b48f23234b6737.webp?v=1759371193","width":2000},{"alt":null,"id":26113605664867,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03e4b566899c2cfd9f18b2f96111696af2106f25.webp?v=1759371194"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03e4b566899c2cfd9f18b2f96111696af2106f25.webp?v=1759371194","width":2000},{"alt":null,"id":26113605861475,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be3edae90a421e094de5246863a3ff1a9c1325dc.webp?v=1759371194"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be3edae90a421e094de5246863a3ff1a9c1325dc.webp?v=1759371194","width":2000},{"alt":null,"id":26113606090851,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/504369ebe8e7f007f17efcfa2edb6b36663bb86d.webp?v=1759371195"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/504369ebe8e7f007f17efcfa2edb6b36663bb86d.webp?v=1759371195","width":2000},{"alt":null,"id":26113606221923,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ab6fb39da28ee627bcd107915da5843fb846144.webp?v=1759371197"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ab6fb39da28ee627bcd107915da5843fb846144.webp?v=1759371197","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$bumper = null;
$variants = [{"id":43756798378083,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0108424-AAR09","requires_shipping":true,"taxable":true,"featured_image":{"id":34543851339875,"product_id":7892693024867,"position":10,"created_at":"2025-10-02T10:13:15+08:00","updated_at":"2025-10-02T10:13:17+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ab6fb39da28ee627bcd107915da5843fb846144.webp?v=1759371197","variant_ids":[43756798378083]},"available":true,"name":"iPhone XS Mod NX Aaron Chang Take Ivy - Black","public_title":"Black","options":["Black"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108424-AAR09","featured_media":{"alt":null,"id":26113606221923,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ab6fb39da28ee627bcd107915da5843fb846144.webp?v=1759371197"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43756798378083,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0108424-AAR09","requires_shipping":true,"taxable":true,"featured_image":{"id":34543851339875,"product_id":7892693024867,"position":10,"created_at":"2025-10-02T10:13:15+08:00","updated_at":"2025-10-02T10:13:17+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ab6fb39da28ee627bcd107915da5843fb846144.webp?v=1759371197","variant_ids":[43756798378083]},"available":true,"name":"iPhone XS Mod NX Aaron Chang Take Ivy - Black","public_title":"Black","options":["Black"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108424-AAR09","featured_media":{"alt":null,"id":26113606221923,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ab6fb39da28ee627bcd107915da5843fb846144.webp?v=1759371197"}},"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: "停產"
}