$product = {"id":7415034413155,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Batman - 小丑女與小丑","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-sb18","description":null,"published_at":"2024-06-11T17:56:12+08:00","created_at":"2024-05-05T20:10:40+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":41911168467043,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-SB18","requires_shipping":true,"taxable":true,"featured_image":{"id":31487984664675,"product_id":7415034413155,"position":4,"created_at":"2024-05-05T20:10:50+08:00","updated_at":"2024-05-05T20:10:50+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8356815ca246dc63d693f17239930f950f038ca9_e0defd6c-ad0d-45f8-990f-655e40c03b16.webp?v=1714911050","variant_ids":[41911168467043]},"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-SB18","featured_media":{"alt":null,"id":23893328986211,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8356815ca246dc63d693f17239930f950f038ca9_e0defd6c-ad0d-45f8-990f-655e40c03b16.webp?v=1714911050"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8903afba4d3528b26feb76cd85e946de0919bd1_da30e80a-6a9e-49e6-a270-54e289a4a967.webp?v=1714911042","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/73a3b2f1bdd696cad741aeef5834b1dc4c7aae47_7d2e4d90-008e-45fc-b7fb-085d47d8c3cd.webp?v=1714911045","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df57ea71ff441895a5d4ff564d56cb00a78c0600_57bd5a48-375e-48f3-bc8c-ecd032689098.webp?v=1714911047","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8356815ca246dc63d693f17239930f950f038ca9_e0defd6c-ad0d-45f8-990f-655e40c03b16.webp?v=1714911050","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c5eadc4408cbf8cda0b7bf2acb544ed772cbe0ba_6a936b31-0521-4dbe-b41a-84821c78a9a8.webp?v=1714911052","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ecb31bac29b521c486085a8bdb04323909eacd5d_7664b89d-f9c9-4c8d-89ad-a3142fdd5e37.webp?v=1714911054","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e8bd5c9876f6e33fd18ef650780e8d0f57362a68_ef7fa8b8-198e-44ff-a23b-3cf05b5786ff.webp?v=1714911057","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/355145d972dbc4e34d75aeab273dc6cf70b98eec_7bfdad6b-e6bc-4d6e-ae4c-81a5fe52dcfd.webp?v=1714911060","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f4dd3dff70e4d4d4d806ce74732f3edd130984e9_0c512048-0db8-4fc9-876d-e54b25fa7882.webp?v=1714911062","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e52366f1a66e9c70637b730059aa195ff48816bc_1ac12f0f-c9a0-44bf-bf95-d42984865b66.webp?v=1714911064"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8903afba4d3528b26feb76cd85e946de0919bd1_da30e80a-6a9e-49e6-a270-54e289a4a967.webp?v=1714911042","options":["color"],"media":[{"alt":null,"id":23893327085667,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8903afba4d3528b26feb76cd85e946de0919bd1_da30e80a-6a9e-49e6-a270-54e289a4a967.webp?v=1714911042"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8903afba4d3528b26feb76cd85e946de0919bd1_da30e80a-6a9e-49e6-a270-54e289a4a967.webp?v=1714911042","width":2000},{"alt":null,"id":23893327872099,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/73a3b2f1bdd696cad741aeef5834b1dc4c7aae47_7d2e4d90-008e-45fc-b7fb-085d47d8c3cd.webp?v=1714911045"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/73a3b2f1bdd696cad741aeef5834b1dc4c7aae47_7d2e4d90-008e-45fc-b7fb-085d47d8c3cd.webp?v=1714911045","width":2000},{"alt":null,"id":23893328298083,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df57ea71ff441895a5d4ff564d56cb00a78c0600_57bd5a48-375e-48f3-bc8c-ecd032689098.webp?v=1714911047"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df57ea71ff441895a5d4ff564d56cb00a78c0600_57bd5a48-375e-48f3-bc8c-ecd032689098.webp?v=1714911047","width":2000},{"alt":null,"id":23893328986211,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8356815ca246dc63d693f17239930f950f038ca9_e0defd6c-ad0d-45f8-990f-655e40c03b16.webp?v=1714911050"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8356815ca246dc63d693f17239930f950f038ca9_e0defd6c-ad0d-45f8-990f-655e40c03b16.webp?v=1714911050","width":2000},{"alt":null,"id":23893329379427,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c5eadc4408cbf8cda0b7bf2acb544ed772cbe0ba_6a936b31-0521-4dbe-b41a-84821c78a9a8.webp?v=1714911052"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c5eadc4408cbf8cda0b7bf2acb544ed772cbe0ba_6a936b31-0521-4dbe-b41a-84821c78a9a8.webp?v=1714911052","width":2000},{"alt":null,"id":23893330002019,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ecb31bac29b521c486085a8bdb04323909eacd5d_7664b89d-f9c9-4c8d-89ad-a3142fdd5e37.webp?v=1714911054"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ecb31bac29b521c486085a8bdb04323909eacd5d_7664b89d-f9c9-4c8d-89ad-a3142fdd5e37.webp?v=1714911054","width":2000},{"alt":null,"id":23893330460771,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e8bd5c9876f6e33fd18ef650780e8d0f57362a68_ef7fa8b8-198e-44ff-a23b-3cf05b5786ff.webp?v=1714911057"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e8bd5c9876f6e33fd18ef650780e8d0f57362a68_ef7fa8b8-198e-44ff-a23b-3cf05b5786ff.webp?v=1714911057","width":2000},{"alt":null,"id":23893330919523,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/355145d972dbc4e34d75aeab273dc6cf70b98eec_7bfdad6b-e6bc-4d6e-ae4c-81a5fe52dcfd.webp?v=1714911060"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/355145d972dbc4e34d75aeab273dc6cf70b98eec_7bfdad6b-e6bc-4d6e-ae4c-81a5fe52dcfd.webp?v=1714911060","width":2000},{"alt":null,"id":23893331312739,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f4dd3dff70e4d4d4d806ce74732f3edd130984e9_0c512048-0db8-4fc9-876d-e54b25fa7882.webp?v=1714911062"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f4dd3dff70e4d4d4d806ce74732f3edd130984e9_0c512048-0db8-4fc9-876d-e54b25fa7882.webp?v=1714911062","width":2000},{"alt":null,"id":23893331837027,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e52366f1a66e9c70637b730059aa195ff48816bc_1ac12f0f-c9a0-44bf-bf95-d42984865b66.webp?v=1714911064"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e52366f1a66e9c70637b730059aa195ff48816bc_1ac12f0f-c9a0-44bf-bf95-d42984865b66.webp?v=1714911064","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41911168467043,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-SB18","requires_shipping":true,"taxable":true,"featured_image":{"id":31487984664675,"product_id":7415034413155,"position":4,"created_at":"2024-05-05T20:10:50+08:00","updated_at":"2024-05-05T20:10:50+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8356815ca246dc63d693f17239930f950f038ca9_e0defd6c-ad0d-45f8-990f-655e40c03b16.webp?v=1714911050","variant_ids":[41911168467043]},"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-SB18","featured_media":{"alt":null,"id":23893328986211,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8356815ca246dc63d693f17239930f950f038ca9_e0defd6c-ad0d-45f8-990f-655e40c03b16.webp?v=1714911050"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41911168467043,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-SB18","requires_shipping":true,"taxable":true,"featured_image":{"id":31487984664675,"product_id":7415034413155,"position":4,"created_at":"2024-05-05T20:10:50+08:00","updated_at":"2024-05-05T20:10:50+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8356815ca246dc63d693f17239930f950f038ca9_e0defd6c-ad0d-45f8-990f-655e40c03b16.webp?v=1714911050","variant_ids":[41911168467043]},"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-SB18","featured_media":{"alt":null,"id":23893328986211,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8356815ca246dc63d693f17239930f950f038ca9_e0defd6c-ad0d-45f8-990f-655e40c03b16.webp?v=1714911050"}},"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: "停產"
}