$product = {"id":7415060758627,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Batman - 小丑女 瘋狂的愛","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-sb09","description":null,"published_at":"2024-06-11T17:56:55+08:00","created_at":"2024-05-05T20:15:18+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":41911452926051,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-SB09","requires_shipping":true,"taxable":true,"featured_image":{"id":31488050298979,"product_id":7415060758627,"position":4,"created_at":"2024-05-05T20:15:28+08:00","updated_at":"2024-05-05T20:15:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c825b864a876515276c0bff4e77fbeab194c485_ad5d5ff7-152c-41fe-9151-ca1ed3335a7e.webp?v=1714911328","variant_ids":[41911452926051]},"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-SB09","featured_media":{"alt":null,"id":23893394686051,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c825b864a876515276c0bff4e77fbeab194c485_ad5d5ff7-152c-41fe-9151-ca1ed3335a7e.webp?v=1714911328"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10583aebe10128baee710fcbf65665d072b6bd53_b6337285-caee-46d1-8c7a-d9219136bf99.webp?v=1714911321","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7eade5405a0238c8d97271393411c2234035b94e_5c32705d-9829-4dce-a36c-e79f07376117.webp?v=1714911323","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3942019e53cc16d86ae0ad7d6e449fdb5944daee_5e77a24d-2a15-4986-a4a5-355df1de11f7.webp?v=1714911326","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c825b864a876515276c0bff4e77fbeab194c485_ad5d5ff7-152c-41fe-9151-ca1ed3335a7e.webp?v=1714911328","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/149557227b338b0c1ed06fdb5704997a88266d24_cd50b9ca-8890-4e95-94e5-aef9f3fa3858.webp?v=1714911331","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/151d61171be565de06d78f9d68bbff9adfad9ba2_9b31e2d2-496b-4350-b00b-554d2c60ff04.webp?v=1714911333","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c8a93a23e8170e5984943bbd8b5e1a88c733081c_8313fff6-f088-47c8-99a5-93c766ac65f5.webp?v=1714911336","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/49d2bacece0fcb1881c11bedcbd4f214323d37c9_435a7993-7cae-4afa-a50a-2657bb99c661.webp?v=1714911338","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0dc32a9edec07f02cddd1108534c742861efcc3f_70eb6de4-4dc5-472f-8384-d4365f11ba15.webp?v=1714911341","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88874d420fef9751cf748887bde2f4647b76a18d_2d57c2af-76a3-4f62-a6df-15d8603c6552.webp?v=1714911343"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10583aebe10128baee710fcbf65665d072b6bd53_b6337285-caee-46d1-8c7a-d9219136bf99.webp?v=1714911321","options":["color"],"media":[{"alt":null,"id":23893392523363,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10583aebe10128baee710fcbf65665d072b6bd53_b6337285-caee-46d1-8c7a-d9219136bf99.webp?v=1714911321"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10583aebe10128baee710fcbf65665d072b6bd53_b6337285-caee-46d1-8c7a-d9219136bf99.webp?v=1714911321","width":2000},{"alt":null,"id":23893393571939,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7eade5405a0238c8d97271393411c2234035b94e_5c32705d-9829-4dce-a36c-e79f07376117.webp?v=1714911323"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7eade5405a0238c8d97271393411c2234035b94e_5c32705d-9829-4dce-a36c-e79f07376117.webp?v=1714911323","width":2000},{"alt":null,"id":23893393997923,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3942019e53cc16d86ae0ad7d6e449fdb5944daee_5e77a24d-2a15-4986-a4a5-355df1de11f7.webp?v=1714911326"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3942019e53cc16d86ae0ad7d6e449fdb5944daee_5e77a24d-2a15-4986-a4a5-355df1de11f7.webp?v=1714911326","width":2000},{"alt":null,"id":23893394686051,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c825b864a876515276c0bff4e77fbeab194c485_ad5d5ff7-152c-41fe-9151-ca1ed3335a7e.webp?v=1714911328"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c825b864a876515276c0bff4e77fbeab194c485_ad5d5ff7-152c-41fe-9151-ca1ed3335a7e.webp?v=1714911328","width":2000},{"alt":null,"id":23893395013731,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/149557227b338b0c1ed06fdb5704997a88266d24_cd50b9ca-8890-4e95-94e5-aef9f3fa3858.webp?v=1714911331"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/149557227b338b0c1ed06fdb5704997a88266d24_cd50b9ca-8890-4e95-94e5-aef9f3fa3858.webp?v=1714911331","width":2000},{"alt":null,"id":23893395701859,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/151d61171be565de06d78f9d68bbff9adfad9ba2_9b31e2d2-496b-4350-b00b-554d2c60ff04.webp?v=1714911333"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/151d61171be565de06d78f9d68bbff9adfad9ba2_9b31e2d2-496b-4350-b00b-554d2c60ff04.webp?v=1714911333","width":2000},{"alt":null,"id":23893396455523,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c8a93a23e8170e5984943bbd8b5e1a88c733081c_8313fff6-f088-47c8-99a5-93c766ac65f5.webp?v=1714911336"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c8a93a23e8170e5984943bbd8b5e1a88c733081c_8313fff6-f088-47c8-99a5-93c766ac65f5.webp?v=1714911336","width":2000},{"alt":null,"id":23893396914275,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/49d2bacece0fcb1881c11bedcbd4f214323d37c9_435a7993-7cae-4afa-a50a-2657bb99c661.webp?v=1714911338"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/49d2bacece0fcb1881c11bedcbd4f214323d37c9_435a7993-7cae-4afa-a50a-2657bb99c661.webp?v=1714911338","width":2000},{"alt":null,"id":23893397438563,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0dc32a9edec07f02cddd1108534c742861efcc3f_70eb6de4-4dc5-472f-8384-d4365f11ba15.webp?v=1714911341"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0dc32a9edec07f02cddd1108534c742861efcc3f_70eb6de4-4dc5-472f-8384-d4365f11ba15.webp?v=1714911341","width":2000},{"alt":null,"id":23893398028387,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88874d420fef9751cf748887bde2f4647b76a18d_2d57c2af-76a3-4f62-a6df-15d8603c6552.webp?v=1714911343"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88874d420fef9751cf748887bde2f4647b76a18d_2d57c2af-76a3-4f62-a6df-15d8603c6552.webp?v=1714911343","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41911452926051,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-SB09","requires_shipping":true,"taxable":true,"featured_image":{"id":31488050298979,"product_id":7415060758627,"position":4,"created_at":"2024-05-05T20:15:28+08:00","updated_at":"2024-05-05T20:15:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c825b864a876515276c0bff4e77fbeab194c485_ad5d5ff7-152c-41fe-9151-ca1ed3335a7e.webp?v=1714911328","variant_ids":[41911452926051]},"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-SB09","featured_media":{"alt":null,"id":23893394686051,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c825b864a876515276c0bff4e77fbeab194c485_ad5d5ff7-152c-41fe-9151-ca1ed3335a7e.webp?v=1714911328"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41911452926051,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-SB09","requires_shipping":true,"taxable":true,"featured_image":{"id":31488050298979,"product_id":7415060758627,"position":4,"created_at":"2024-05-05T20:15:28+08:00","updated_at":"2024-05-05T20:15:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c825b864a876515276c0bff4e77fbeab194c485_ad5d5ff7-152c-41fe-9151-ca1ed3335a7e.webp?v=1714911328","variant_ids":[41911452926051]},"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-SB09","featured_media":{"alt":null,"id":23893394686051,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c825b864a876515276c0bff4e77fbeab194c485_ad5d5ff7-152c-41fe-9151-ca1ed3335a7e.webp?v=1714911328"}},"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: "停產"
}