$product = {"id":7415019896931,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 1G - J個好","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-iv08","description":null,"published_at":"2024-06-11T17:55:49+08:00","created_at":"2024-05-05T20:07:40+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區1G","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-1chun","device-iPhone 12 pro max","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-1chun","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":41911006625891,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-IV08","requires_shipping":true,"taxable":true,"featured_image":{"id":31487944556643,"product_id":7415019896931,"position":7,"created_at":"2024-05-05T20:07:57+08:00","updated_at":"2024-05-05T20:07:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/781c1157f699d680a7c56ae9f4ea7f92dd5dd723_5a6b7c2a-3aa8-4d78-b861-a9b9681ee8a1.webp?v=1714910877","variant_ids":[41911006625891]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 1G - J個好 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118724-IV08","featured_media":{"alt":null,"id":23893288747107,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/781c1157f699d680a7c56ae9f4ea7f92dd5dd723_5a6b7c2a-3aa8-4d78-b861-a9b9681ee8a1.webp?v=1714910877"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ef4666d9f4d03f2f3de2f722ced02200b99d18f_c19b9c76-4b5c-4865-ae8e-213aba6afdb6.webp?v=1714910863","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f18954bd77083a9fc6a98965c07598f34ff0e447_ef765221-4313-4d28-a1b4-038433a8c814.webp?v=1714910865","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59ea110f44b60fb7fd9d714b41bdc134a5fd67c6_ee1dd2b6-c47d-4341-b6e8-a5af57bbc5d6.webp?v=1714910868","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eea55e8174053f66af75b216864918436b9dfa4e_d5d21e8a-ea85-4b93-8a1b-e9dd2b8446f0.webp?v=1714910870","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ab1bbd569804e048333ad1f7deef5b7ada18e04_6e086d6c-cbc1-4276-abaa-e99243a8fb6d.webp?v=1714910872","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/581043c63c4fd6c57b73728a82909f6c3d7c4a49_4b2952b7-f762-46ab-ab8e-1be9993c8131.webp?v=1714910875","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/781c1157f699d680a7c56ae9f4ea7f92dd5dd723_5a6b7c2a-3aa8-4d78-b861-a9b9681ee8a1.webp?v=1714910877","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a52a2f732a0a058ca871840406bdf7e7c345ef0f_7f0e32ab-e557-4735-b8bb-6d4ae4d38ba1.webp?v=1714910880","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a14010e7bfee2b1a14edd134264d9f27d921dde_2ef930e6-9609-4c6a-8389-4b7cb822ef1f.webp?v=1714910882","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f4107a07c15115901c1c3b673b9ef67cd3d1b05_6f8f10af-5a1d-4b84-b085-38dc0291618b.webp?v=1714910884"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ef4666d9f4d03f2f3de2f722ced02200b99d18f_c19b9c76-4b5c-4865-ae8e-213aba6afdb6.webp?v=1714910863","options":["color"],"media":[{"alt":null,"id":23893285273699,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ef4666d9f4d03f2f3de2f722ced02200b99d18f_c19b9c76-4b5c-4865-ae8e-213aba6afdb6.webp?v=1714910863"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ef4666d9f4d03f2f3de2f722ced02200b99d18f_c19b9c76-4b5c-4865-ae8e-213aba6afdb6.webp?v=1714910863","width":2000},{"alt":null,"id":23893285863523,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f18954bd77083a9fc6a98965c07598f34ff0e447_ef765221-4313-4d28-a1b4-038433a8c814.webp?v=1714910865"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f18954bd77083a9fc6a98965c07598f34ff0e447_ef765221-4313-4d28-a1b4-038433a8c814.webp?v=1714910865","width":2000},{"alt":null,"id":23893286355043,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59ea110f44b60fb7fd9d714b41bdc134a5fd67c6_ee1dd2b6-c47d-4341-b6e8-a5af57bbc5d6.webp?v=1714910868"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59ea110f44b60fb7fd9d714b41bdc134a5fd67c6_ee1dd2b6-c47d-4341-b6e8-a5af57bbc5d6.webp?v=1714910868","width":2000},{"alt":null,"id":23893287174243,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eea55e8174053f66af75b216864918436b9dfa4e_d5d21e8a-ea85-4b93-8a1b-e9dd2b8446f0.webp?v=1714910870"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eea55e8174053f66af75b216864918436b9dfa4e_d5d21e8a-ea85-4b93-8a1b-e9dd2b8446f0.webp?v=1714910870","width":2000},{"alt":null,"id":23893287960675,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ab1bbd569804e048333ad1f7deef5b7ada18e04_6e086d6c-cbc1-4276-abaa-e99243a8fb6d.webp?v=1714910872"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ab1bbd569804e048333ad1f7deef5b7ada18e04_6e086d6c-cbc1-4276-abaa-e99243a8fb6d.webp?v=1714910872","width":2000},{"alt":null,"id":23893288321123,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/581043c63c4fd6c57b73728a82909f6c3d7c4a49_4b2952b7-f762-46ab-ab8e-1be9993c8131.webp?v=1714910875"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/581043c63c4fd6c57b73728a82909f6c3d7c4a49_4b2952b7-f762-46ab-ab8e-1be9993c8131.webp?v=1714910875","width":2000},{"alt":null,"id":23893288747107,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/781c1157f699d680a7c56ae9f4ea7f92dd5dd723_5a6b7c2a-3aa8-4d78-b861-a9b9681ee8a1.webp?v=1714910877"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/781c1157f699d680a7c56ae9f4ea7f92dd5dd723_5a6b7c2a-3aa8-4d78-b861-a9b9681ee8a1.webp?v=1714910877","width":2000},{"alt":null,"id":23893289500771,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a52a2f732a0a058ca871840406bdf7e7c345ef0f_7f0e32ab-e557-4735-b8bb-6d4ae4d38ba1.webp?v=1714910880"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a52a2f732a0a058ca871840406bdf7e7c345ef0f_7f0e32ab-e557-4735-b8bb-6d4ae4d38ba1.webp?v=1714910880","width":2000},{"alt":null,"id":23893290090595,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a14010e7bfee2b1a14edd134264d9f27d921dde_2ef930e6-9609-4c6a-8389-4b7cb822ef1f.webp?v=1714910882"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a14010e7bfee2b1a14edd134264d9f27d921dde_2ef930e6-9609-4c6a-8389-4b7cb822ef1f.webp?v=1714910882","width":2000},{"alt":null,"id":23893290614883,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f4107a07c15115901c1c3b673b9ef67cd3d1b05_6f8f10af-5a1d-4b84-b085-38dc0291618b.webp?v=1714910884"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f4107a07c15115901c1c3b673b9ef67cd3d1b05_6f8f10af-5a1d-4b84-b085-38dc0291618b.webp?v=1714910884","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41911006625891,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-IV08","requires_shipping":true,"taxable":true,"featured_image":{"id":31487944556643,"product_id":7415019896931,"position":7,"created_at":"2024-05-05T20:07:57+08:00","updated_at":"2024-05-05T20:07:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/781c1157f699d680a7c56ae9f4ea7f92dd5dd723_5a6b7c2a-3aa8-4d78-b861-a9b9681ee8a1.webp?v=1714910877","variant_ids":[41911006625891]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 1G - J個好 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118724-IV08","featured_media":{"alt":null,"id":23893288747107,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/781c1157f699d680a7c56ae9f4ea7f92dd5dd723_5a6b7c2a-3aa8-4d78-b861-a9b9681ee8a1.webp?v=1714910877"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41911006625891,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-IV08","requires_shipping":true,"taxable":true,"featured_image":{"id":31487944556643,"product_id":7415019896931,"position":7,"created_at":"2024-05-05T20:07:57+08:00","updated_at":"2024-05-05T20:07:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/781c1157f699d680a7c56ae9f4ea7f92dd5dd723_5a6b7c2a-3aa8-4d78-b861-a9b9681ee8a1.webp?v=1714910877","variant_ids":[41911006625891]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 1G - J個好 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118724-IV08","featured_media":{"alt":null,"id":23893288747107,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/781c1157f699d680a7c56ae9f4ea7f92dd5dd723_5a6b7c2a-3aa8-4d78-b861-a9b9681ee8a1.webp?v=1714910877"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}};
$device_handle = null;
$type = "";
var sellingStatus
if ($isMerge) {
$(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: "停產"
}