$product = {"id":7408381591651,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Batman - Logo貼紙款","handle":"iphone-12-pro-max-mod-nx-printable-sb04","description":null,"published_at":"2024-06-11T16:35:41+08:00","created_at":"2024-05-03T15:15:22+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-Batman","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-batman","device-iPhone 12 pro max","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-batman","Top50","type-Mod NX Printable"],"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":41884853928035,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-SB04","requires_shipping":true,"taxable":true,"featured_image":{"id":31472118628451,"product_id":7408381591651,"position":9,"created_at":"2024-05-03T15:15:46+08:00","updated_at":"2024-05-03T15:15:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35dd62e99ae0bddec3770b9b7fe25f78a1859ce6_faae7f02-d821-4d89-a802-20e08a1f0dcb.webp?v=1714720546","variant_ids":[41884853928035]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Batman - Logo貼紙款 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118724-SB04","featured_media":{"alt":null,"id":23877034082403,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35dd62e99ae0bddec3770b9b7fe25f78a1859ce6_faae7f02-d821-4d89-a802-20e08a1f0dcb.webp?v=1714720546"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/25c50c70da5875bcb8f15b10d802e4c50e9925e2_48ac1e2c-05e8-46ea-94eb-91a2f6db826c.webp?v=1714720525","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38c7fe893d710a16edd96a6b38f6e6a54d2e4c8c_47a9f65f-bf24-4c93-987f-6e314117760d.webp?v=1714720528","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a31041ade95cdacb370ad23508fa51073eed2fd8_2f012c7c-71b4-4345-b67d-9e3bda04aeb1.webp?v=1714720530","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b010fd65f578ad10374b6d7297c33637f46e5fa5_30f17c85-2e9c-4d53-a634-4146427c3df8.webp?v=1714720533","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f09d03d2b0c8592b4593431dd0c1802f333b9f96_c500c11a-2a45-4daa-a928-cbc66f03aae0.webp?v=1714720536","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f18de9239eda650b824651decb1a080d0f186cff_f41df0eb-25b5-4f16-9370-07b8ec8561ba.webp?v=1714720538","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a53d50f680adc07391d9470c9710f3884487957_ee504c85-751e-41ae-9a8f-89bea65bd678.webp?v=1714720541","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa0cb2c43758cfb255802b9724d0a5b44d82721d_fee8d7c5-bdba-4412-9b5e-43493174299a.webp?v=1714720543","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35dd62e99ae0bddec3770b9b7fe25f78a1859ce6_faae7f02-d821-4d89-a802-20e08a1f0dcb.webp?v=1714720546","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b901fb6bac5d37db2f0d2323692c7175b2344d45_6ddc39ab-9412-422b-96c9-841538b76ced.webp?v=1714720548"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/25c50c70da5875bcb8f15b10d802e4c50e9925e2_48ac1e2c-05e8-46ea-94eb-91a2f6db826c.webp?v=1714720525","options":["color"],"media":[{"alt":null,"id":23877029658723,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/25c50c70da5875bcb8f15b10d802e4c50e9925e2_48ac1e2c-05e8-46ea-94eb-91a2f6db826c.webp?v=1714720525"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/25c50c70da5875bcb8f15b10d802e4c50e9925e2_48ac1e2c-05e8-46ea-94eb-91a2f6db826c.webp?v=1714720525","width":2000},{"alt":null,"id":23877030314083,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38c7fe893d710a16edd96a6b38f6e6a54d2e4c8c_47a9f65f-bf24-4c93-987f-6e314117760d.webp?v=1714720528"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38c7fe893d710a16edd96a6b38f6e6a54d2e4c8c_47a9f65f-bf24-4c93-987f-6e314117760d.webp?v=1714720528","width":2000},{"alt":null,"id":23877030838371,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a31041ade95cdacb370ad23508fa51073eed2fd8_2f012c7c-71b4-4345-b67d-9e3bda04aeb1.webp?v=1714720530"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a31041ade95cdacb370ad23508fa51073eed2fd8_2f012c7c-71b4-4345-b67d-9e3bda04aeb1.webp?v=1714720530","width":2000},{"alt":null,"id":23877031297123,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b010fd65f578ad10374b6d7297c33637f46e5fa5_30f17c85-2e9c-4d53-a634-4146427c3df8.webp?v=1714720533"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b010fd65f578ad10374b6d7297c33637f46e5fa5_30f17c85-2e9c-4d53-a634-4146427c3df8.webp?v=1714720533","width":2000},{"alt":null,"id":23877031886947,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f09d03d2b0c8592b4593431dd0c1802f333b9f96_c500c11a-2a45-4daa-a928-cbc66f03aae0.webp?v=1714720536"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f09d03d2b0c8592b4593431dd0c1802f333b9f96_c500c11a-2a45-4daa-a928-cbc66f03aae0.webp?v=1714720536","width":2000},{"alt":null,"id":23877032149091,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f18de9239eda650b824651decb1a080d0f186cff_f41df0eb-25b5-4f16-9370-07b8ec8561ba.webp?v=1714720538"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f18de9239eda650b824651decb1a080d0f186cff_f41df0eb-25b5-4f16-9370-07b8ec8561ba.webp?v=1714720538","width":2000},{"alt":null,"id":23877032771683,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a53d50f680adc07391d9470c9710f3884487957_ee504c85-751e-41ae-9a8f-89bea65bd678.webp?v=1714720541"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a53d50f680adc07391d9470c9710f3884487957_ee504c85-751e-41ae-9a8f-89bea65bd678.webp?v=1714720541","width":2000},{"alt":null,"id":23877033230435,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa0cb2c43758cfb255802b9724d0a5b44d82721d_fee8d7c5-bdba-4412-9b5e-43493174299a.webp?v=1714720543"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa0cb2c43758cfb255802b9724d0a5b44d82721d_fee8d7c5-bdba-4412-9b5e-43493174299a.webp?v=1714720543","width":2000},{"alt":null,"id":23877034082403,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35dd62e99ae0bddec3770b9b7fe25f78a1859ce6_faae7f02-d821-4d89-a802-20e08a1f0dcb.webp?v=1714720546"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35dd62e99ae0bddec3770b9b7fe25f78a1859ce6_faae7f02-d821-4d89-a802-20e08a1f0dcb.webp?v=1714720546","width":2000},{"alt":null,"id":23877034606691,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b901fb6bac5d37db2f0d2323692c7175b2344d45_6ddc39ab-9412-422b-96c9-841538b76ced.webp?v=1714720548"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b901fb6bac5d37db2f0d2323692c7175b2344d45_6ddc39ab-9412-422b-96c9-841538b76ced.webp?v=1714720548","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$bumper = null;
$variants = [{"id":41884853928035,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-SB04","requires_shipping":true,"taxable":true,"featured_image":{"id":31472118628451,"product_id":7408381591651,"position":9,"created_at":"2024-05-03T15:15:46+08:00","updated_at":"2024-05-03T15:15:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35dd62e99ae0bddec3770b9b7fe25f78a1859ce6_faae7f02-d821-4d89-a802-20e08a1f0dcb.webp?v=1714720546","variant_ids":[41884853928035]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Batman - Logo貼紙款 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118724-SB04","featured_media":{"alt":null,"id":23877034082403,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35dd62e99ae0bddec3770b9b7fe25f78a1859ce6_faae7f02-d821-4d89-a802-20e08a1f0dcb.webp?v=1714720546"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41884853928035,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-SB04","requires_shipping":true,"taxable":true,"featured_image":{"id":31472118628451,"product_id":7408381591651,"position":9,"created_at":"2024-05-03T15:15:46+08:00","updated_at":"2024-05-03T15:15:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35dd62e99ae0bddec3770b9b7fe25f78a1859ce6_faae7f02-d821-4d89-a802-20e08a1f0dcb.webp?v=1714720546","variant_ids":[41884853928035]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Batman - Logo貼紙款 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118724-SB04","featured_media":{"alt":null,"id":23877034082403,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35dd62e99ae0bddec3770b9b7fe25f78a1859ce6_faae7f02-d821-4d89-a802-20e08a1f0dcb.webp?v=1714720546"}},"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: "停產"
}