$product = {"id":7407872442467,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2D2-剪紙系列","handle":"iphone-14-plus-mod-nx-printable-pb57","description":null,"published_at":"2024-06-11T16:25:13+08:00","created_at":"2024-05-03T11:06:47+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":41879904256099,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB57","requires_shipping":true,"taxable":true,"featured_image":{"id":31470586364003,"product_id":7407872442467,"position":6,"created_at":"2024-05-03T11:07:01+08:00","updated_at":"2024-05-03T11:07:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/95537d198ce39d9643bf76fc5f49879a86031771_6a6d8e9b-a59c-4e2c-a3c6-57dd822ab7dc.webp?v=1714705621","variant_ids":[41879904256099]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0126124-PB57","featured_media":{"alt":null,"id":23875490218083,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/95537d198ce39d9643bf76fc5f49879a86031771_6a6d8e9b-a59c-4e2c-a3c6-57dd822ab7dc.webp?v=1714705621"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ca86090974ef10deff707b787cf779ca3ac1930_ab1210ed-6329-4afc-b4da-3bf476df53b7.webp?v=1714705609","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d76cc9be1d5ad1694f336460614cf8d0d61617c_9c4f5fdd-13b2-4dd8-b225-a5bc2a808c46.webp?v=1714705612","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b6b23904d77b08d39876229defdd29ae8013a85_e6967c14-f407-46f4-850f-4d5796843a88.webp?v=1714705614","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b5a768b320d74b966798904d283b7574c813ffdf_214de65d-8394-4bc4-96df-b3d9e00e3bbb.webp?v=1714705617","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72e02a3c45537b317f8e7c85b520705fa47301a2_6f66051a-acf6-4a89-986c-7dc152897300.webp?v=1714705619","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/95537d198ce39d9643bf76fc5f49879a86031771_6a6d8e9b-a59c-4e2c-a3c6-57dd822ab7dc.webp?v=1714705621","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/26348c7905c7ebdd00baa69a59847f744f46c31a_f2ebc91c-97c0-4a0e-a031-5c3f3af2c4b1.webp?v=1714705623","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/259ef182685768ac982798cfe9ca027d1e2372e9_b53fb5ce-0a35-4303-85c2-06002c17c67b.webp?v=1714705626","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51a03e0185b0d3460d8989af3e80fcc117aa0647_795ae35b-b9a2-4be1-8a41-16732b95bd9b.webp?v=1714705628","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9732488843429c2757047a4ac60dd6b769f3a5b_e58d96cd-554e-43d6-848a-85aa31ef4732.webp?v=1714705631"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ca86090974ef10deff707b787cf779ca3ac1930_ab1210ed-6329-4afc-b4da-3bf476df53b7.webp?v=1714705609","options":["color"],"media":[{"alt":null,"id":23875487957091,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ca86090974ef10deff707b787cf779ca3ac1930_ab1210ed-6329-4afc-b4da-3bf476df53b7.webp?v=1714705609"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ca86090974ef10deff707b787cf779ca3ac1930_ab1210ed-6329-4afc-b4da-3bf476df53b7.webp?v=1714705609","width":2000},{"alt":null,"id":23875488383075,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d76cc9be1d5ad1694f336460614cf8d0d61617c_9c4f5fdd-13b2-4dd8-b225-a5bc2a808c46.webp?v=1714705612"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d76cc9be1d5ad1694f336460614cf8d0d61617c_9c4f5fdd-13b2-4dd8-b225-a5bc2a808c46.webp?v=1714705612","width":2000},{"alt":null,"id":23875488841827,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b6b23904d77b08d39876229defdd29ae8013a85_e6967c14-f407-46f4-850f-4d5796843a88.webp?v=1714705614"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b6b23904d77b08d39876229defdd29ae8013a85_e6967c14-f407-46f4-850f-4d5796843a88.webp?v=1714705614","width":2000},{"alt":null,"id":23875489267811,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b5a768b320d74b966798904d283b7574c813ffdf_214de65d-8394-4bc4-96df-b3d9e00e3bbb.webp?v=1714705617"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b5a768b320d74b966798904d283b7574c813ffdf_214de65d-8394-4bc4-96df-b3d9e00e3bbb.webp?v=1714705617","width":2000},{"alt":null,"id":23875489792099,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72e02a3c45537b317f8e7c85b520705fa47301a2_6f66051a-acf6-4a89-986c-7dc152897300.webp?v=1714705619"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72e02a3c45537b317f8e7c85b520705fa47301a2_6f66051a-acf6-4a89-986c-7dc152897300.webp?v=1714705619","width":2000},{"alt":null,"id":23875490218083,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/95537d198ce39d9643bf76fc5f49879a86031771_6a6d8e9b-a59c-4e2c-a3c6-57dd822ab7dc.webp?v=1714705621"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/95537d198ce39d9643bf76fc5f49879a86031771_6a6d8e9b-a59c-4e2c-a3c6-57dd822ab7dc.webp?v=1714705621","width":2000},{"alt":null,"id":23875490644067,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/26348c7905c7ebdd00baa69a59847f744f46c31a_f2ebc91c-97c0-4a0e-a031-5c3f3af2c4b1.webp?v=1714705623"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/26348c7905c7ebdd00baa69a59847f744f46c31a_f2ebc91c-97c0-4a0e-a031-5c3f3af2c4b1.webp?v=1714705623","width":2000},{"alt":null,"id":23875491004515,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/259ef182685768ac982798cfe9ca027d1e2372e9_b53fb5ce-0a35-4303-85c2-06002c17c67b.webp?v=1714705626"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/259ef182685768ac982798cfe9ca027d1e2372e9_b53fb5ce-0a35-4303-85c2-06002c17c67b.webp?v=1714705626","width":2000},{"alt":null,"id":23875491430499,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51a03e0185b0d3460d8989af3e80fcc117aa0647_795ae35b-b9a2-4be1-8a41-16732b95bd9b.webp?v=1714705628"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51a03e0185b0d3460d8989af3e80fcc117aa0647_795ae35b-b9a2-4be1-8a41-16732b95bd9b.webp?v=1714705628","width":2000},{"alt":null,"id":23875491823715,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9732488843429c2757047a4ac60dd6b769f3a5b_e58d96cd-554e-43d6-848a-85aa31ef4732.webp?v=1714705631"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9732488843429c2757047a4ac60dd6b769f3a5b_e58d96cd-554e-43d6-848a-85aa31ef4732.webp?v=1714705631","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$bumper = null;
$variants = [{"id":41879904256099,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB57","requires_shipping":true,"taxable":true,"featured_image":{"id":31470586364003,"product_id":7407872442467,"position":6,"created_at":"2024-05-03T11:07:01+08:00","updated_at":"2024-05-03T11:07:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/95537d198ce39d9643bf76fc5f49879a86031771_6a6d8e9b-a59c-4e2c-a3c6-57dd822ab7dc.webp?v=1714705621","variant_ids":[41879904256099]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0126124-PB57","featured_media":{"alt":null,"id":23875490218083,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/95537d198ce39d9643bf76fc5f49879a86031771_6a6d8e9b-a59c-4e2c-a3c6-57dd822ab7dc.webp?v=1714705621"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41879904256099,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB57","requires_shipping":true,"taxable":true,"featured_image":{"id":31470586364003,"product_id":7407872442467,"position":6,"created_at":"2024-05-03T11:07:01+08:00","updated_at":"2024-05-03T11:07:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/95537d198ce39d9643bf76fc5f49879a86031771_6a6d8e9b-a59c-4e2c-a3c6-57dd822ab7dc.webp?v=1714705621","variant_ids":[41879904256099]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0126124-PB57","featured_media":{"alt":null,"id":23875490218083,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/95537d198ce39d9643bf76fc5f49879a86031771_6a6d8e9b-a59c-4e2c-a3c6-57dd822ab7dc.webp?v=1714705621"}},"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: "停產"
}