$product = {"id":7416078237795,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Batman - Logo","handle":"iphone-xs-max-mod-nx-printable-sb16","description":null,"published_at":"2024-06-11T16:52:08+08:00","created_at":"2024-05-06T12:54:00+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 XS 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":41917218291811,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-SB16","requires_shipping":true,"taxable":true,"featured_image":{"id":31491163947107,"product_id":7416078237795,"position":7,"created_at":"2024-05-06T12:54:16+08:00","updated_at":"2024-05-06T12:54:16+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c11038c2bcde7f6710f55a4eb55810c1f7e47e2_331b6a5d-72ee-4a7a-a63e-8da44639cbf3.webp?v=1714971256","variant_ids":[41917218291811]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Batman - Logo - 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":"NPB0108624-SB16","featured_media":{"alt":null,"id":23896571379811,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c11038c2bcde7f6710f55a4eb55810c1f7e47e2_331b6a5d-72ee-4a7a-a63e-8da44639cbf3.webp?v=1714971256"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcd90d9381c85c16c346ed2f1261929fab7bd07d_13a65955-d507-4a5b-835b-06207ee43353.webp?v=1714971242","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6d808b92dff286d8aba9733ecda0975f08916562_6f9610cc-ec5e-485f-abb4-18cade02cfd4.webp?v=1714971244","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/73ce1813311d085d1695d199f24ef1352f34b550_4f629eb6-15ef-45f2-899e-4e532c180662.webp?v=1714971247","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bfae88cc15fee9bbecdd7f9f1805cbed4bd89598_dbfc8267-d3f0-4a58-8baf-596364780e2f.webp?v=1714971249","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a914f1d2d6631e5d5282f7b5c71f0aaa52c5c5df_afb73109-186c-4f28-8457-d62bf3b6512f.webp?v=1714971251","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f854fa9587d5b5fc62e97be9b74335fc8a9d1aa9_696a8f3f-b3ce-4414-9025-e14fb6df01d8.webp?v=1714971253","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c11038c2bcde7f6710f55a4eb55810c1f7e47e2_331b6a5d-72ee-4a7a-a63e-8da44639cbf3.webp?v=1714971256","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3973186899c1a8b7181ef8abc385317b4eb08939_a9b3ec4f-8797-409b-99a6-714478f65404.webp?v=1714971258","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/002f19d7f28b22ffa92db8e2dde0340230e13444_7036cea7-41a3-478a-9b0e-f8a1975a6059.webp?v=1714971260","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65e83823b4036effc636acf5fc6cd902f932ec72_396c8ad9-54be-4f9b-bb5e-210d6be11420.webp?v=1714971262"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcd90d9381c85c16c346ed2f1261929fab7bd07d_13a65955-d507-4a5b-835b-06207ee43353.webp?v=1714971242","options":["color"],"media":[{"alt":null,"id":23896568168547,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcd90d9381c85c16c346ed2f1261929fab7bd07d_13a65955-d507-4a5b-835b-06207ee43353.webp?v=1714971242"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcd90d9381c85c16c346ed2f1261929fab7bd07d_13a65955-d507-4a5b-835b-06207ee43353.webp?v=1714971242","width":2000},{"alt":null,"id":23896568528995,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6d808b92dff286d8aba9733ecda0975f08916562_6f9610cc-ec5e-485f-abb4-18cade02cfd4.webp?v=1714971244"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6d808b92dff286d8aba9733ecda0975f08916562_6f9610cc-ec5e-485f-abb4-18cade02cfd4.webp?v=1714971244","width":2000},{"alt":null,"id":23896569217123,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/73ce1813311d085d1695d199f24ef1352f34b550_4f629eb6-15ef-45f2-899e-4e532c180662.webp?v=1714971247"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/73ce1813311d085d1695d199f24ef1352f34b550_4f629eb6-15ef-45f2-899e-4e532c180662.webp?v=1714971247","width":2000},{"alt":null,"id":23896569839715,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bfae88cc15fee9bbecdd7f9f1805cbed4bd89598_dbfc8267-d3f0-4a58-8baf-596364780e2f.webp?v=1714971249"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bfae88cc15fee9bbecdd7f9f1805cbed4bd89598_dbfc8267-d3f0-4a58-8baf-596364780e2f.webp?v=1714971249","width":2000},{"alt":null,"id":23896570331235,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a914f1d2d6631e5d5282f7b5c71f0aaa52c5c5df_afb73109-186c-4f28-8457-d62bf3b6512f.webp?v=1714971251"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a914f1d2d6631e5d5282f7b5c71f0aaa52c5c5df_afb73109-186c-4f28-8457-d62bf3b6512f.webp?v=1714971251","width":2000},{"alt":null,"id":23896570921059,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f854fa9587d5b5fc62e97be9b74335fc8a9d1aa9_696a8f3f-b3ce-4414-9025-e14fb6df01d8.webp?v=1714971253"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f854fa9587d5b5fc62e97be9b74335fc8a9d1aa9_696a8f3f-b3ce-4414-9025-e14fb6df01d8.webp?v=1714971253","width":2000},{"alt":null,"id":23896571379811,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c11038c2bcde7f6710f55a4eb55810c1f7e47e2_331b6a5d-72ee-4a7a-a63e-8da44639cbf3.webp?v=1714971256"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c11038c2bcde7f6710f55a4eb55810c1f7e47e2_331b6a5d-72ee-4a7a-a63e-8da44639cbf3.webp?v=1714971256","width":2000},{"alt":null,"id":23896571871331,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3973186899c1a8b7181ef8abc385317b4eb08939_a9b3ec4f-8797-409b-99a6-714478f65404.webp?v=1714971258"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3973186899c1a8b7181ef8abc385317b4eb08939_a9b3ec4f-8797-409b-99a6-714478f65404.webp?v=1714971258","width":2000},{"alt":null,"id":23896572264547,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/002f19d7f28b22ffa92db8e2dde0340230e13444_7036cea7-41a3-478a-9b0e-f8a1975a6059.webp?v=1714971260"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/002f19d7f28b22ffa92db8e2dde0340230e13444_7036cea7-41a3-478a-9b0e-f8a1975a6059.webp?v=1714971260","width":2000},{"alt":null,"id":23896573345891,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65e83823b4036effc636acf5fc6cd902f932ec72_396c8ad9-54be-4f9b-bb5e-210d6be11420.webp?v=1714971262"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65e83823b4036effc636acf5fc6cd902f932ec72_396c8ad9-54be-4f9b-bb5e-210d6be11420.webp?v=1714971262","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41917218291811,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-SB16","requires_shipping":true,"taxable":true,"featured_image":{"id":31491163947107,"product_id":7416078237795,"position":7,"created_at":"2024-05-06T12:54:16+08:00","updated_at":"2024-05-06T12:54:16+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c11038c2bcde7f6710f55a4eb55810c1f7e47e2_331b6a5d-72ee-4a7a-a63e-8da44639cbf3.webp?v=1714971256","variant_ids":[41917218291811]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Batman - Logo - 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":"NPB0108624-SB16","featured_media":{"alt":null,"id":23896571379811,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c11038c2bcde7f6710f55a4eb55810c1f7e47e2_331b6a5d-72ee-4a7a-a63e-8da44639cbf3.webp?v=1714971256"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41917218291811,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-SB16","requires_shipping":true,"taxable":true,"featured_image":{"id":31491163947107,"product_id":7416078237795,"position":7,"created_at":"2024-05-06T12:54:16+08:00","updated_at":"2024-05-06T12:54:16+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c11038c2bcde7f6710f55a4eb55810c1f7e47e2_331b6a5d-72ee-4a7a-a63e-8da44639cbf3.webp?v=1714971256","variant_ids":[41917218291811]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Batman - Logo - 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":"NPB0108624-SB16","featured_media":{"alt":null,"id":23896571379811,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c11038c2bcde7f6710f55a4eb55810c1f7e47e2_331b6a5d-72ee-4a7a-a63e-8da44639cbf3.webp?v=1714971256"}},"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: "停產"
}