$product = {"id":7408403578979,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Care Bears - 雲朵綿綿","handle":"iphone-12-pro-max-mod-nx-printable-yb10","description":null,"published_at":"2024-06-11T16:36:18+08:00","created_at":"2024-05-03T15:19:49+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-Care Bears","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-carebears","device-iPhone 12 pro max","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-carebears","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":41885096607843,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-YB10","requires_shipping":true,"taxable":true,"featured_image":{"id":31472175120483,"product_id":7408403578979,"position":5,"created_at":"2024-05-03T15:20:02+08:00","updated_at":"2024-05-03T15:20:02+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec0f5b313f04bf4af0d4d400c34a55eb328780d7_5282a418-b6eb-4653-9e30-ad87ba5dc0a2.webp?v=1714720802","variant_ids":[41885096607843]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Care Bears - 雲朵綿綿 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118724-YB10","featured_media":{"alt":null,"id":23877090771043,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec0f5b313f04bf4af0d4d400c34a55eb328780d7_5282a418-b6eb-4653-9e30-ad87ba5dc0a2.webp?v=1714720802"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03478d14b5f3e63595a5ad42279b1f7fc57da5b3_df9571fd-fc06-4888-a6d4-f7bf0da9186a.webp?v=1714720793","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2974265466d52f634460de2fb505c7dafb6456b9_abd0c6a2-519a-493b-9399-66b440c7536a.webp?v=1714720795","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/968fb32a4fd9a546ef47e630b26f9aa43e588a32_2be0b0a5-bf76-4037-9a5e-9187fa26960a.webp?v=1714720797","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/528dfda9227be475ccce6f6c9035b31128793dc2_be79525b-48dc-4682-aee0-b7974f39552d.webp?v=1714720800","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec0f5b313f04bf4af0d4d400c34a55eb328780d7_5282a418-b6eb-4653-9e30-ad87ba5dc0a2.webp?v=1714720802","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a4708c53477c35825f8ad69207d1d9beb54fdbef_bc4a603a-e8d4-4302-a09a-b6968aa9cd34.webp?v=1714720805","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f64b35d577ed370b2f4f8cdbc615dc328593619_f9eabf09-880e-4e47-ba87-93bd529a482e.webp?v=1714720807","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d534e0a54ffa30cfc6b23cd293be58f52a6548b_8334b231-8b8b-4da9-8689-c5a8339a56b9.webp?v=1714720809","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/512339aec9eada8ad2f6419b657f5a3c25f96f9b_6b9b657c-fe7d-4dc0-920a-fc778ef75728.webp?v=1714720812","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a1c89fa3610ec04c18925b2c76e7228b81b19f5_117f1e3c-3f28-44a5-9a8b-411c8c1416ec.webp?v=1714720815"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03478d14b5f3e63595a5ad42279b1f7fc57da5b3_df9571fd-fc06-4888-a6d4-f7bf0da9186a.webp?v=1714720793","options":["color"],"media":[{"alt":null,"id":23877088608355,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03478d14b5f3e63595a5ad42279b1f7fc57da5b3_df9571fd-fc06-4888-a6d4-f7bf0da9186a.webp?v=1714720793"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03478d14b5f3e63595a5ad42279b1f7fc57da5b3_df9571fd-fc06-4888-a6d4-f7bf0da9186a.webp?v=1714720793","width":2000},{"alt":null,"id":23877089132643,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2974265466d52f634460de2fb505c7dafb6456b9_abd0c6a2-519a-493b-9399-66b440c7536a.webp?v=1714720795"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2974265466d52f634460de2fb505c7dafb6456b9_abd0c6a2-519a-493b-9399-66b440c7536a.webp?v=1714720795","width":2000},{"alt":null,"id":23877089722467,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/968fb32a4fd9a546ef47e630b26f9aa43e588a32_2be0b0a5-bf76-4037-9a5e-9187fa26960a.webp?v=1714720797"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/968fb32a4fd9a546ef47e630b26f9aa43e588a32_2be0b0a5-bf76-4037-9a5e-9187fa26960a.webp?v=1714720797","width":2000},{"alt":null,"id":23877090213987,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/528dfda9227be475ccce6f6c9035b31128793dc2_be79525b-48dc-4682-aee0-b7974f39552d.webp?v=1714720800"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/528dfda9227be475ccce6f6c9035b31128793dc2_be79525b-48dc-4682-aee0-b7974f39552d.webp?v=1714720800","width":2000},{"alt":null,"id":23877090771043,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec0f5b313f04bf4af0d4d400c34a55eb328780d7_5282a418-b6eb-4653-9e30-ad87ba5dc0a2.webp?v=1714720802"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec0f5b313f04bf4af0d4d400c34a55eb328780d7_5282a418-b6eb-4653-9e30-ad87ba5dc0a2.webp?v=1714720802","width":2000},{"alt":null,"id":23877091295331,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a4708c53477c35825f8ad69207d1d9beb54fdbef_bc4a603a-e8d4-4302-a09a-b6968aa9cd34.webp?v=1714720805"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a4708c53477c35825f8ad69207d1d9beb54fdbef_bc4a603a-e8d4-4302-a09a-b6968aa9cd34.webp?v=1714720805","width":2000},{"alt":null,"id":23877091721315,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f64b35d577ed370b2f4f8cdbc615dc328593619_f9eabf09-880e-4e47-ba87-93bd529a482e.webp?v=1714720807"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f64b35d577ed370b2f4f8cdbc615dc328593619_f9eabf09-880e-4e47-ba87-93bd529a482e.webp?v=1714720807","width":2000},{"alt":null,"id":23877092343907,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d534e0a54ffa30cfc6b23cd293be58f52a6548b_8334b231-8b8b-4da9-8689-c5a8339a56b9.webp?v=1714720809"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d534e0a54ffa30cfc6b23cd293be58f52a6548b_8334b231-8b8b-4da9-8689-c5a8339a56b9.webp?v=1714720809","width":2000},{"alt":null,"id":23877093458019,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/512339aec9eada8ad2f6419b657f5a3c25f96f9b_6b9b657c-fe7d-4dc0-920a-fc778ef75728.webp?v=1714720812"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/512339aec9eada8ad2f6419b657f5a3c25f96f9b_6b9b657c-fe7d-4dc0-920a-fc778ef75728.webp?v=1714720812","width":2000},{"alt":null,"id":23877093982307,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a1c89fa3610ec04c18925b2c76e7228b81b19f5_117f1e3c-3f28-44a5-9a8b-411c8c1416ec.webp?v=1714720815"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a1c89fa3610ec04c18925b2c76e7228b81b19f5_117f1e3c-3f28-44a5-9a8b-411c8c1416ec.webp?v=1714720815","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$bumper = null;
$variants = [{"id":41885096607843,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-YB10","requires_shipping":true,"taxable":true,"featured_image":{"id":31472175120483,"product_id":7408403578979,"position":5,"created_at":"2024-05-03T15:20:02+08:00","updated_at":"2024-05-03T15:20:02+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec0f5b313f04bf4af0d4d400c34a55eb328780d7_5282a418-b6eb-4653-9e30-ad87ba5dc0a2.webp?v=1714720802","variant_ids":[41885096607843]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Care Bears - 雲朵綿綿 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118724-YB10","featured_media":{"alt":null,"id":23877090771043,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec0f5b313f04bf4af0d4d400c34a55eb328780d7_5282a418-b6eb-4653-9e30-ad87ba5dc0a2.webp?v=1714720802"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41885096607843,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-YB10","requires_shipping":true,"taxable":true,"featured_image":{"id":31472175120483,"product_id":7408403578979,"position":5,"created_at":"2024-05-03T15:20:02+08:00","updated_at":"2024-05-03T15:20:02+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec0f5b313f04bf4af0d4d400c34a55eb328780d7_5282a418-b6eb-4653-9e30-ad87ba5dc0a2.webp?v=1714720802","variant_ids":[41885096607843]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Care Bears - 雲朵綿綿 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118724-YB10","featured_media":{"alt":null,"id":23877090771043,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec0f5b313f04bf4af0d4d400c34a55eb328780d7_5282a418-b6eb-4653-9e30-ad87ba5dc0a2.webp?v=1714720802"}},"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: "停產"
}