$product = {"id":7415970332771,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2D2-剪紙系列","handle":"iphone-xs-max-mod-nx-printable-pb57","description":null,"published_at":"2024-06-11T16:49:15+08:00","created_at":"2024-05-06T12:34:11+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":41916053880931,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB57","requires_shipping":true,"taxable":true,"featured_image":{"id":31490868510819,"product_id":7415970332771,"position":7,"created_at":"2024-05-06T12:34:30+08:00","updated_at":"2024-05-06T12:34:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37e67607631ddd2548d870b5c7dbcbe40657b7a2_412262e6-d0b4-4a2d-8588-ae4ee2a17e1f.webp?v=1714970070","variant_ids":[41916053880931]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2D2-剪紙系列 - 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-PB57","featured_media":{"alt":null,"id":23896275583075,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37e67607631ddd2548d870b5c7dbcbe40657b7a2_412262e6-d0b4-4a2d-8588-ae4ee2a17e1f.webp?v=1714970070"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/868a0578604322382aeda7d0f435704304ce7db3_af0b2002-f107-4ca3-a1e5-93b30ba2be59.webp?v=1714970054","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23982f8d79bfbb99d37aed7b65c9095253fcdd6b_a53f02e7-97c8-49eb-b1fc-9c2c953df93f.webp?v=1714970056","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3645dff168c7f08ccaa55b5d230c672fd3418694_19fe75ec-940f-4d51-901e-0a9d1e32245e.webp?v=1714970061","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ce41eb6d3dddda33ef2e182f4795afc5aeabdf17_1bab94d1-1042-478f-b07d-5bf6630e8202.webp?v=1714970063","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b87af56263512d01bccfdf1e5db6724254379029_e8860575-5d11-4639-86a2-1f8ead0c2653.webp?v=1714970065","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86ec8f50d66337c09f63c47669cc90452c9b7cc6_408022ba-1860-42ca-bd20-47adc0cdfc67.webp?v=1714970068","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37e67607631ddd2548d870b5c7dbcbe40657b7a2_412262e6-d0b4-4a2d-8588-ae4ee2a17e1f.webp?v=1714970070","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84d9bba8cb3789cbb2b39525b62f22dd534110b8_b4cbfeb8-7096-40c1-8a70-09564cdb263c.webp?v=1714970073","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c6e3364a16cc5375e00c7b32e6274cf0a4a40c0_7d92f5bd-3ec6-4a84-849b-1e46df0cf0d5.webp?v=1714970075"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/868a0578604322382aeda7d0f435704304ce7db3_af0b2002-f107-4ca3-a1e5-93b30ba2be59.webp?v=1714970054","options":["color"],"media":[{"alt":null,"id":23896271290467,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/868a0578604322382aeda7d0f435704304ce7db3_af0b2002-f107-4ca3-a1e5-93b30ba2be59.webp?v=1714970054"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/868a0578604322382aeda7d0f435704304ce7db3_af0b2002-f107-4ca3-a1e5-93b30ba2be59.webp?v=1714970054","width":2000},{"alt":null,"id":23896272142435,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23982f8d79bfbb99d37aed7b65c9095253fcdd6b_a53f02e7-97c8-49eb-b1fc-9c2c953df93f.webp?v=1714970056"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23982f8d79bfbb99d37aed7b65c9095253fcdd6b_a53f02e7-97c8-49eb-b1fc-9c2c953df93f.webp?v=1714970056","width":2000},{"alt":null,"id":23896273420387,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3645dff168c7f08ccaa55b5d230c672fd3418694_19fe75ec-940f-4d51-901e-0a9d1e32245e.webp?v=1714970061"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3645dff168c7f08ccaa55b5d230c672fd3418694_19fe75ec-940f-4d51-901e-0a9d1e32245e.webp?v=1714970061","width":2000},{"alt":null,"id":23896273911907,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ce41eb6d3dddda33ef2e182f4795afc5aeabdf17_1bab94d1-1042-478f-b07d-5bf6630e8202.webp?v=1714970063"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ce41eb6d3dddda33ef2e182f4795afc5aeabdf17_1bab94d1-1042-478f-b07d-5bf6630e8202.webp?v=1714970063","width":2000},{"alt":null,"id":23896274436195,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b87af56263512d01bccfdf1e5db6724254379029_e8860575-5d11-4639-86a2-1f8ead0c2653.webp?v=1714970065"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b87af56263512d01bccfdf1e5db6724254379029_e8860575-5d11-4639-86a2-1f8ead0c2653.webp?v=1714970065","width":2000},{"alt":null,"id":23896275091555,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86ec8f50d66337c09f63c47669cc90452c9b7cc6_408022ba-1860-42ca-bd20-47adc0cdfc67.webp?v=1714970068"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86ec8f50d66337c09f63c47669cc90452c9b7cc6_408022ba-1860-42ca-bd20-47adc0cdfc67.webp?v=1714970068","width":2000},{"alt":null,"id":23896275583075,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37e67607631ddd2548d870b5c7dbcbe40657b7a2_412262e6-d0b4-4a2d-8588-ae4ee2a17e1f.webp?v=1714970070"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37e67607631ddd2548d870b5c7dbcbe40657b7a2_412262e6-d0b4-4a2d-8588-ae4ee2a17e1f.webp?v=1714970070","width":2000},{"alt":null,"id":23896276107363,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84d9bba8cb3789cbb2b39525b62f22dd534110b8_b4cbfeb8-7096-40c1-8a70-09564cdb263c.webp?v=1714970073"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84d9bba8cb3789cbb2b39525b62f22dd534110b8_b4cbfeb8-7096-40c1-8a70-09564cdb263c.webp?v=1714970073","width":2000},{"alt":null,"id":23896276500579,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c6e3364a16cc5375e00c7b32e6274cf0a4a40c0_7d92f5bd-3ec6-4a84-849b-1e46df0cf0d5.webp?v=1714970075"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c6e3364a16cc5375e00c7b32e6274cf0a4a40c0_7d92f5bd-3ec6-4a84-849b-1e46df0cf0d5.webp?v=1714970075","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41916053880931,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB57","requires_shipping":true,"taxable":true,"featured_image":{"id":31490868510819,"product_id":7415970332771,"position":7,"created_at":"2024-05-06T12:34:30+08:00","updated_at":"2024-05-06T12:34:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37e67607631ddd2548d870b5c7dbcbe40657b7a2_412262e6-d0b4-4a2d-8588-ae4ee2a17e1f.webp?v=1714970070","variant_ids":[41916053880931]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2D2-剪紙系列 - 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-PB57","featured_media":{"alt":null,"id":23896275583075,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37e67607631ddd2548d870b5c7dbcbe40657b7a2_412262e6-d0b4-4a2d-8588-ae4ee2a17e1f.webp?v=1714970070"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41916053880931,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB57","requires_shipping":true,"taxable":true,"featured_image":{"id":31490868510819,"product_id":7415970332771,"position":7,"created_at":"2024-05-06T12:34:30+08:00","updated_at":"2024-05-06T12:34:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37e67607631ddd2548d870b5c7dbcbe40657b7a2_412262e6-d0b4-4a2d-8588-ae4ee2a17e1f.webp?v=1714970070","variant_ids":[41916053880931]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2D2-剪紙系列 - 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-PB57","featured_media":{"alt":null,"id":23896275583075,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37e67607631ddd2548d870b5c7dbcbe40657b7a2_412262e6-d0b4-4a2d-8588-ae4ee2a17e1f.webp?v=1714970070"}},"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: "停產"
}