$product = {"id":7415986716771,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵-全白設計","handle":"iphone-xs-max-mod-nx-printable-pb103","description":null,"published_at":"2024-06-11T16:49:42+08:00","created_at":"2024-05-06T12:37:23+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone XS Max","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-star-wars","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":41916230402147,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB103","requires_shipping":true,"taxable":true,"featured_image":{"id":31490912747619,"product_id":7415986716771,"position":1,"created_at":"2024-05-06T12:37:26+08:00","updated_at":"2024-05-06T12:37:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a991011f14f033572882373912349f61a2fe9a4_8c55171b-a421-4db4-a903-89a0039ea3e8.webp?v=1714970246","variant_ids":[41916230402147]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵-全白設計 - 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-PB103","featured_media":{"alt":null,"id":23896319852643,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a991011f14f033572882373912349f61a2fe9a4_8c55171b-a421-4db4-a903-89a0039ea3e8.webp?v=1714970246"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a991011f14f033572882373912349f61a2fe9a4_8c55171b-a421-4db4-a903-89a0039ea3e8.webp?v=1714970246","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b0ab0171d6d73a6ffc151ca8ed2a34e762a7f86d_1abef406-cb84-4a30-9341-d3ed8b2cc714.webp?v=1714970248","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2fe4277b02c3f81cfbfde5edf941669594c06092_dfefe10b-9c96-41d2-a6fd-9349976a5dc8.webp?v=1714970252","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ad515756a11746880858cb0351431086d550452c_b19360e4-0750-427b-91e4-cdbae914f0d5.webp?v=1714970255","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b26f4fbedec4e0e71b40d7fe364fe14d70b727c3_e778bd80-8673-4fb0-87fb-8c3e24fe2433.webp?v=1714970257","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39aa99c3ec29b656c7aef3895eaedc5398436dc5_7551f6d7-4ef3-4c3c-a80e-00fe52fb1d7e.webp?v=1714970259","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c261132b22a29884c98a541fc81d72338ee01c23_abcfc016-412a-4b5d-b5ab-55f775222ee6.webp?v=1714970262","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/21bfc812e538fcae05ab539d3cc37782cc2db320_6820ec09-5fc0-4e7c-9f16-7088b76d4e62.webp?v=1714970264","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ce7f215690c478c6180e687a8090511f459c1db_61e6dbea-d96c-4d1e-a703-07a696906a44.webp?v=1714970266"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a991011f14f033572882373912349f61a2fe9a4_8c55171b-a421-4db4-a903-89a0039ea3e8.webp?v=1714970246","options":["color"],"media":[{"alt":null,"id":23896319852643,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a991011f14f033572882373912349f61a2fe9a4_8c55171b-a421-4db4-a903-89a0039ea3e8.webp?v=1714970246"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a991011f14f033572882373912349f61a2fe9a4_8c55171b-a421-4db4-a903-89a0039ea3e8.webp?v=1714970246","width":2000},{"alt":null,"id":23896320278627,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b0ab0171d6d73a6ffc151ca8ed2a34e762a7f86d_1abef406-cb84-4a30-9341-d3ed8b2cc714.webp?v=1714970248"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b0ab0171d6d73a6ffc151ca8ed2a34e762a7f86d_1abef406-cb84-4a30-9341-d3ed8b2cc714.webp?v=1714970248","width":2000},{"alt":null,"id":23896321523811,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2fe4277b02c3f81cfbfde5edf941669594c06092_dfefe10b-9c96-41d2-a6fd-9349976a5dc8.webp?v=1714970252"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2fe4277b02c3f81cfbfde5edf941669594c06092_dfefe10b-9c96-41d2-a6fd-9349976a5dc8.webp?v=1714970252","width":2000},{"alt":null,"id":23896321818723,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ad515756a11746880858cb0351431086d550452c_b19360e4-0750-427b-91e4-cdbae914f0d5.webp?v=1714970255"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ad515756a11746880858cb0351431086d550452c_b19360e4-0750-427b-91e4-cdbae914f0d5.webp?v=1714970255","width":2000},{"alt":null,"id":23896322310243,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b26f4fbedec4e0e71b40d7fe364fe14d70b727c3_e778bd80-8673-4fb0-87fb-8c3e24fe2433.webp?v=1714970257"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b26f4fbedec4e0e71b40d7fe364fe14d70b727c3_e778bd80-8673-4fb0-87fb-8c3e24fe2433.webp?v=1714970257","width":2000},{"alt":null,"id":23896322670691,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39aa99c3ec29b656c7aef3895eaedc5398436dc5_7551f6d7-4ef3-4c3c-a80e-00fe52fb1d7e.webp?v=1714970259"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39aa99c3ec29b656c7aef3895eaedc5398436dc5_7551f6d7-4ef3-4c3c-a80e-00fe52fb1d7e.webp?v=1714970259","width":2000},{"alt":null,"id":23896323227747,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c261132b22a29884c98a541fc81d72338ee01c23_abcfc016-412a-4b5d-b5ab-55f775222ee6.webp?v=1714970262"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c261132b22a29884c98a541fc81d72338ee01c23_abcfc016-412a-4b5d-b5ab-55f775222ee6.webp?v=1714970262","width":2000},{"alt":null,"id":23896323653731,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/21bfc812e538fcae05ab539d3cc37782cc2db320_6820ec09-5fc0-4e7c-9f16-7088b76d4e62.webp?v=1714970264"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/21bfc812e538fcae05ab539d3cc37782cc2db320_6820ec09-5fc0-4e7c-9f16-7088b76d4e62.webp?v=1714970264","width":2000},{"alt":null,"id":23896324178019,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ce7f215690c478c6180e687a8090511f459c1db_61e6dbea-d96c-4d1e-a703-07a696906a44.webp?v=1714970266"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ce7f215690c478c6180e687a8090511f459c1db_61e6dbea-d96c-4d1e-a703-07a696906a44.webp?v=1714970266","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41916230402147,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB103","requires_shipping":true,"taxable":true,"featured_image":{"id":31490912747619,"product_id":7415986716771,"position":1,"created_at":"2024-05-06T12:37:26+08:00","updated_at":"2024-05-06T12:37:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a991011f14f033572882373912349f61a2fe9a4_8c55171b-a421-4db4-a903-89a0039ea3e8.webp?v=1714970246","variant_ids":[41916230402147]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵-全白設計 - 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-PB103","featured_media":{"alt":null,"id":23896319852643,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a991011f14f033572882373912349f61a2fe9a4_8c55171b-a421-4db4-a903-89a0039ea3e8.webp?v=1714970246"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41916230402147,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB103","requires_shipping":true,"taxable":true,"featured_image":{"id":31490912747619,"product_id":7415986716771,"position":1,"created_at":"2024-05-06T12:37:26+08:00","updated_at":"2024-05-06T12:37:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a991011f14f033572882373912349f61a2fe9a4_8c55171b-a421-4db4-a903-89a0039ea3e8.webp?v=1714970246","variant_ids":[41916230402147]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵-全白設計 - 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-PB103","featured_media":{"alt":null,"id":23896319852643,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a991011f14f033572882373912349f61a2fe9a4_8c55171b-a421-4db4-a903-89a0039ea3e8.webp?v=1714970246"}},"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: "停產"
}