$product = {"id":7408562045027,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵-經典","handle":"iphone-12-mini-mod-nx-printable-pb22","description":null,"published_at":"2024-06-11T16:40:46+08:00","created_at":"2024-05-03T15:51:06+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 12 mini","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-star-wars","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":41886893506659,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB22","requires_shipping":true,"taxable":true,"featured_image":{"id":31472593535075,"product_id":7408562045027,"position":1,"created_at":"2024-05-03T15:51:08+08:00","updated_at":"2024-05-03T15:51:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a752a9a3bd1dae9e05cdc71587c03e36a5e847e2_7343b3c1-5bbc-4c24-8d5f-587880bffba6.webp?v=1714722668","variant_ids":[41886893506659]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵-經典 - 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":"NPB0118424-PB22","featured_media":{"alt":null,"id":23877511053411,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a752a9a3bd1dae9e05cdc71587c03e36a5e847e2_7343b3c1-5bbc-4c24-8d5f-587880bffba6.webp?v=1714722668"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a752a9a3bd1dae9e05cdc71587c03e36a5e847e2_7343b3c1-5bbc-4c24-8d5f-587880bffba6.webp?v=1714722668","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f2ae1b8be07a4f6807ae15e2ad054ab0f54992d_ac9fbed9-08a8-4a30-a08d-ce94097c1097.webp?v=1714722671","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be997145e1da41241dc0e7897e0b3a9a2f3441ed_a032ccd0-c0ff-471e-b83b-cb2b9686074c.webp?v=1714722673","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df25ef7134ae5403a748d271b8a8f1c191155544_1b334f40-c09e-41fd-9f7c-1cb611fed094.webp?v=1714722676","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec96313b4eb06d77dac7fb0429be5052ab6bfda1_201dfe26-da0f-4b4c-9c84-4e79ff1194b3.webp?v=1714722678","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3804e868539e99b9a87043043a387c47d2bbffac_50e67719-4892-4673-a57a-9b66de6f5c09.webp?v=1714722680","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/849d638ca36c6ecc2a4049836ca9600213e8bfb9_76ee4a81-90f7-49c1-9651-406ad5693c63.webp?v=1714722683","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2fc01c0d1ec11c09bf81238566e7330de9d5127_3815bda4-5335-4893-9aeb-9375ec5c2d7b.webp?v=1714722685","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d4297521b197914c43c81255e2653d91282c58a8_427cab11-3a40-463c-871c-296ab6dae158.webp?v=1714722687","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e36c5412163cc1f9d2292bc6a67cacb00c657d3_9e3aa26b-e166-4119-92e1-cf664bfc11af.webp?v=1714722690","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6096a46becc66d1c4f1fc62b63e2d388b4e5b6a_bada4906-1412-421a-a6f7-c30f18c0f151.webp?v=1714722692"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a752a9a3bd1dae9e05cdc71587c03e36a5e847e2_7343b3c1-5bbc-4c24-8d5f-587880bffba6.webp?v=1714722668","options":["color"],"media":[{"alt":null,"id":23877511053411,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a752a9a3bd1dae9e05cdc71587c03e36a5e847e2_7343b3c1-5bbc-4c24-8d5f-587880bffba6.webp?v=1714722668"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a752a9a3bd1dae9e05cdc71587c03e36a5e847e2_7343b3c1-5bbc-4c24-8d5f-587880bffba6.webp?v=1714722668","width":2000},{"alt":null,"id":23877511544931,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f2ae1b8be07a4f6807ae15e2ad054ab0f54992d_ac9fbed9-08a8-4a30-a08d-ce94097c1097.webp?v=1714722671"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f2ae1b8be07a4f6807ae15e2ad054ab0f54992d_ac9fbed9-08a8-4a30-a08d-ce94097c1097.webp?v=1714722671","width":2000},{"alt":null,"id":23877512003683,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be997145e1da41241dc0e7897e0b3a9a2f3441ed_a032ccd0-c0ff-471e-b83b-cb2b9686074c.webp?v=1714722673"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be997145e1da41241dc0e7897e0b3a9a2f3441ed_a032ccd0-c0ff-471e-b83b-cb2b9686074c.webp?v=1714722673","width":2000},{"alt":null,"id":23877512626275,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df25ef7134ae5403a748d271b8a8f1c191155544_1b334f40-c09e-41fd-9f7c-1cb611fed094.webp?v=1714722676"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df25ef7134ae5403a748d271b8a8f1c191155544_1b334f40-c09e-41fd-9f7c-1cb611fed094.webp?v=1714722676","width":2000},{"alt":null,"id":23877513085027,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec96313b4eb06d77dac7fb0429be5052ab6bfda1_201dfe26-da0f-4b4c-9c84-4e79ff1194b3.webp?v=1714722678"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec96313b4eb06d77dac7fb0429be5052ab6bfda1_201dfe26-da0f-4b4c-9c84-4e79ff1194b3.webp?v=1714722678","width":2000},{"alt":null,"id":23877513740387,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3804e868539e99b9a87043043a387c47d2bbffac_50e67719-4892-4673-a57a-9b66de6f5c09.webp?v=1714722680"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3804e868539e99b9a87043043a387c47d2bbffac_50e67719-4892-4673-a57a-9b66de6f5c09.webp?v=1714722680","width":2000},{"alt":null,"id":23877514231907,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/849d638ca36c6ecc2a4049836ca9600213e8bfb9_76ee4a81-90f7-49c1-9651-406ad5693c63.webp?v=1714722683"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/849d638ca36c6ecc2a4049836ca9600213e8bfb9_76ee4a81-90f7-49c1-9651-406ad5693c63.webp?v=1714722683","width":2000},{"alt":null,"id":23877514854499,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2fc01c0d1ec11c09bf81238566e7330de9d5127_3815bda4-5335-4893-9aeb-9375ec5c2d7b.webp?v=1714722685"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2fc01c0d1ec11c09bf81238566e7330de9d5127_3815bda4-5335-4893-9aeb-9375ec5c2d7b.webp?v=1714722685","width":2000},{"alt":null,"id":23877515247715,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d4297521b197914c43c81255e2653d91282c58a8_427cab11-3a40-463c-871c-296ab6dae158.webp?v=1714722687"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d4297521b197914c43c81255e2653d91282c58a8_427cab11-3a40-463c-871c-296ab6dae158.webp?v=1714722687","width":2000},{"alt":null,"id":23877515772003,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e36c5412163cc1f9d2292bc6a67cacb00c657d3_9e3aa26b-e166-4119-92e1-cf664bfc11af.webp?v=1714722690"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e36c5412163cc1f9d2292bc6a67cacb00c657d3_9e3aa26b-e166-4119-92e1-cf664bfc11af.webp?v=1714722690","width":2000},{"alt":null,"id":23877516296291,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6096a46becc66d1c4f1fc62b63e2d388b4e5b6a_bada4906-1412-421a-a6f7-c30f18c0f151.webp?v=1714722692"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6096a46becc66d1c4f1fc62b63e2d388b4e5b6a_bada4906-1412-421a-a6f7-c30f18c0f151.webp?v=1714722692","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$bumper = null;
$variants = [{"id":41886893506659,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB22","requires_shipping":true,"taxable":true,"featured_image":{"id":31472593535075,"product_id":7408562045027,"position":1,"created_at":"2024-05-03T15:51:08+08:00","updated_at":"2024-05-03T15:51:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a752a9a3bd1dae9e05cdc71587c03e36a5e847e2_7343b3c1-5bbc-4c24-8d5f-587880bffba6.webp?v=1714722668","variant_ids":[41886893506659]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵-經典 - 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":"NPB0118424-PB22","featured_media":{"alt":null,"id":23877511053411,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a752a9a3bd1dae9e05cdc71587c03e36a5e847e2_7343b3c1-5bbc-4c24-8d5f-587880bffba6.webp?v=1714722668"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41886893506659,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB22","requires_shipping":true,"taxable":true,"featured_image":{"id":31472593535075,"product_id":7408562045027,"position":1,"created_at":"2024-05-03T15:51:08+08:00","updated_at":"2024-05-03T15:51:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a752a9a3bd1dae9e05cdc71587c03e36a5e847e2_7343b3c1-5bbc-4c24-8d5f-587880bffba6.webp?v=1714722668","variant_ids":[41886893506659]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵-經典 - 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":"NPB0118424-PB22","featured_media":{"alt":null,"id":23877511053411,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a752a9a3bd1dae9e05cdc71587c03e36a5e847e2_7343b3c1-5bbc-4c24-8d5f-587880bffba6.webp?v=1714722668"}},"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: "停產"
}