$product = {"id":7408457220195,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Batman - 小丑女 瘋狂的愛","handle":"iphone-12-pro-max-mod-nx-printable-sb09","description":null,"published_at":"2024-06-11T16:37:45+08:00","created_at":"2024-05-03T15:30:21+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":41885689086051,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-SB09","requires_shipping":true,"taxable":true,"featured_image":{"id":31472330375267,"product_id":7408457220195,"position":7,"created_at":"2024-05-03T15:30:39+08:00","updated_at":"2024-05-03T15:30:39+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba47c59fbfb8adc8c689a7022de8eb92e3a1072b_1dbebb22-41a2-4d1a-a8cb-6144b91b9b9c.webp?v=1714721439","variant_ids":[41885689086051]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Batman - 小丑女 瘋狂的愛 - 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-SB09","featured_media":{"alt":null,"id":23877246877795,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba47c59fbfb8adc8c689a7022de8eb92e3a1072b_1dbebb22-41a2-4d1a-a8cb-6144b91b9b9c.webp?v=1714721439"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/494962a61d662aede863c7eb6773d72accffa3ef_e474e6d3-f403-4f53-b536-207d42d946b4.webp?v=1714721423","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cbd8c5fa25bf6b52fb4cdc7525a993b2dd52704b_7c104f86-a535-4f59-a664-22264dad5e1b.webp?v=1714721426","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d77ba10e57b7b8339f3772869e59d249a05952e_b9132da9-4bd1-46b0-946d-c4180dad401b.webp?v=1714721429","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2fd3eef0697797e18e4e6d604118d8f00984ae5c_a3c414f2-89a9-4bc2-86bd-8e443d4d65ac.webp?v=1714721431","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/504e148ffa0884a35acc4821b6260e1c2c19f40b_313f522f-9ed8-4ac8-80ed-5a626866a2fc.webp?v=1714721434","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b8776eebed6763e806418d2dcba94b8bd287af5_2a7bb1e7-43ea-4149-a5e4-53481bcccb11.webp?v=1714721436","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba47c59fbfb8adc8c689a7022de8eb92e3a1072b_1dbebb22-41a2-4d1a-a8cb-6144b91b9b9c.webp?v=1714721439","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/60b4368f382f4bfff0b08be107a6ed936b084f28_2b3be8d7-b84e-45e7-9f7f-f4e5590b9a7a.webp?v=1714721441","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f7eee85297976f67ea3c75058aec2c7083fec106_e15e7d19-4653-4ba9-9416-d348ccd3fcc0.webp?v=1714721444","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02d15c735d3b7332dd78ed6779598fde35bdf2ae_9dfd0574-e8ee-41ef-8d54-5b36736d410e.webp?v=1714721446"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/494962a61d662aede863c7eb6773d72accffa3ef_e474e6d3-f403-4f53-b536-207d42d946b4.webp?v=1714721423","options":["color"],"media":[{"alt":null,"id":23877243568227,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/494962a61d662aede863c7eb6773d72accffa3ef_e474e6d3-f403-4f53-b536-207d42d946b4.webp?v=1714721423"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/494962a61d662aede863c7eb6773d72accffa3ef_e474e6d3-f403-4f53-b536-207d42d946b4.webp?v=1714721423","width":2000},{"alt":null,"id":23877244092515,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cbd8c5fa25bf6b52fb4cdc7525a993b2dd52704b_7c104f86-a535-4f59-a664-22264dad5e1b.webp?v=1714721426"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cbd8c5fa25bf6b52fb4cdc7525a993b2dd52704b_7c104f86-a535-4f59-a664-22264dad5e1b.webp?v=1714721426","width":2000},{"alt":null,"id":23877244649571,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d77ba10e57b7b8339f3772869e59d249a05952e_b9132da9-4bd1-46b0-946d-c4180dad401b.webp?v=1714721429"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d77ba10e57b7b8339f3772869e59d249a05952e_b9132da9-4bd1-46b0-946d-c4180dad401b.webp?v=1714721429","width":2000},{"alt":null,"id":23877245206627,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2fd3eef0697797e18e4e6d604118d8f00984ae5c_a3c414f2-89a9-4bc2-86bd-8e443d4d65ac.webp?v=1714721431"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2fd3eef0697797e18e4e6d604118d8f00984ae5c_a3c414f2-89a9-4bc2-86bd-8e443d4d65ac.webp?v=1714721431","width":2000},{"alt":null,"id":23877245861987,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/504e148ffa0884a35acc4821b6260e1c2c19f40b_313f522f-9ed8-4ac8-80ed-5a626866a2fc.webp?v=1714721434"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/504e148ffa0884a35acc4821b6260e1c2c19f40b_313f522f-9ed8-4ac8-80ed-5a626866a2fc.webp?v=1714721434","width":2000},{"alt":null,"id":23877246320739,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b8776eebed6763e806418d2dcba94b8bd287af5_2a7bb1e7-43ea-4149-a5e4-53481bcccb11.webp?v=1714721436"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b8776eebed6763e806418d2dcba94b8bd287af5_2a7bb1e7-43ea-4149-a5e4-53481bcccb11.webp?v=1714721436","width":2000},{"alt":null,"id":23877246877795,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba47c59fbfb8adc8c689a7022de8eb92e3a1072b_1dbebb22-41a2-4d1a-a8cb-6144b91b9b9c.webp?v=1714721439"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba47c59fbfb8adc8c689a7022de8eb92e3a1072b_1dbebb22-41a2-4d1a-a8cb-6144b91b9b9c.webp?v=1714721439","width":2000},{"alt":null,"id":23877247369315,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/60b4368f382f4bfff0b08be107a6ed936b084f28_2b3be8d7-b84e-45e7-9f7f-f4e5590b9a7a.webp?v=1714721441"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/60b4368f382f4bfff0b08be107a6ed936b084f28_2b3be8d7-b84e-45e7-9f7f-f4e5590b9a7a.webp?v=1714721441","width":2000},{"alt":null,"id":23877247893603,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f7eee85297976f67ea3c75058aec2c7083fec106_e15e7d19-4653-4ba9-9416-d348ccd3fcc0.webp?v=1714721444"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f7eee85297976f67ea3c75058aec2c7083fec106_e15e7d19-4653-4ba9-9416-d348ccd3fcc0.webp?v=1714721444","width":2000},{"alt":null,"id":23877248516195,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02d15c735d3b7332dd78ed6779598fde35bdf2ae_9dfd0574-e8ee-41ef-8d54-5b36736d410e.webp?v=1714721446"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02d15c735d3b7332dd78ed6779598fde35bdf2ae_9dfd0574-e8ee-41ef-8d54-5b36736d410e.webp?v=1714721446","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$bumper = null;
$variants = [{"id":41885689086051,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-SB09","requires_shipping":true,"taxable":true,"featured_image":{"id":31472330375267,"product_id":7408457220195,"position":7,"created_at":"2024-05-03T15:30:39+08:00","updated_at":"2024-05-03T15:30:39+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba47c59fbfb8adc8c689a7022de8eb92e3a1072b_1dbebb22-41a2-4d1a-a8cb-6144b91b9b9c.webp?v=1714721439","variant_ids":[41885689086051]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Batman - 小丑女 瘋狂的愛 - 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-SB09","featured_media":{"alt":null,"id":23877246877795,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba47c59fbfb8adc8c689a7022de8eb92e3a1072b_1dbebb22-41a2-4d1a-a8cb-6144b91b9b9c.webp?v=1714721439"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41885689086051,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-SB09","requires_shipping":true,"taxable":true,"featured_image":{"id":31472330375267,"product_id":7408457220195,"position":7,"created_at":"2024-05-03T15:30:39+08:00","updated_at":"2024-05-03T15:30:39+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba47c59fbfb8adc8c689a7022de8eb92e3a1072b_1dbebb22-41a2-4d1a-a8cb-6144b91b9b9c.webp?v=1714721439","variant_ids":[41885689086051]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Batman - 小丑女 瘋狂的愛 - 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-SB09","featured_media":{"alt":null,"id":23877246877795,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba47c59fbfb8adc8c689a7022de8eb92e3a1072b_1dbebb22-41a2-4d1a-a8cb-6144b91b9b9c.webp?v=1714721439"}},"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: "停產"
}