$product = {"id":7408376250467,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵-剪紙系列","handle":"iphone-12-pro-max-mod-nx-printable-pb56","description":null,"published_at":"2024-06-11T16:35:32+08:00","created_at":"2024-05-03T15:14:25+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 12 pro 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":41884793274467,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB56","requires_shipping":true,"taxable":true,"featured_image":{"id":31472105783395,"product_id":7408376250467,"position":9,"created_at":"2024-05-03T15:14:46+08:00","updated_at":"2024-05-03T15:14:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af56cab86a75a8b545d94d0f2b757cacecb6e3ae_21f5d275-7b8e-498f-8ada-7c6e2550a59f.webp?v=1714720486","variant_ids":[41884793274467]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro 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":"NPB0118724-PB56","featured_media":{"alt":null,"id":23877021171811,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af56cab86a75a8b545d94d0f2b757cacecb6e3ae_21f5d275-7b8e-498f-8ada-7c6e2550a59f.webp?v=1714720486"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/637ef693948f4dc75e462ec324df3e19e94bb06c_197c0ccb-ab6f-486d-920d-aa2f2cf57f66.webp?v=1714720467","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7dcd29cf31bc23529a06e6c0690d4d602dc41938_1a9a31ec-9e03-4a68-b73b-70af758c43f5.webp?v=1714720470","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf6a50c94b200a7ef98965de6ba8c9436b81ab59_2a1bf426-32ff-4674-b378-211eeecaf574.webp?v=1714720472","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2808d1b1f9b66ea475292b28147ca41668ac654b_4d24452b-e767-4b8a-b512-7b165b815568.webp?v=1714720474","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc147a1fabd33cfab281c21f2c0c726258ffb384_54e0a72b-3272-4d70-b9cc-42c4fbf246d5.webp?v=1714720476","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7284802f69b0eb136c51016fe16a8e489b560f33_caaa3c9c-39ec-41ae-bdcc-3f0912148f52.webp?v=1714720479","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a015e20e7a201ef1da95fc362ea76a59c7daec7d_46fb7fe2-fe38-44b0-95a5-579b1923a246.webp?v=1714720481","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/61d1e06f631c95d5dd69cd3af0555867161fb711_7070f61b-8b76-4c9d-bfd2-92c379d9ec11.webp?v=1714720484","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af56cab86a75a8b545d94d0f2b757cacecb6e3ae_21f5d275-7b8e-498f-8ada-7c6e2550a59f.webp?v=1714720486","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2682ab506f85ead1e3d3f333be031603370ea150_5642dcf1-df84-4c62-86f1-607512fc7740.webp?v=1714720488"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/637ef693948f4dc75e462ec324df3e19e94bb06c_197c0ccb-ab6f-486d-920d-aa2f2cf57f66.webp?v=1714720467","options":["color"],"media":[{"alt":null,"id":23877016682595,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/637ef693948f4dc75e462ec324df3e19e94bb06c_197c0ccb-ab6f-486d-920d-aa2f2cf57f66.webp?v=1714720467"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/637ef693948f4dc75e462ec324df3e19e94bb06c_197c0ccb-ab6f-486d-920d-aa2f2cf57f66.webp?v=1714720467","width":2000},{"alt":null,"id":23877017370723,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7dcd29cf31bc23529a06e6c0690d4d602dc41938_1a9a31ec-9e03-4a68-b73b-70af758c43f5.webp?v=1714720470"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7dcd29cf31bc23529a06e6c0690d4d602dc41938_1a9a31ec-9e03-4a68-b73b-70af758c43f5.webp?v=1714720470","width":2000},{"alt":null,"id":23877017862243,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf6a50c94b200a7ef98965de6ba8c9436b81ab59_2a1bf426-32ff-4674-b378-211eeecaf574.webp?v=1714720472"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf6a50c94b200a7ef98965de6ba8c9436b81ab59_2a1bf426-32ff-4674-b378-211eeecaf574.webp?v=1714720472","width":2000},{"alt":null,"id":23877018353763,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2808d1b1f9b66ea475292b28147ca41668ac654b_4d24452b-e767-4b8a-b512-7b165b815568.webp?v=1714720474"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2808d1b1f9b66ea475292b28147ca41668ac654b_4d24452b-e767-4b8a-b512-7b165b815568.webp?v=1714720474","width":2000},{"alt":null,"id":23877019205731,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc147a1fabd33cfab281c21f2c0c726258ffb384_54e0a72b-3272-4d70-b9cc-42c4fbf246d5.webp?v=1714720476"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc147a1fabd33cfab281c21f2c0c726258ffb384_54e0a72b-3272-4d70-b9cc-42c4fbf246d5.webp?v=1714720476","width":2000},{"alt":null,"id":23877019795555,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7284802f69b0eb136c51016fe16a8e489b560f33_caaa3c9c-39ec-41ae-bdcc-3f0912148f52.webp?v=1714720479"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7284802f69b0eb136c51016fe16a8e489b560f33_caaa3c9c-39ec-41ae-bdcc-3f0912148f52.webp?v=1714720479","width":2000},{"alt":null,"id":23877020090467,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a015e20e7a201ef1da95fc362ea76a59c7daec7d_46fb7fe2-fe38-44b0-95a5-579b1923a246.webp?v=1714720481"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a015e20e7a201ef1da95fc362ea76a59c7daec7d_46fb7fe2-fe38-44b0-95a5-579b1923a246.webp?v=1714720481","width":2000},{"alt":null,"id":23877020745827,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/61d1e06f631c95d5dd69cd3af0555867161fb711_7070f61b-8b76-4c9d-bfd2-92c379d9ec11.webp?v=1714720484"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/61d1e06f631c95d5dd69cd3af0555867161fb711_7070f61b-8b76-4c9d-bfd2-92c379d9ec11.webp?v=1714720484","width":2000},{"alt":null,"id":23877021171811,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af56cab86a75a8b545d94d0f2b757cacecb6e3ae_21f5d275-7b8e-498f-8ada-7c6e2550a59f.webp?v=1714720486"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af56cab86a75a8b545d94d0f2b757cacecb6e3ae_21f5d275-7b8e-498f-8ada-7c6e2550a59f.webp?v=1714720486","width":2000},{"alt":null,"id":23877021728867,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2682ab506f85ead1e3d3f333be031603370ea150_5642dcf1-df84-4c62-86f1-607512fc7740.webp?v=1714720488"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2682ab506f85ead1e3d3f333be031603370ea150_5642dcf1-df84-4c62-86f1-607512fc7740.webp?v=1714720488","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41884793274467,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB56","requires_shipping":true,"taxable":true,"featured_image":{"id":31472105783395,"product_id":7408376250467,"position":9,"created_at":"2024-05-03T15:14:46+08:00","updated_at":"2024-05-03T15:14:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af56cab86a75a8b545d94d0f2b757cacecb6e3ae_21f5d275-7b8e-498f-8ada-7c6e2550a59f.webp?v=1714720486","variant_ids":[41884793274467]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro 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":"NPB0118724-PB56","featured_media":{"alt":null,"id":23877021171811,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af56cab86a75a8b545d94d0f2b757cacecb6e3ae_21f5d275-7b8e-498f-8ada-7c6e2550a59f.webp?v=1714720486"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41884793274467,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB56","requires_shipping":true,"taxable":true,"featured_image":{"id":31472105783395,"product_id":7408376250467,"position":9,"created_at":"2024-05-03T15:14:46+08:00","updated_at":"2024-05-03T15:14:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af56cab86a75a8b545d94d0f2b757cacecb6e3ae_21f5d275-7b8e-498f-8ada-7c6e2550a59f.webp?v=1714720486","variant_ids":[41884793274467]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro 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":"NPB0118724-PB56","featured_media":{"alt":null,"id":23877021171811,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af56cab86a75a8b545d94d0f2b757cacecb6e3ae_21f5d275-7b8e-498f-8ada-7c6e2550a59f.webp?v=1714720486"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}};
$device_handle = null;
$brand_handle = null;
$type = "";
var sellingStatus
// 只有設計款(SKU 含 '-')才需要合圖
if ($isMerge && $defaultVariant.sku.includes('-')) {
$(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: "停產"
}