$product = {"id":7415964827747,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 小圖款-芮","handle":"iphone-xs-max-mod-nx-printable-pc05","description":null,"published_at":"2024-06-11T16:49:07+08:00","created_at":"2024-05-06T12:33:14+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":41915998011491,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PC05","requires_shipping":true,"taxable":true,"featured_image":{"id":31490855141475,"product_id":7415964827747,"position":9,"created_at":"2024-05-06T12:33:34+08:00","updated_at":"2024-05-06T12:33:34+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d76cad340effe2f83d96c5fde621e9e3a211d5f_86cffbe5-69da-4a29-a6cf-73412a10c01d.webp?v=1714970014","variant_ids":[41915998011491]},"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-PC05","featured_media":{"alt":null,"id":23896262082659,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d76cad340effe2f83d96c5fde621e9e3a211d5f_86cffbe5-69da-4a29-a6cf-73412a10c01d.webp?v=1714970014"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e230e128a798716c18a591c9f62ba60e9d3ae7c6_ab63264c-22ee-4b1f-8177-0176adc2bf20.webp?v=1714969997","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c5d1ad82f532e937e8914518370a8d39166421a7_419732dc-ce05-4ab1-a094-f5a8e1c64199.webp?v=1714969999","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c6723d0e64567852e3697cf08d04b31ba4f73cc_317ad6ff-db28-43bd-9ab3-717643a0a301.webp?v=1714970001","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c54d2b48cb1dbe8724254c56479b61860dbb8401_d237dfab-50d2-412d-80de-b28bc50bae26.webp?v=1714970003","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dde4772bfc1cb7763fc540dec395b1b5fd089a2d_4b13336e-f18c-492c-a867-0570a7ac2931.webp?v=1714970005","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a4008dbdd5defa06f683a64265825c5cdbaa07e1_31aad996-b593-49b9-aea9-1daad7b1a8de.webp?v=1714970008","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d7a6dbaeddbc4296be2f2cdc8f50ad8970af1276_125c2a95-55c4-41de-aa44-00987c0f17ee.webp?v=1714970010","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9546bf23dfe95f53fdd011d18bc6637a4a0e559d_36b0cc67-3200-4cac-b66e-f513b9cc0317.webp?v=1714970012","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d76cad340effe2f83d96c5fde621e9e3a211d5f_86cffbe5-69da-4a29-a6cf-73412a10c01d.webp?v=1714970014","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc5a3199cf8454ba04c66526569c82e1b90ca9cc_46b79fd2-85de-4409-b229-d55f40088045.webp?v=1714970016"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e230e128a798716c18a591c9f62ba60e9d3ae7c6_ab63264c-22ee-4b1f-8177-0176adc2bf20.webp?v=1714969997","options":["color"],"media":[{"alt":null,"id":23896257855587,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e230e128a798716c18a591c9f62ba60e9d3ae7c6_ab63264c-22ee-4b1f-8177-0176adc2bf20.webp?v=1714969997"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e230e128a798716c18a591c9f62ba60e9d3ae7c6_ab63264c-22ee-4b1f-8177-0176adc2bf20.webp?v=1714969997","width":2000},{"alt":null,"id":23896258379875,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c5d1ad82f532e937e8914518370a8d39166421a7_419732dc-ce05-4ab1-a094-f5a8e1c64199.webp?v=1714969999"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c5d1ad82f532e937e8914518370a8d39166421a7_419732dc-ce05-4ab1-a094-f5a8e1c64199.webp?v=1714969999","width":2000},{"alt":null,"id":23896258773091,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c6723d0e64567852e3697cf08d04b31ba4f73cc_317ad6ff-db28-43bd-9ab3-717643a0a301.webp?v=1714970001"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c6723d0e64567852e3697cf08d04b31ba4f73cc_317ad6ff-db28-43bd-9ab3-717643a0a301.webp?v=1714970001","width":2000},{"alt":null,"id":23896259428451,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c54d2b48cb1dbe8724254c56479b61860dbb8401_d237dfab-50d2-412d-80de-b28bc50bae26.webp?v=1714970003"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c54d2b48cb1dbe8724254c56479b61860dbb8401_d237dfab-50d2-412d-80de-b28bc50bae26.webp?v=1714970003","width":2000},{"alt":null,"id":23896259756131,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dde4772bfc1cb7763fc540dec395b1b5fd089a2d_4b13336e-f18c-492c-a867-0570a7ac2931.webp?v=1714970005"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dde4772bfc1cb7763fc540dec395b1b5fd089a2d_4b13336e-f18c-492c-a867-0570a7ac2931.webp?v=1714970005","width":2000},{"alt":null,"id":23896260149347,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a4008dbdd5defa06f683a64265825c5cdbaa07e1_31aad996-b593-49b9-aea9-1daad7b1a8de.webp?v=1714970008"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a4008dbdd5defa06f683a64265825c5cdbaa07e1_31aad996-b593-49b9-aea9-1daad7b1a8de.webp?v=1714970008","width":2000},{"alt":null,"id":23896260870243,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d7a6dbaeddbc4296be2f2cdc8f50ad8970af1276_125c2a95-55c4-41de-aa44-00987c0f17ee.webp?v=1714970010"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d7a6dbaeddbc4296be2f2cdc8f50ad8970af1276_125c2a95-55c4-41de-aa44-00987c0f17ee.webp?v=1714970010","width":2000},{"alt":null,"id":23896261132387,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9546bf23dfe95f53fdd011d18bc6637a4a0e559d_36b0cc67-3200-4cac-b66e-f513b9cc0317.webp?v=1714970012"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9546bf23dfe95f53fdd011d18bc6637a4a0e559d_36b0cc67-3200-4cac-b66e-f513b9cc0317.webp?v=1714970012","width":2000},{"alt":null,"id":23896262082659,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d76cad340effe2f83d96c5fde621e9e3a211d5f_86cffbe5-69da-4a29-a6cf-73412a10c01d.webp?v=1714970014"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d76cad340effe2f83d96c5fde621e9e3a211d5f_86cffbe5-69da-4a29-a6cf-73412a10c01d.webp?v=1714970014","width":2000},{"alt":null,"id":23896262508643,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc5a3199cf8454ba04c66526569c82e1b90ca9cc_46b79fd2-85de-4409-b229-d55f40088045.webp?v=1714970016"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc5a3199cf8454ba04c66526569c82e1b90ca9cc_46b79fd2-85de-4409-b229-d55f40088045.webp?v=1714970016","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41915998011491,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PC05","requires_shipping":true,"taxable":true,"featured_image":{"id":31490855141475,"product_id":7415964827747,"position":9,"created_at":"2024-05-06T12:33:34+08:00","updated_at":"2024-05-06T12:33:34+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d76cad340effe2f83d96c5fde621e9e3a211d5f_86cffbe5-69da-4a29-a6cf-73412a10c01d.webp?v=1714970014","variant_ids":[41915998011491]},"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-PC05","featured_media":{"alt":null,"id":23896262082659,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d76cad340effe2f83d96c5fde621e9e3a211d5f_86cffbe5-69da-4a29-a6cf-73412a10c01d.webp?v=1714970014"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41915998011491,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PC05","requires_shipping":true,"taxable":true,"featured_image":{"id":31490855141475,"product_id":7415964827747,"position":9,"created_at":"2024-05-06T12:33:34+08:00","updated_at":"2024-05-06T12:33:34+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d76cad340effe2f83d96c5fde621e9e3a211d5f_86cffbe5-69da-4a29-a6cf-73412a10c01d.webp?v=1714970014","variant_ids":[41915998011491]},"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-PC05","featured_media":{"alt":null,"id":23896262082659,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d76cad340effe2f83d96c5fde621e9e3a211d5f_86cffbe5-69da-4a29-a6cf-73412a10c01d.webp?v=1714970014"}},"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: "停產"
}