$product = {"id":7415932420195,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 波巴菲特-剪紙系列","handle":"iphone-xs-max-mod-nx-printable-pb58","description":null,"published_at":"2024-06-11T16:48:15+08:00","created_at":"2024-05-06T12:27:16+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":41915662762083,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB58","requires_shipping":true,"taxable":true,"featured_image":{"id":31490768240739,"product_id":7415932420195,"position":2,"created_at":"2024-05-06T12:27:21+08:00","updated_at":"2024-05-06T12:27:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77bbae91cef3afba5766c67ca13b4fd65843f3ad_9c284b33-6783-4690-9c9a-99400f7468ea.webp?v=1714969641","variant_ids":[41915662762083]},"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-PB58","featured_media":{"alt":null,"id":23896175116387,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77bbae91cef3afba5766c67ca13b4fd65843f3ad_9c284b33-6783-4690-9c9a-99400f7468ea.webp?v=1714969641"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b96459ee5a6d672ce541b535e7fecea4f4efc35_ff55ba06-77a5-45da-9233-ad17050afea4.webp?v=1714969639","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77bbae91cef3afba5766c67ca13b4fd65843f3ad_9c284b33-6783-4690-9c9a-99400f7468ea.webp?v=1714969641","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f65703e7be96d49fa67e25b5a6ec1741ca07f5dc_e66fccb4-5e0d-48e1-9187-9b9858358e55.webp?v=1714969646","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f5d46e6f7e59779e95ed3e924dabc2c44c3fd8b_c9fabd5c-e5c9-4a72-bd26-e9138df40452.webp?v=1714969648","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f12785e78ba70a9334be48d7bbef10000a45112_3ad7d192-2a37-4cc7-8c24-35a9608ea7a0.webp?v=1714969651","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ac41de0d7bcf1b68bd7eccd8f4a3e98c6678c28_0b8fbe98-92d7-49f5-b119-7ce6ba907134.webp?v=1714969653","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f163287c1ab1777fffe30ed3706007651d48673_80f7e1c3-91f7-4db1-94a2-5d815d6fb951.webp?v=1714969655","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6e36333cf52fecc1f6f05db2893b1dd899b1a23_699d4e60-d5fa-4ff1-8947-8c69a250098b.webp?v=1714969658","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc9a565bee45a7e35ae93a33838f6420048c70ad_df924473-03ec-4df1-8870-0217ae8f2dca.webp?v=1714969660"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b96459ee5a6d672ce541b535e7fecea4f4efc35_ff55ba06-77a5-45da-9233-ad17050afea4.webp?v=1714969639","options":["color"],"media":[{"alt":null,"id":23896174461027,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b96459ee5a6d672ce541b535e7fecea4f4efc35_ff55ba06-77a5-45da-9233-ad17050afea4.webp?v=1714969639"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b96459ee5a6d672ce541b535e7fecea4f4efc35_ff55ba06-77a5-45da-9233-ad17050afea4.webp?v=1714969639","width":2000},{"alt":null,"id":23896175116387,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77bbae91cef3afba5766c67ca13b4fd65843f3ad_9c284b33-6783-4690-9c9a-99400f7468ea.webp?v=1714969641"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77bbae91cef3afba5766c67ca13b4fd65843f3ad_9c284b33-6783-4690-9c9a-99400f7468ea.webp?v=1714969641","width":2000},{"alt":null,"id":23896176132195,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f65703e7be96d49fa67e25b5a6ec1741ca07f5dc_e66fccb4-5e0d-48e1-9187-9b9858358e55.webp?v=1714969646"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f65703e7be96d49fa67e25b5a6ec1741ca07f5dc_e66fccb4-5e0d-48e1-9187-9b9858358e55.webp?v=1714969646","width":2000},{"alt":null,"id":23896176722019,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f5d46e6f7e59779e95ed3e924dabc2c44c3fd8b_c9fabd5c-e5c9-4a72-bd26-e9138df40452.webp?v=1714969648"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f5d46e6f7e59779e95ed3e924dabc2c44c3fd8b_c9fabd5c-e5c9-4a72-bd26-e9138df40452.webp?v=1714969648","width":2000},{"alt":null,"id":23896177246307,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f12785e78ba70a9334be48d7bbef10000a45112_3ad7d192-2a37-4cc7-8c24-35a9608ea7a0.webp?v=1714969651"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f12785e78ba70a9334be48d7bbef10000a45112_3ad7d192-2a37-4cc7-8c24-35a9608ea7a0.webp?v=1714969651","width":2000},{"alt":null,"id":23896177868899,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ac41de0d7bcf1b68bd7eccd8f4a3e98c6678c28_0b8fbe98-92d7-49f5-b119-7ce6ba907134.webp?v=1714969653"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ac41de0d7bcf1b68bd7eccd8f4a3e98c6678c28_0b8fbe98-92d7-49f5-b119-7ce6ba907134.webp?v=1714969653","width":2000},{"alt":null,"id":23896178360419,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f163287c1ab1777fffe30ed3706007651d48673_80f7e1c3-91f7-4db1-94a2-5d815d6fb951.webp?v=1714969655"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f163287c1ab1777fffe30ed3706007651d48673_80f7e1c3-91f7-4db1-94a2-5d815d6fb951.webp?v=1714969655","width":2000},{"alt":null,"id":23896178688099,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6e36333cf52fecc1f6f05db2893b1dd899b1a23_699d4e60-d5fa-4ff1-8947-8c69a250098b.webp?v=1714969658"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6e36333cf52fecc1f6f05db2893b1dd899b1a23_699d4e60-d5fa-4ff1-8947-8c69a250098b.webp?v=1714969658","width":2000},{"alt":null,"id":23896179245155,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc9a565bee45a7e35ae93a33838f6420048c70ad_df924473-03ec-4df1-8870-0217ae8f2dca.webp?v=1714969660"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc9a565bee45a7e35ae93a33838f6420048c70ad_df924473-03ec-4df1-8870-0217ae8f2dca.webp?v=1714969660","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$bumper = null;
$variants = [{"id":41915662762083,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB58","requires_shipping":true,"taxable":true,"featured_image":{"id":31490768240739,"product_id":7415932420195,"position":2,"created_at":"2024-05-06T12:27:21+08:00","updated_at":"2024-05-06T12:27:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77bbae91cef3afba5766c67ca13b4fd65843f3ad_9c284b33-6783-4690-9c9a-99400f7468ea.webp?v=1714969641","variant_ids":[41915662762083]},"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-PB58","featured_media":{"alt":null,"id":23896175116387,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77bbae91cef3afba5766c67ca13b4fd65843f3ad_9c284b33-6783-4690-9c9a-99400f7468ea.webp?v=1714969641"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41915662762083,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB58","requires_shipping":true,"taxable":true,"featured_image":{"id":31490768240739,"product_id":7415932420195,"position":2,"created_at":"2024-05-06T12:27:21+08:00","updated_at":"2024-05-06T12:27:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77bbae91cef3afba5766c67ca13b4fd65843f3ad_9c284b33-6783-4690-9c9a-99400f7468ea.webp?v=1714969641","variant_ids":[41915662762083]},"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-PB58","featured_media":{"alt":null,"id":23896175116387,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77bbae91cef3afba5766c67ca13b4fd65843f3ad_9c284b33-6783-4690-9c9a-99400f7468ea.webp?v=1714969641"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}};
$device_handle = null
var sellingStatus
if ($bumper) {
$(document).ready(function() {
var productImg = $product.images[0]
var bumperVariants = $bumper.variants;
var bumperColors = new Object();
var currentVariant = '';
var productType = '';
bumperVariants.forEach(variant => {
bumperColors[`${variant.title.split(' (')[0].toLowerCase()}`] = variant.featured_image.src;
});
if (productType === 'mod-nx-backplate' || productType === 'mod-backplate') {
mergeImages(
[productImg, bumperColors[currentVariant]],
{ crossOrigin: 'anonymous' }
).then(mergedImg => {
$('.merged-img').attr('src', mergedImg);
});
} else {
mergeImages(
[bumperColors[currentVariant], productImg],
{ crossOrigin: 'anonymous' }
).then(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: "停產"
}