$product = {"id":7415103324259,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Batman - 蝙蝠車","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-sb05","description":null,"published_at":"2024-06-11T17:58:03+08:00","created_at":"2024-05-05T20:23:26+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區Batman","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-batman","device-iPhone 12 pro max","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-batman","Top50","type-Mod NX Printable MagSafe Printable"],"price":110000,"price_min":110000,"price_max":110000,"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":41911909089379,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-SB05","requires_shipping":true,"taxable":true,"featured_image":{"id":31488172490851,"product_id":7415103324259,"position":7,"created_at":"2024-05-05T20:23:52+08:00","updated_at":"2024-05-05T20:23:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b55af5dc389e9dfbb3deadeabbf07ea137007d7_4af005b8-6562-4647-9a3f-e4b581266a09.webp?v=1714911832","variant_ids":[41911909089379]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Batman - 蝙蝠車 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118724-SB05","featured_media":{"alt":null,"id":23893517107299,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b55af5dc389e9dfbb3deadeabbf07ea137007d7_4af005b8-6562-4647-9a3f-e4b581266a09.webp?v=1714911832"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3fc551bf863b68955c7fa2a095f6f98ed63267b6_e75a064d-c95c-4764-89b4-1118516f8355.webp?v=1714911809","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d5114e91a4f6fcd19d6088c258c7999937fb920_951cd758-471a-49b1-a672-966817328ace.webp?v=1714911811","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84cd102478df219c5c703db99bf6d8605c01174b_00ab520d-42e9-4f03-af9b-e508ff8f9564.webp?v=1714911822","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d26746c3763ed3f70fca205657f5176c7c64e2f3_0d46c36e-d5fd-436b-b340-20ed8028f5c5.webp?v=1714911825","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7eba3adb3f92c818d55acb85c036adc023987798_00d3bb60-b613-42b6-a0ed-4345e9ae01b0.webp?v=1714911827","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f1d4b3ea6bdbc427d94baa120ee52652e6ebb04_bfc8cee0-2e67-46f7-b2e6-5210b54eab88.webp?v=1714911830","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b55af5dc389e9dfbb3deadeabbf07ea137007d7_4af005b8-6562-4647-9a3f-e4b581266a09.webp?v=1714911832","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b89899d4f140bf132f47695b3e9ffc1fbef5cc68_067c8ce2-4871-4db2-aa9e-f9ec621de570.webp?v=1714911834","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a03d6261e9d5a22b301d1e15bd5554c2b0e97e21_e2f7b753-201a-499b-9ff1-2221fe25599a.webp?v=1714911837","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/704222a022c02bcbde8c7141d358cda2446af4f8_23a4f007-8f99-42c1-9da1-ce28b765befe.webp?v=1714911839"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3fc551bf863b68955c7fa2a095f6f98ed63267b6_e75a064d-c95c-4764-89b4-1118516f8355.webp?v=1714911809","options":["color"],"media":[{"alt":null,"id":23893512716387,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3fc551bf863b68955c7fa2a095f6f98ed63267b6_e75a064d-c95c-4764-89b4-1118516f8355.webp?v=1714911809"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3fc551bf863b68955c7fa2a095f6f98ed63267b6_e75a064d-c95c-4764-89b4-1118516f8355.webp?v=1714911809","width":2000},{"alt":null,"id":23893513437283,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d5114e91a4f6fcd19d6088c258c7999937fb920_951cd758-471a-49b1-a672-966817328ace.webp?v=1714911811"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d5114e91a4f6fcd19d6088c258c7999937fb920_951cd758-471a-49b1-a672-966817328ace.webp?v=1714911811","width":2000},{"alt":null,"id":23893515239523,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84cd102478df219c5c703db99bf6d8605c01174b_00ab520d-42e9-4f03-af9b-e508ff8f9564.webp?v=1714911822"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84cd102478df219c5c703db99bf6d8605c01174b_00ab520d-42e9-4f03-af9b-e508ff8f9564.webp?v=1714911822","width":2000},{"alt":null,"id":23893515698275,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d26746c3763ed3f70fca205657f5176c7c64e2f3_0d46c36e-d5fd-436b-b340-20ed8028f5c5.webp?v=1714911825"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d26746c3763ed3f70fca205657f5176c7c64e2f3_0d46c36e-d5fd-436b-b340-20ed8028f5c5.webp?v=1714911825","width":2000},{"alt":null,"id":23893516255331,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7eba3adb3f92c818d55acb85c036adc023987798_00d3bb60-b613-42b6-a0ed-4345e9ae01b0.webp?v=1714911827"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7eba3adb3f92c818d55acb85c036adc023987798_00d3bb60-b613-42b6-a0ed-4345e9ae01b0.webp?v=1714911827","width":2000},{"alt":null,"id":23893516583011,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f1d4b3ea6bdbc427d94baa120ee52652e6ebb04_bfc8cee0-2e67-46f7-b2e6-5210b54eab88.webp?v=1714911830"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f1d4b3ea6bdbc427d94baa120ee52652e6ebb04_bfc8cee0-2e67-46f7-b2e6-5210b54eab88.webp?v=1714911830","width":2000},{"alt":null,"id":23893517107299,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b55af5dc389e9dfbb3deadeabbf07ea137007d7_4af005b8-6562-4647-9a3f-e4b581266a09.webp?v=1714911832"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b55af5dc389e9dfbb3deadeabbf07ea137007d7_4af005b8-6562-4647-9a3f-e4b581266a09.webp?v=1714911832","width":2000},{"alt":null,"id":23893518254179,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b89899d4f140bf132f47695b3e9ffc1fbef5cc68_067c8ce2-4871-4db2-aa9e-f9ec621de570.webp?v=1714911834"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b89899d4f140bf132f47695b3e9ffc1fbef5cc68_067c8ce2-4871-4db2-aa9e-f9ec621de570.webp?v=1714911834","width":2000},{"alt":null,"id":23893518844003,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a03d6261e9d5a22b301d1e15bd5554c2b0e97e21_e2f7b753-201a-499b-9ff1-2221fe25599a.webp?v=1714911837"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a03d6261e9d5a22b301d1e15bd5554c2b0e97e21_e2f7b753-201a-499b-9ff1-2221fe25599a.webp?v=1714911837","width":2000},{"alt":null,"id":23893519204451,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/704222a022c02bcbde8c7141d358cda2446af4f8_23a4f007-8f99-42c1-9da1-ce28b765befe.webp?v=1714911839"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/704222a022c02bcbde8c7141d358cda2446af4f8_23a4f007-8f99-42c1-9da1-ce28b765befe.webp?v=1714911839","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41911909089379,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-SB05","requires_shipping":true,"taxable":true,"featured_image":{"id":31488172490851,"product_id":7415103324259,"position":7,"created_at":"2024-05-05T20:23:52+08:00","updated_at":"2024-05-05T20:23:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b55af5dc389e9dfbb3deadeabbf07ea137007d7_4af005b8-6562-4647-9a3f-e4b581266a09.webp?v=1714911832","variant_ids":[41911909089379]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Batman - 蝙蝠車 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118724-SB05","featured_media":{"alt":null,"id":23893517107299,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b55af5dc389e9dfbb3deadeabbf07ea137007d7_4af005b8-6562-4647-9a3f-e4b581266a09.webp?v=1714911832"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41911909089379,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-SB05","requires_shipping":true,"taxable":true,"featured_image":{"id":31488172490851,"product_id":7415103324259,"position":7,"created_at":"2024-05-05T20:23:52+08:00","updated_at":"2024-05-05T20:23:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b55af5dc389e9dfbb3deadeabbf07ea137007d7_4af005b8-6562-4647-9a3f-e4b581266a09.webp?v=1714911832","variant_ids":[41911909089379]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Batman - 蝙蝠車 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118724-SB05","featured_media":{"alt":null,"id":23893517107299,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b55af5dc389e9dfbb3deadeabbf07ea137007d7_4af005b8-6562-4647-9a3f-e4b581266a09.webp?v=1714911832"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}};
$device_handle = null;
$brand_handle = null;
$type = "";
var sellingStatus
// 只有設計款(SKU 含 '-')才需要合圖
if ($isMerge && $defaultVariant.sku.includes('-')) {
$(document).ready(function() {
var productImg = $product.images[0];
var bumperImg = window.getProductImageUrl($defaultVariant.sku.split('-')[0]);
var layers = ($type === 'mod-nx-backplate' || $type === 'mod-backplate')
? [productImg, bumperImg]
: [bumperImg, productImg];
window.mergeProductImages(layers).then(function (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: "停產"
}