$product = {"id":7415989600355,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 死星-黑白條紋","handle":"iphone-xs-max-mod-nx-printable-pb21","description":null,"published_at":"2024-06-11T16:49:47+08:00","created_at":"2024-05-06T12:37:56+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":41916259696739,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB21","requires_shipping":true,"taxable":true,"featured_image":{"id":31490924413027,"product_id":7415989600355,"position":8,"created_at":"2024-05-06T12:38:16+08:00","updated_at":"2024-05-06T12:38:16+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e0866834e8a5029714df0999d1b95e1e84a13dd_59fe49fc-995d-4b59-b069-2c644845550c.webp?v=1714970296","variant_ids":[41916259696739]},"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-PB21","featured_media":{"alt":null,"id":23896331485283,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e0866834e8a5029714df0999d1b95e1e84a13dd_59fe49fc-995d-4b59-b069-2c644845550c.webp?v=1714970296"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62a76c55530ae9d47c3fe2ec0fd11d53c908ddb6_815fa727-b854-4c1d-9379-ab57206531e8.webp?v=1714970279","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/349137e3f1fbbf1402ea281b228846ef1985e634_d29db263-962b-4cff-ac87-a6f4e30e3e13.webp?v=1714970281","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b47879f3297b2ff5b7258ac26c64f8e16140997d_74c5316c-4824-40f0-aff9-6ee81da9da3b.webp?v=1714970283","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/632d7d6ca3aaccece4d291117cf59b1deee2e6e3_c7bd9026-639c-4ccc-9fd1-39dd6b9012f1.webp?v=1714970286","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c110eeb848d3d622bcf631b0d97828f26adcfc72_6334c772-fcb7-409c-90fa-12c6bd92d225.webp?v=1714970288","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b8e119a3a02484eb23999e84384b4c079fe44e9_28d81f6a-6038-4d59-96f8-c4a5a83fda4d.webp?v=1714970291","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b1b8fa025fa96b8b2efb83841fd32fc8fd39a08_a0c881d1-07ae-47cc-aa43-577e1499b14a.webp?v=1714970293","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e0866834e8a5029714df0999d1b95e1e84a13dd_59fe49fc-995d-4b59-b069-2c644845550c.webp?v=1714970296","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4ad336073ab0ed8c739f3fbb2dcc69d31dd0dcf_f2d9dd1f-8343-4be4-8e56-7dd3774845c7.webp?v=1714970298","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83cb90cfaaa68816433accff7a9d7194716f4e1b_0ec7fed4-2fee-4355-b41f-ab763b199a55.webp?v=1714970301"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62a76c55530ae9d47c3fe2ec0fd11d53c908ddb6_815fa727-b854-4c1d-9379-ab57206531e8.webp?v=1714970279","options":["color"],"media":[{"alt":null,"id":23896327225443,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62a76c55530ae9d47c3fe2ec0fd11d53c908ddb6_815fa727-b854-4c1d-9379-ab57206531e8.webp?v=1714970279"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62a76c55530ae9d47c3fe2ec0fd11d53c908ddb6_815fa727-b854-4c1d-9379-ab57206531e8.webp?v=1714970279","width":2000},{"alt":null,"id":23896328339555,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/349137e3f1fbbf1402ea281b228846ef1985e634_d29db263-962b-4cff-ac87-a6f4e30e3e13.webp?v=1714970281"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/349137e3f1fbbf1402ea281b228846ef1985e634_d29db263-962b-4cff-ac87-a6f4e30e3e13.webp?v=1714970281","width":2000},{"alt":null,"id":23896329093219,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b47879f3297b2ff5b7258ac26c64f8e16140997d_74c5316c-4824-40f0-aff9-6ee81da9da3b.webp?v=1714970283"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b47879f3297b2ff5b7258ac26c64f8e16140997d_74c5316c-4824-40f0-aff9-6ee81da9da3b.webp?v=1714970283","width":2000},{"alt":null,"id":23896329519203,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/632d7d6ca3aaccece4d291117cf59b1deee2e6e3_c7bd9026-639c-4ccc-9fd1-39dd6b9012f1.webp?v=1714970286"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/632d7d6ca3aaccece4d291117cf59b1deee2e6e3_c7bd9026-639c-4ccc-9fd1-39dd6b9012f1.webp?v=1714970286","width":2000},{"alt":null,"id":23896330109027,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c110eeb848d3d622bcf631b0d97828f26adcfc72_6334c772-fcb7-409c-90fa-12c6bd92d225.webp?v=1714970288"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c110eeb848d3d622bcf631b0d97828f26adcfc72_6334c772-fcb7-409c-90fa-12c6bd92d225.webp?v=1714970288","width":2000},{"alt":null,"id":23896330502243,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b8e119a3a02484eb23999e84384b4c079fe44e9_28d81f6a-6038-4d59-96f8-c4a5a83fda4d.webp?v=1714970291"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b8e119a3a02484eb23999e84384b4c079fe44e9_28d81f6a-6038-4d59-96f8-c4a5a83fda4d.webp?v=1714970291","width":2000},{"alt":null,"id":23896331092067,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b1b8fa025fa96b8b2efb83841fd32fc8fd39a08_a0c881d1-07ae-47cc-aa43-577e1499b14a.webp?v=1714970293"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b1b8fa025fa96b8b2efb83841fd32fc8fd39a08_a0c881d1-07ae-47cc-aa43-577e1499b14a.webp?v=1714970293","width":2000},{"alt":null,"id":23896331485283,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e0866834e8a5029714df0999d1b95e1e84a13dd_59fe49fc-995d-4b59-b069-2c644845550c.webp?v=1714970296"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e0866834e8a5029714df0999d1b95e1e84a13dd_59fe49fc-995d-4b59-b069-2c644845550c.webp?v=1714970296","width":2000},{"alt":null,"id":23896332664931,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4ad336073ab0ed8c739f3fbb2dcc69d31dd0dcf_f2d9dd1f-8343-4be4-8e56-7dd3774845c7.webp?v=1714970298"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4ad336073ab0ed8c739f3fbb2dcc69d31dd0dcf_f2d9dd1f-8343-4be4-8e56-7dd3774845c7.webp?v=1714970298","width":2000},{"alt":null,"id":23896333615203,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83cb90cfaaa68816433accff7a9d7194716f4e1b_0ec7fed4-2fee-4355-b41f-ab763b199a55.webp?v=1714970301"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83cb90cfaaa68816433accff7a9d7194716f4e1b_0ec7fed4-2fee-4355-b41f-ab763b199a55.webp?v=1714970301","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41916259696739,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB21","requires_shipping":true,"taxable":true,"featured_image":{"id":31490924413027,"product_id":7415989600355,"position":8,"created_at":"2024-05-06T12:38:16+08:00","updated_at":"2024-05-06T12:38:16+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e0866834e8a5029714df0999d1b95e1e84a13dd_59fe49fc-995d-4b59-b069-2c644845550c.webp?v=1714970296","variant_ids":[41916259696739]},"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-PB21","featured_media":{"alt":null,"id":23896331485283,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e0866834e8a5029714df0999d1b95e1e84a13dd_59fe49fc-995d-4b59-b069-2c644845550c.webp?v=1714970296"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41916259696739,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB21","requires_shipping":true,"taxable":true,"featured_image":{"id":31490924413027,"product_id":7415989600355,"position":8,"created_at":"2024-05-06T12:38:16+08:00","updated_at":"2024-05-06T12:38:16+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e0866834e8a5029714df0999d1b95e1e84a13dd_59fe49fc-995d-4b59-b069-2c644845550c.webp?v=1714970296","variant_ids":[41916259696739]},"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-PB21","featured_media":{"alt":null,"id":23896331485283,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e0866834e8a5029714df0999d1b95e1e84a13dd_59fe49fc-995d-4b59-b069-2c644845550c.webp?v=1714970296"}},"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: "停產"
}