$product = {"id":7408380149859,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【獨家設計款】 - 春夏犬の時裝週","handle":"iphone-12-pro-max-mod-nx-printable-b071","description":null,"published_at":"2024-06-11T16:35:38+08:00","created_at":"2024-05-03T15:15:05+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"MOD NX 客製化","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","device-iPhone 12 pro max","discountable-item","member","merge","mod-nx-printable","new-modnx-sku","reseller","reseller-modnx-original-design","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":41884832563299,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-B071","requires_shipping":true,"taxable":true,"featured_image":{"id":31472110403683,"product_id":7408380149859,"position":1,"created_at":"2024-05-03T15:15:07+08:00","updated_at":"2024-05-03T15:15:07+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f53bf664686b692fefe18cd1b6a6b442ec74d13_c25bb06b-da6c-481c-a708-7bce5f671899.webp?v=1714720507","variant_ids":[41884832563299]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【獨家設計款】 - 春夏犬の時裝週 - 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-B071","featured_media":{"alt":null,"id":23877025857635,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f53bf664686b692fefe18cd1b6a6b442ec74d13_c25bb06b-da6c-481c-a708-7bce5f671899.webp?v=1714720507"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f53bf664686b692fefe18cd1b6a6b442ec74d13_c25bb06b-da6c-481c-a708-7bce5f671899.webp?v=1714720507","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/486b455a11a3675d2cf9cc3e7be738fef02d63a7_2676e5af-67e9-43fb-96ee-e07868ae0c33.webp?v=1714720510","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/682a1e3023051e7177d13720f9091721c2c9d98e_9a332d81-724a-49a8-bdd3-595cad3f657e.webp?v=1714720512","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e20ca2ec758373e77852fd98d902aa7637ad311_0e40888e-6a52-41b3-a56e-7ce055824379.webp?v=1714720515","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/73a2eace390adc05c93fb5ec744d23c415a37324_de375bdc-e8b0-4b95-afaf-71f9a9ccd2f8.webp?v=1714720517","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a581e18898b61e609bd0e7b5b9b095306921c091_e39dff2e-f83a-4448-9606-04cfb0ef8a03.webp?v=1714720520","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2c9e0b8ccf94587ef2ea90a06b0a1114d38f583_19d99e51-3d92-44f6-9239-7156a029dffb.webp?v=1714720522","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/477ac0c67dc5915708580f6bf923436313e07fed_81c9c769-63a4-44bf-a35d-4bb0cf50d065.webp?v=1714720524","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a433078a9636bc8a9426f9c1ae938e30d933cbce_a823dfaf-f997-43f8-82d0-ab0dbae0cec6.webp?v=1714720527","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d2d163062799a414a28d60e67bd3c1f10bd28eb7_7be86d0d-def8-4400-883b-4a32e8518214.webp?v=1714720529"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f53bf664686b692fefe18cd1b6a6b442ec74d13_c25bb06b-da6c-481c-a708-7bce5f671899.webp?v=1714720507","options":["color"],"media":[{"alt":null,"id":23877025857635,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f53bf664686b692fefe18cd1b6a6b442ec74d13_c25bb06b-da6c-481c-a708-7bce5f671899.webp?v=1714720507"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f53bf664686b692fefe18cd1b6a6b442ec74d13_c25bb06b-da6c-481c-a708-7bce5f671899.webp?v=1714720507","width":2000},{"alt":null,"id":23877026316387,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/486b455a11a3675d2cf9cc3e7be738fef02d63a7_2676e5af-67e9-43fb-96ee-e07868ae0c33.webp?v=1714720510"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/486b455a11a3675d2cf9cc3e7be738fef02d63a7_2676e5af-67e9-43fb-96ee-e07868ae0c33.webp?v=1714720510","width":2000},{"alt":null,"id":23877026938979,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/682a1e3023051e7177d13720f9091721c2c9d98e_9a332d81-724a-49a8-bdd3-595cad3f657e.webp?v=1714720512"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/682a1e3023051e7177d13720f9091721c2c9d98e_9a332d81-724a-49a8-bdd3-595cad3f657e.webp?v=1714720512","width":2000},{"alt":null,"id":23877027332195,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e20ca2ec758373e77852fd98d902aa7637ad311_0e40888e-6a52-41b3-a56e-7ce055824379.webp?v=1714720515"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e20ca2ec758373e77852fd98d902aa7637ad311_0e40888e-6a52-41b3-a56e-7ce055824379.webp?v=1714720515","width":2000},{"alt":null,"id":23877027856483,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/73a2eace390adc05c93fb5ec744d23c415a37324_de375bdc-e8b0-4b95-afaf-71f9a9ccd2f8.webp?v=1714720517"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/73a2eace390adc05c93fb5ec744d23c415a37324_de375bdc-e8b0-4b95-afaf-71f9a9ccd2f8.webp?v=1714720517","width":2000},{"alt":null,"id":23877028282467,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a581e18898b61e609bd0e7b5b9b095306921c091_e39dff2e-f83a-4448-9606-04cfb0ef8a03.webp?v=1714720520"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a581e18898b61e609bd0e7b5b9b095306921c091_e39dff2e-f83a-4448-9606-04cfb0ef8a03.webp?v=1714720520","width":2000},{"alt":null,"id":23877028905059,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2c9e0b8ccf94587ef2ea90a06b0a1114d38f583_19d99e51-3d92-44f6-9239-7156a029dffb.webp?v=1714720522"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2c9e0b8ccf94587ef2ea90a06b0a1114d38f583_19d99e51-3d92-44f6-9239-7156a029dffb.webp?v=1714720522","width":2000},{"alt":null,"id":23877029298275,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/477ac0c67dc5915708580f6bf923436313e07fed_81c9c769-63a4-44bf-a35d-4bb0cf50d065.webp?v=1714720524"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/477ac0c67dc5915708580f6bf923436313e07fed_81c9c769-63a4-44bf-a35d-4bb0cf50d065.webp?v=1714720524","width":2000},{"alt":null,"id":23877030150243,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a433078a9636bc8a9426f9c1ae938e30d933cbce_a823dfaf-f997-43f8-82d0-ab0dbae0cec6.webp?v=1714720527"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a433078a9636bc8a9426f9c1ae938e30d933cbce_a823dfaf-f997-43f8-82d0-ab0dbae0cec6.webp?v=1714720527","width":2000},{"alt":null,"id":23877030608995,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d2d163062799a414a28d60e67bd3c1f10bd28eb7_7be86d0d-def8-4400-883b-4a32e8518214.webp?v=1714720529"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d2d163062799a414a28d60e67bd3c1f10bd28eb7_7be86d0d-def8-4400-883b-4a32e8518214.webp?v=1714720529","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$bumper = null;
$variants = [{"id":41884832563299,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-B071","requires_shipping":true,"taxable":true,"featured_image":{"id":31472110403683,"product_id":7408380149859,"position":1,"created_at":"2024-05-03T15:15:07+08:00","updated_at":"2024-05-03T15:15:07+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f53bf664686b692fefe18cd1b6a6b442ec74d13_c25bb06b-da6c-481c-a708-7bce5f671899.webp?v=1714720507","variant_ids":[41884832563299]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【獨家設計款】 - 春夏犬の時裝週 - 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-B071","featured_media":{"alt":null,"id":23877025857635,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f53bf664686b692fefe18cd1b6a6b442ec74d13_c25bb06b-da6c-481c-a708-7bce5f671899.webp?v=1714720507"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41884832563299,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-B071","requires_shipping":true,"taxable":true,"featured_image":{"id":31472110403683,"product_id":7408380149859,"position":1,"created_at":"2024-05-03T15:15:07+08:00","updated_at":"2024-05-03T15:15:07+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f53bf664686b692fefe18cd1b6a6b442ec74d13_c25bb06b-da6c-481c-a708-7bce5f671899.webp?v=1714720507","variant_ids":[41884832563299]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【獨家設計款】 - 春夏犬の時裝週 - 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-B071","featured_media":{"alt":null,"id":23877025857635,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f53bf664686b692fefe18cd1b6a6b442ec74d13_c25bb06b-da6c-481c-a708-7bce5f671899.webp?v=1714720507"}},"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: "停產"
}