$product = {"id":7415887364195,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Batman - 蝙蝠車","handle":"iphone-xs-max-mod-nx-printable-sb05","description":null,"published_at":"2024-06-11T16:47:05+08:00","created_at":"2024-05-06T12:18:36+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":41915212202083,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-SB05","requires_shipping":true,"taxable":true,"featured_image":{"id":31490661777507,"product_id":7415887364195,"position":8,"created_at":"2024-05-06T12:18:59+08:00","updated_at":"2024-05-06T12:18:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee205b42d843d2650abeaf4b3d89640f2c5ae94e_cc37d478-64c7-4117-a6e2-4d66f8fbae68.webp?v=1714969139","variant_ids":[41915212202083]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS 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":"NPB0108624-SB05","featured_media":{"alt":null,"id":23896068456547,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee205b42d843d2650abeaf4b3d89640f2c5ae94e_cc37d478-64c7-4117-a6e2-4d66f8fbae68.webp?v=1714969139"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0acb2e941c332d413075b1ab2deede2b5abf7326_6dce4ab5-dbac-48f1-8e6f-be2c2b8a6072.webp?v=1714969118","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a450b1bbb0f30e21e511b1f604662b5ca1da3216_9229660e-dfc8-43b9-b671-d3e8df3911af.webp?v=1714969121","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9beda8607eaa78262e5c292356d7a42389bb63c_68b9c519-cf19-47eb-85c8-2558f90e9653.webp?v=1714969126","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/460db9c74669ad0f989707d55c1ac152597b0c77_4c205da1-37e4-402d-9246-1798f4697d46.webp?v=1714969128","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/916c78599011912225fd64e3d1088e18a8c2722f_ac18eb5d-55cd-49fc-80eb-c9702cd112dc.webp?v=1714969132","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23d625fdac9a966ca4e768471641ef6d84998c0a_c6b88bc7-db15-4954-a33a-9fe0e3d16af6.webp?v=1714969134","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a676d086fa28e3a3d24ead86a8c5e3760052f150_efc4fa7d-f372-40da-a557-5ed000c61d01.webp?v=1714969136","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee205b42d843d2650abeaf4b3d89640f2c5ae94e_cc37d478-64c7-4117-a6e2-4d66f8fbae68.webp?v=1714969139","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/239d10e93de38edc9d1864eee08034f0450bcd22_c48285c7-da4e-4636-9a7f-bdb876e316fb.webp?v=1714969141"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0acb2e941c332d413075b1ab2deede2b5abf7326_6dce4ab5-dbac-48f1-8e6f-be2c2b8a6072.webp?v=1714969118","options":["color"],"media":[{"alt":null,"id":23896063869027,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0acb2e941c332d413075b1ab2deede2b5abf7326_6dce4ab5-dbac-48f1-8e6f-be2c2b8a6072.webp?v=1714969118"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0acb2e941c332d413075b1ab2deede2b5abf7326_6dce4ab5-dbac-48f1-8e6f-be2c2b8a6072.webp?v=1714969118","width":2000},{"alt":null,"id":23896064196707,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a450b1bbb0f30e21e511b1f604662b5ca1da3216_9229660e-dfc8-43b9-b671-d3e8df3911af.webp?v=1714969121"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a450b1bbb0f30e21e511b1f604662b5ca1da3216_9229660e-dfc8-43b9-b671-d3e8df3911af.webp?v=1714969121","width":2000},{"alt":null,"id":23896065245283,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9beda8607eaa78262e5c292356d7a42389bb63c_68b9c519-cf19-47eb-85c8-2558f90e9653.webp?v=1714969126"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9beda8607eaa78262e5c292356d7a42389bb63c_68b9c519-cf19-47eb-85c8-2558f90e9653.webp?v=1714969126","width":2000},{"alt":null,"id":23896065802339,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/460db9c74669ad0f989707d55c1ac152597b0c77_4c205da1-37e4-402d-9246-1798f4697d46.webp?v=1714969128"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/460db9c74669ad0f989707d55c1ac152597b0c77_4c205da1-37e4-402d-9246-1798f4697d46.webp?v=1714969128","width":2000},{"alt":null,"id":23896066654307,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/916c78599011912225fd64e3d1088e18a8c2722f_ac18eb5d-55cd-49fc-80eb-c9702cd112dc.webp?v=1714969132"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/916c78599011912225fd64e3d1088e18a8c2722f_ac18eb5d-55cd-49fc-80eb-c9702cd112dc.webp?v=1714969132","width":2000},{"alt":null,"id":23896067440739,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23d625fdac9a966ca4e768471641ef6d84998c0a_c6b88bc7-db15-4954-a33a-9fe0e3d16af6.webp?v=1714969134"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23d625fdac9a966ca4e768471641ef6d84998c0a_c6b88bc7-db15-4954-a33a-9fe0e3d16af6.webp?v=1714969134","width":2000},{"alt":null,"id":23896067866723,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a676d086fa28e3a3d24ead86a8c5e3760052f150_efc4fa7d-f372-40da-a557-5ed000c61d01.webp?v=1714969136"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a676d086fa28e3a3d24ead86a8c5e3760052f150_efc4fa7d-f372-40da-a557-5ed000c61d01.webp?v=1714969136","width":2000},{"alt":null,"id":23896068456547,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee205b42d843d2650abeaf4b3d89640f2c5ae94e_cc37d478-64c7-4117-a6e2-4d66f8fbae68.webp?v=1714969139"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee205b42d843d2650abeaf4b3d89640f2c5ae94e_cc37d478-64c7-4117-a6e2-4d66f8fbae68.webp?v=1714969139","width":2000},{"alt":null,"id":23896068849763,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/239d10e93de38edc9d1864eee08034f0450bcd22_c48285c7-da4e-4636-9a7f-bdb876e316fb.webp?v=1714969141"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/239d10e93de38edc9d1864eee08034f0450bcd22_c48285c7-da4e-4636-9a7f-bdb876e316fb.webp?v=1714969141","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41915212202083,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-SB05","requires_shipping":true,"taxable":true,"featured_image":{"id":31490661777507,"product_id":7415887364195,"position":8,"created_at":"2024-05-06T12:18:59+08:00","updated_at":"2024-05-06T12:18:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee205b42d843d2650abeaf4b3d89640f2c5ae94e_cc37d478-64c7-4117-a6e2-4d66f8fbae68.webp?v=1714969139","variant_ids":[41915212202083]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS 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":"NPB0108624-SB05","featured_media":{"alt":null,"id":23896068456547,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee205b42d843d2650abeaf4b3d89640f2c5ae94e_cc37d478-64c7-4117-a6e2-4d66f8fbae68.webp?v=1714969139"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41915212202083,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-SB05","requires_shipping":true,"taxable":true,"featured_image":{"id":31490661777507,"product_id":7415887364195,"position":8,"created_at":"2024-05-06T12:18:59+08:00","updated_at":"2024-05-06T12:18:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee205b42d843d2650abeaf4b3d89640f2c5ae94e_cc37d478-64c7-4117-a6e2-4d66f8fbae68.webp?v=1714969139","variant_ids":[41915212202083]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS 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":"NPB0108624-SB05","featured_media":{"alt":null,"id":23896068456547,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee205b42d843d2650abeaf4b3d89640f2c5ae94e_cc37d478-64c7-4117-a6e2-4d66f8fbae68.webp?v=1714969139"}},"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: "停產"
}