$product = {"id":7408394174563,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Batman - 小丑拳擊學院","handle":"iphone-12-pro-max-mod-nx-printable-sb07","description":null,"published_at":"2024-06-11T16:36:02+08:00","created_at":"2024-05-03T15:17:54+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-Batman","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-batman","device-iPhone 12 pro max","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-batman","Top50","type-Mod NX Printable"],"price":90000,"price_min":90000,"price_max":90000,"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":41884991946851,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-SB07","requires_shipping":true,"taxable":true,"featured_image":{"id":31472151101539,"product_id":7408394174563,"position":9,"created_at":"2024-05-03T15:18:16+08:00","updated_at":"2024-05-03T15:18:16+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eec3ee3583893bf7f76e30ae70713a4817367529_b5ee5361-6b89-4317-bc58-564cd6a4011a.webp?v=1714720696","variant_ids":[41884991946851]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Batman - 小丑拳擊學院 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118724-SB07","featured_media":{"alt":null,"id":23877066653795,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eec3ee3583893bf7f76e30ae70713a4817367529_b5ee5361-6b89-4317-bc58-564cd6a4011a.webp?v=1714720696"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f259cecde6a087ee0ca0323bc51069d4a0a56e0_d223145c-df92-4757-8807-a13097b8d97a.webp?v=1714720676","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/20c4365a1c77fc36fe43d57343b6565cd2e22e44_4887a5f8-6338-4fa9-a0e7-c185d9d4873f.webp?v=1714720679","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/969048e56ea26a790405f27c2b62056b522e9bae_0522cd54-2f48-4067-a2f6-9b8139779d57.webp?v=1714720681","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7dfb0429febba13770a4dfb1d8dea05feeb0d045_40a6ffcb-9746-4584-855d-bc16fc8368e3.webp?v=1714720684","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/91e33240ee74e9b7f474ddcfbfd82be7487d4b3d_41d995dd-2d71-44c4-955f-a4553d96600b.webp?v=1714720686","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/949c4afd24c56c3732b6d93bc1c5f077f1b3e085_142dcbbc-61cc-43a0-bec9-e023d1742b9f.webp?v=1714720689","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/adccb34c48ff9d43af1c600cc3b52406966db053_47b50ef5-2e47-45be-932a-29a7a6798181.webp?v=1714720691","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10301c683c2fd1e090a5d6cfea450f2125768837_7b87d6e2-025a-4e18-ab8a-b9159518bf61.webp?v=1714720694","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eec3ee3583893bf7f76e30ae70713a4817367529_b5ee5361-6b89-4317-bc58-564cd6a4011a.webp?v=1714720696","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76a0036a5b2068fd667377144878a7c68b9eba8b_9f5b4b2e-8ace-42d9-bd3c-398ba8414a06.webp?v=1714720698"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f259cecde6a087ee0ca0323bc51069d4a0a56e0_d223145c-df92-4757-8807-a13097b8d97a.webp?v=1714720676","options":["color"],"media":[{"alt":null,"id":23877061804131,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f259cecde6a087ee0ca0323bc51069d4a0a56e0_d223145c-df92-4757-8807-a13097b8d97a.webp?v=1714720676"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f259cecde6a087ee0ca0323bc51069d4a0a56e0_d223145c-df92-4757-8807-a13097b8d97a.webp?v=1714720676","width":2000},{"alt":null,"id":23877062426723,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/20c4365a1c77fc36fe43d57343b6565cd2e22e44_4887a5f8-6338-4fa9-a0e7-c185d9d4873f.webp?v=1714720679"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/20c4365a1c77fc36fe43d57343b6565cd2e22e44_4887a5f8-6338-4fa9-a0e7-c185d9d4873f.webp?v=1714720679","width":2000},{"alt":null,"id":23877063114851,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/969048e56ea26a790405f27c2b62056b522e9bae_0522cd54-2f48-4067-a2f6-9b8139779d57.webp?v=1714720681"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/969048e56ea26a790405f27c2b62056b522e9bae_0522cd54-2f48-4067-a2f6-9b8139779d57.webp?v=1714720681","width":2000},{"alt":null,"id":23877063770211,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7dfb0429febba13770a4dfb1d8dea05feeb0d045_40a6ffcb-9746-4584-855d-bc16fc8368e3.webp?v=1714720684"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7dfb0429febba13770a4dfb1d8dea05feeb0d045_40a6ffcb-9746-4584-855d-bc16fc8368e3.webp?v=1714720684","width":2000},{"alt":null,"id":23877064097891,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/91e33240ee74e9b7f474ddcfbfd82be7487d4b3d_41d995dd-2d71-44c4-955f-a4553d96600b.webp?v=1714720686"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/91e33240ee74e9b7f474ddcfbfd82be7487d4b3d_41d995dd-2d71-44c4-955f-a4553d96600b.webp?v=1714720686","width":2000},{"alt":null,"id":23877064917091,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/949c4afd24c56c3732b6d93bc1c5f077f1b3e085_142dcbbc-61cc-43a0-bec9-e023d1742b9f.webp?v=1714720689"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/949c4afd24c56c3732b6d93bc1c5f077f1b3e085_142dcbbc-61cc-43a0-bec9-e023d1742b9f.webp?v=1714720689","width":2000},{"alt":null,"id":23877065375843,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/adccb34c48ff9d43af1c600cc3b52406966db053_47b50ef5-2e47-45be-932a-29a7a6798181.webp?v=1714720691"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/adccb34c48ff9d43af1c600cc3b52406966db053_47b50ef5-2e47-45be-932a-29a7a6798181.webp?v=1714720691","width":2000},{"alt":null,"id":23877065965667,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10301c683c2fd1e090a5d6cfea450f2125768837_7b87d6e2-025a-4e18-ab8a-b9159518bf61.webp?v=1714720694"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10301c683c2fd1e090a5d6cfea450f2125768837_7b87d6e2-025a-4e18-ab8a-b9159518bf61.webp?v=1714720694","width":2000},{"alt":null,"id":23877066653795,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eec3ee3583893bf7f76e30ae70713a4817367529_b5ee5361-6b89-4317-bc58-564cd6a4011a.webp?v=1714720696"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eec3ee3583893bf7f76e30ae70713a4817367529_b5ee5361-6b89-4317-bc58-564cd6a4011a.webp?v=1714720696","width":2000},{"alt":null,"id":23877067276387,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76a0036a5b2068fd667377144878a7c68b9eba8b_9f5b4b2e-8ace-42d9-bd3c-398ba8414a06.webp?v=1714720698"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76a0036a5b2068fd667377144878a7c68b9eba8b_9f5b4b2e-8ace-42d9-bd3c-398ba8414a06.webp?v=1714720698","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41884991946851,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-SB07","requires_shipping":true,"taxable":true,"featured_image":{"id":31472151101539,"product_id":7408394174563,"position":9,"created_at":"2024-05-03T15:18:16+08:00","updated_at":"2024-05-03T15:18:16+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eec3ee3583893bf7f76e30ae70713a4817367529_b5ee5361-6b89-4317-bc58-564cd6a4011a.webp?v=1714720696","variant_ids":[41884991946851]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Batman - 小丑拳擊學院 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118724-SB07","featured_media":{"alt":null,"id":23877066653795,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eec3ee3583893bf7f76e30ae70713a4817367529_b5ee5361-6b89-4317-bc58-564cd6a4011a.webp?v=1714720696"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41884991946851,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-SB07","requires_shipping":true,"taxable":true,"featured_image":{"id":31472151101539,"product_id":7408394174563,"position":9,"created_at":"2024-05-03T15:18:16+08:00","updated_at":"2024-05-03T15:18:16+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eec3ee3583893bf7f76e30ae70713a4817367529_b5ee5361-6b89-4317-bc58-564cd6a4011a.webp?v=1714720696","variant_ids":[41884991946851]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Batman - 小丑拳擊學院 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118724-SB07","featured_media":{"alt":null,"id":23877066653795,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eec3ee3583893bf7f76e30ae70713a4817367529_b5ee5361-6b89-4317-bc58-564cd6a4011a.webp?v=1714720696"}},"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: "停產"
}