$product = {"id":7415021994083,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Twenty One Point Five - 21.5 - Miracles Take Time","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-rl02","description":null,"published_at":"2024-06-11T17:55:52+08:00","created_at":"2024-05-05T20:08:07+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區Twenty One Point Five - 21.5","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-twenty-one-point-five","device-iPhone 12 pro max","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-twenty-one-point-five","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":41911032873059,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-RL02","requires_shipping":true,"taxable":true,"featured_image":{"id":31487948947555,"product_id":7415021994083,"position":3,"created_at":"2024-05-05T20:08:14+08:00","updated_at":"2024-05-05T20:08:14+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac4b2ff03602446851110a22f954f92b1b99d2f1_a50f4ced-bae9-4c91-a688-3266ee02dbee.webp?v=1714910894","variant_ids":[41911032873059]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Twenty One Point Five - 21.5 - Miracles Take Time - 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-RL02","featured_media":{"alt":null,"id":23893293170787,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac4b2ff03602446851110a22f954f92b1b99d2f1_a50f4ced-bae9-4c91-a688-3266ee02dbee.webp?v=1714910894"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89d1f7d9f06410bc822b76ab9c68d09ca11aaa6a_7785d120-3ba1-41b0-9a7b-a074927cff7b.webp?v=1714910889","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/229fa00de3ea5fa979bf84373fcdba5f55ee871e_21a3dadb-d236-4e72-ae96-5b3ded5f85cc.webp?v=1714910892","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac4b2ff03602446851110a22f954f92b1b99d2f1_a50f4ced-bae9-4c91-a688-3266ee02dbee.webp?v=1714910894","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2a4f98614d7ec93051d95090c2602191a326299_d27f0abf-8af2-499a-9c99-25b93dc35f3a.webp?v=1714910897","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/439d1a1cebc023bb5ae6b0cf9ab136ae51981d04_4f9ee2a0-53c2-4d38-b4e2-a638148d318b.webp?v=1714910899","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d79a8b564ae73838b9d90bd8e395ed297ae16e0b_546df319-7b38-4e2c-ab6b-0ddc034ce241.webp?v=1714910902","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/977ec100624af2490110bebbf5c5128513c6096b_84efc55f-66f2-4151-bc23-71b6bca31fe9.webp?v=1714910904","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/716a92d963c365e9fcdae4fc918634f08ab84369_4628d16a-554b-4808-a7ca-fc347a0449ab.webp?v=1714910906","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f6b66826b0414cecec361a19671c0160a72556e_e4cf285c-ad6b-4bf7-b33b-2365707a5e72.webp?v=1714910909","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e8e5318b98fe6a0bce9780642a3ed7577b92c177_092a7606-2b8b-4a61-b50e-e5e7a62410b3.webp?v=1714910911"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89d1f7d9f06410bc822b76ab9c68d09ca11aaa6a_7785d120-3ba1-41b0-9a7b-a074927cff7b.webp?v=1714910889","options":["color"],"media":[{"alt":null,"id":23893291991139,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89d1f7d9f06410bc822b76ab9c68d09ca11aaa6a_7785d120-3ba1-41b0-9a7b-a074927cff7b.webp?v=1714910889"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89d1f7d9f06410bc822b76ab9c68d09ca11aaa6a_7785d120-3ba1-41b0-9a7b-a074927cff7b.webp?v=1714910889","width":2000},{"alt":null,"id":23893292613731,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/229fa00de3ea5fa979bf84373fcdba5f55ee871e_21a3dadb-d236-4e72-ae96-5b3ded5f85cc.webp?v=1714910892"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/229fa00de3ea5fa979bf84373fcdba5f55ee871e_21a3dadb-d236-4e72-ae96-5b3ded5f85cc.webp?v=1714910892","width":2000},{"alt":null,"id":23893293170787,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac4b2ff03602446851110a22f954f92b1b99d2f1_a50f4ced-bae9-4c91-a688-3266ee02dbee.webp?v=1714910894"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac4b2ff03602446851110a22f954f92b1b99d2f1_a50f4ced-bae9-4c91-a688-3266ee02dbee.webp?v=1714910894","width":2000},{"alt":null,"id":23893293793379,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2a4f98614d7ec93051d95090c2602191a326299_d27f0abf-8af2-499a-9c99-25b93dc35f3a.webp?v=1714910897"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2a4f98614d7ec93051d95090c2602191a326299_d27f0abf-8af2-499a-9c99-25b93dc35f3a.webp?v=1714910897","width":2000},{"alt":null,"id":23893294841955,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/439d1a1cebc023bb5ae6b0cf9ab136ae51981d04_4f9ee2a0-53c2-4d38-b4e2-a638148d318b.webp?v=1714910899"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/439d1a1cebc023bb5ae6b0cf9ab136ae51981d04_4f9ee2a0-53c2-4d38-b4e2-a638148d318b.webp?v=1714910899","width":2000},{"alt":null,"id":23893295595619,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d79a8b564ae73838b9d90bd8e395ed297ae16e0b_546df319-7b38-4e2c-ab6b-0ddc034ce241.webp?v=1714910902"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d79a8b564ae73838b9d90bd8e395ed297ae16e0b_546df319-7b38-4e2c-ab6b-0ddc034ce241.webp?v=1714910902","width":2000},{"alt":null,"id":23893296054371,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/977ec100624af2490110bebbf5c5128513c6096b_84efc55f-66f2-4151-bc23-71b6bca31fe9.webp?v=1714910904"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/977ec100624af2490110bebbf5c5128513c6096b_84efc55f-66f2-4151-bc23-71b6bca31fe9.webp?v=1714910904","width":2000},{"alt":null,"id":23893296676963,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/716a92d963c365e9fcdae4fc918634f08ab84369_4628d16a-554b-4808-a7ca-fc347a0449ab.webp?v=1714910906"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/716a92d963c365e9fcdae4fc918634f08ab84369_4628d16a-554b-4808-a7ca-fc347a0449ab.webp?v=1714910906","width":2000},{"alt":null,"id":23893297135715,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f6b66826b0414cecec361a19671c0160a72556e_e4cf285c-ad6b-4bf7-b33b-2365707a5e72.webp?v=1714910909"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f6b66826b0414cecec361a19671c0160a72556e_e4cf285c-ad6b-4bf7-b33b-2365707a5e72.webp?v=1714910909","width":2000},{"alt":null,"id":23893297594467,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e8e5318b98fe6a0bce9780642a3ed7577b92c177_092a7606-2b8b-4a61-b50e-e5e7a62410b3.webp?v=1714910911"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e8e5318b98fe6a0bce9780642a3ed7577b92c177_092a7606-2b8b-4a61-b50e-e5e7a62410b3.webp?v=1714910911","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41911032873059,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-RL02","requires_shipping":true,"taxable":true,"featured_image":{"id":31487948947555,"product_id":7415021994083,"position":3,"created_at":"2024-05-05T20:08:14+08:00","updated_at":"2024-05-05T20:08:14+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac4b2ff03602446851110a22f954f92b1b99d2f1_a50f4ced-bae9-4c91-a688-3266ee02dbee.webp?v=1714910894","variant_ids":[41911032873059]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Twenty One Point Five - 21.5 - Miracles Take Time - 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-RL02","featured_media":{"alt":null,"id":23893293170787,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac4b2ff03602446851110a22f954f92b1b99d2f1_a50f4ced-bae9-4c91-a688-3266ee02dbee.webp?v=1714910894"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41911032873059,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-RL02","requires_shipping":true,"taxable":true,"featured_image":{"id":31487948947555,"product_id":7415021994083,"position":3,"created_at":"2024-05-05T20:08:14+08:00","updated_at":"2024-05-05T20:08:14+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac4b2ff03602446851110a22f954f92b1b99d2f1_a50f4ced-bae9-4c91-a688-3266ee02dbee.webp?v=1714910894","variant_ids":[41911032873059]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Twenty One Point Five - 21.5 - Miracles Take Time - 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-RL02","featured_media":{"alt":null,"id":23893293170787,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac4b2ff03602446851110a22f954f92b1b99d2f1_a50f4ced-bae9-4c91-a688-3266ee02dbee.webp?v=1714910894"}},"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: "停產"
}