$product = {"id":7407987130467,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - K2SO 1-俠盜一號","handle":"iphone-14-plus-mod-nx-printable-pb68","description":null,"published_at":"2024-06-11T16:28:24+08:00","created_at":"2024-05-03T11:29: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 14 Plus","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":41881418170467,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB68","requires_shipping":true,"taxable":true,"featured_image":{"id":31470880292963,"product_id":7407987130467,"position":4,"created_at":"2024-05-03T11:29:20+08:00","updated_at":"2024-05-03T11:29:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3c3a07e190a02e4114aac207e779d46c526c05b_2c4030b6-59fd-499b-af99-5e67be5acd8f.webp?v=1714706960","variant_ids":[41881418170467]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - K2SO 1-俠盜一號 - 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":"NPB0126124-PB68","featured_media":{"alt":null,"id":23875784900707,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3c3a07e190a02e4114aac207e779d46c526c05b_2c4030b6-59fd-499b-af99-5e67be5acd8f.webp?v=1714706960"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d03d30bf91da877d2542c82be872894b60983f8_296aa5cc-0f4e-4c19-9494-eb61e8ad398f.webp?v=1714706953","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a2565ec41ba72f0268d612d1220e6725f911dfe_a3b29724-6cfc-475b-898d-9619b3c2ba6e.webp?v=1714706955","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0b8119039a6e444295bd2b5a276a2207b8acce2_1503e80b-581c-4252-a652-e85cd1fce0a8.webp?v=1714706958","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3c3a07e190a02e4114aac207e779d46c526c05b_2c4030b6-59fd-499b-af99-5e67be5acd8f.webp?v=1714706960","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3083931aa04b062c3453d3862448f403fd76e2ce_04739001-7aae-4a56-a922-f3f10a756610.webp?v=1714706962","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be7bd5f52f24d968a13f9d8ae85e6a4c338b920b_1e1bcd55-bdfb-4cea-b825-fe6a9e22d684.webp?v=1714706965","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0096cec22e92d2126c289f3c1ad22d08f3d949cc_f5a000ad-2649-4744-b3d4-fca4f75703a5.webp?v=1714706967","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57aae63d3ec7e782c3d4dac55d4d50367480ed56_e94494fd-8d21-4a46-9879-7dd821780a98.webp?v=1714706970","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/12f7a94aaa582b5f2a242d3cf5486a17e758914a_f60c995e-da05-455c-a85e-b44ba9dce345.webp?v=1714706972","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99ec0a9770cbe889273f37690fb5b46c6eb1740d_fdadfdd3-852c-4f67-9831-6ee3f4ea661b.webp?v=1714706974"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d03d30bf91da877d2542c82be872894b60983f8_296aa5cc-0f4e-4c19-9494-eb61e8ad398f.webp?v=1714706953","options":["color"],"media":[{"alt":null,"id":23875783491683,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d03d30bf91da877d2542c82be872894b60983f8_296aa5cc-0f4e-4c19-9494-eb61e8ad398f.webp?v=1714706953"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d03d30bf91da877d2542c82be872894b60983f8_296aa5cc-0f4e-4c19-9494-eb61e8ad398f.webp?v=1714706953","width":2000},{"alt":null,"id":23875783983203,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a2565ec41ba72f0268d612d1220e6725f911dfe_a3b29724-6cfc-475b-898d-9619b3c2ba6e.webp?v=1714706955"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a2565ec41ba72f0268d612d1220e6725f911dfe_a3b29724-6cfc-475b-898d-9619b3c2ba6e.webp?v=1714706955","width":2000},{"alt":null,"id":23875784474723,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0b8119039a6e444295bd2b5a276a2207b8acce2_1503e80b-581c-4252-a652-e85cd1fce0a8.webp?v=1714706958"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0b8119039a6e444295bd2b5a276a2207b8acce2_1503e80b-581c-4252-a652-e85cd1fce0a8.webp?v=1714706958","width":2000},{"alt":null,"id":23875784900707,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3c3a07e190a02e4114aac207e779d46c526c05b_2c4030b6-59fd-499b-af99-5e67be5acd8f.webp?v=1714706960"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3c3a07e190a02e4114aac207e779d46c526c05b_2c4030b6-59fd-499b-af99-5e67be5acd8f.webp?v=1714706960","width":2000},{"alt":null,"id":23875785392227,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3083931aa04b062c3453d3862448f403fd76e2ce_04739001-7aae-4a56-a922-f3f10a756610.webp?v=1714706962"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3083931aa04b062c3453d3862448f403fd76e2ce_04739001-7aae-4a56-a922-f3f10a756610.webp?v=1714706962","width":2000},{"alt":null,"id":23875785883747,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be7bd5f52f24d968a13f9d8ae85e6a4c338b920b_1e1bcd55-bdfb-4cea-b825-fe6a9e22d684.webp?v=1714706965"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be7bd5f52f24d968a13f9d8ae85e6a4c338b920b_1e1bcd55-bdfb-4cea-b825-fe6a9e22d684.webp?v=1714706965","width":2000},{"alt":null,"id":23875786473571,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0096cec22e92d2126c289f3c1ad22d08f3d949cc_f5a000ad-2649-4744-b3d4-fca4f75703a5.webp?v=1714706967"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0096cec22e92d2126c289f3c1ad22d08f3d949cc_f5a000ad-2649-4744-b3d4-fca4f75703a5.webp?v=1714706967","width":2000},{"alt":null,"id":23875787128931,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57aae63d3ec7e782c3d4dac55d4d50367480ed56_e94494fd-8d21-4a46-9879-7dd821780a98.webp?v=1714706970"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57aae63d3ec7e782c3d4dac55d4d50367480ed56_e94494fd-8d21-4a46-9879-7dd821780a98.webp?v=1714706970","width":2000},{"alt":null,"id":23875787620451,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/12f7a94aaa582b5f2a242d3cf5486a17e758914a_f60c995e-da05-455c-a85e-b44ba9dce345.webp?v=1714706972"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/12f7a94aaa582b5f2a242d3cf5486a17e758914a_f60c995e-da05-455c-a85e-b44ba9dce345.webp?v=1714706972","width":2000},{"alt":null,"id":23875788144739,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99ec0a9770cbe889273f37690fb5b46c6eb1740d_fdadfdd3-852c-4f67-9831-6ee3f4ea661b.webp?v=1714706974"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99ec0a9770cbe889273f37690fb5b46c6eb1740d_fdadfdd3-852c-4f67-9831-6ee3f4ea661b.webp?v=1714706974","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$bumper = null;
$variants = [{"id":41881418170467,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB68","requires_shipping":true,"taxable":true,"featured_image":{"id":31470880292963,"product_id":7407987130467,"position":4,"created_at":"2024-05-03T11:29:20+08:00","updated_at":"2024-05-03T11:29:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3c3a07e190a02e4114aac207e779d46c526c05b_2c4030b6-59fd-499b-af99-5e67be5acd8f.webp?v=1714706960","variant_ids":[41881418170467]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - K2SO 1-俠盜一號 - 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":"NPB0126124-PB68","featured_media":{"alt":null,"id":23875784900707,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3c3a07e190a02e4114aac207e779d46c526c05b_2c4030b6-59fd-499b-af99-5e67be5acd8f.webp?v=1714706960"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41881418170467,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB68","requires_shipping":true,"taxable":true,"featured_image":{"id":31470880292963,"product_id":7407987130467,"position":4,"created_at":"2024-05-03T11:29:20+08:00","updated_at":"2024-05-03T11:29:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3c3a07e190a02e4114aac207e779d46c526c05b_2c4030b6-59fd-499b-af99-5e67be5acd8f.webp?v=1714706960","variant_ids":[41881418170467]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - K2SO 1-俠盜一號 - 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":"NPB0126124-PB68","featured_media":{"alt":null,"id":23875784900707,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3c3a07e190a02e4114aac207e779d46c526c05b_2c4030b6-59fd-499b-af99-5e67be5acd8f.webp?v=1714706960"}},"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: "停產"
}