$product = {"id":7408441163875,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士-經典","handle":"iphone-12-pro-max-mod-nx-printable-pb23","description":null,"published_at":"2024-06-11T16:37:18+08:00","created_at":"2024-05-03T15:27:05+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":41885510533219,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB23","requires_shipping":true,"taxable":true,"featured_image":{"id":31472289742947,"product_id":7408441163875,"position":6,"created_at":"2024-05-03T15:27:19+08:00","updated_at":"2024-05-03T15:27:19+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29451b262c1e5a4f966bcb3e2fcd83637f0ef0ec_0058d82a-15e2-4507-8305-89f83247eec7.webp?v=1714721239","variant_ids":[41885510533219]},"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-PB23","featured_media":{"alt":null,"id":23877206081635,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29451b262c1e5a4f966bcb3e2fcd83637f0ef0ec_0058d82a-15e2-4507-8305-89f83247eec7.webp?v=1714721239"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86c830018276ea6005b85c88b314ee5d31b02451_6396f3bc-69ad-4ca1-90e4-746a1b562118.webp?v=1714721228","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd79ef35b5ef47ca58d5ee70d3001bf84672590e_bb751a86-0c2a-4e5e-b968-6babb5e982a0.webp?v=1714721230","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/544e2d27b2c1c2d25703dd71ed98c7e874bc97d5_85935520-f862-41d0-8334-043d2dadcc03.webp?v=1714721232","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/73d287e1ca603fb2d7bf2184779d73d0d1fab1ba_5bd75f90-37ee-4052-b56c-513f6471dac7.webp?v=1714721235","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a5c3a0b1260ff5f39f6b6f2a9586ad0c295ca3b_e3df7af3-31ca-4f27-ba97-5d4629d24545.webp?v=1714721237","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29451b262c1e5a4f966bcb3e2fcd83637f0ef0ec_0058d82a-15e2-4507-8305-89f83247eec7.webp?v=1714721239","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/526eecb727fe2de7ac4a102e375b152a8c128826_c4d8e9df-5836-46a9-ad00-8a6509d578dd.webp?v=1714721242","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/747935682b3e91075bce5aed4798454a041b2a39_620d81a5-e956-4b5e-a192-680e7c5436d8.webp?v=1714721244","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35a17e74869f77f5c3fe8a48526739900fe6babb_15779993-cc2b-40c0-ab37-f18302f7252c.webp?v=1714721246","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffe2c0fe53d743d6da4b9c7b9d2a2d2d6b62b7d2_0925ca0f-3ada-4735-9c81-c8817f540613.webp?v=1714721248"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86c830018276ea6005b85c88b314ee5d31b02451_6396f3bc-69ad-4ca1-90e4-746a1b562118.webp?v=1714721228","options":["color"],"media":[{"alt":null,"id":23877203656803,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86c830018276ea6005b85c88b314ee5d31b02451_6396f3bc-69ad-4ca1-90e4-746a1b562118.webp?v=1714721228"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86c830018276ea6005b85c88b314ee5d31b02451_6396f3bc-69ad-4ca1-90e4-746a1b562118.webp?v=1714721228","width":2000},{"alt":null,"id":23877204213859,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd79ef35b5ef47ca58d5ee70d3001bf84672590e_bb751a86-0c2a-4e5e-b968-6babb5e982a0.webp?v=1714721230"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd79ef35b5ef47ca58d5ee70d3001bf84672590e_bb751a86-0c2a-4e5e-b968-6babb5e982a0.webp?v=1714721230","width":2000},{"alt":null,"id":23877204770915,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/544e2d27b2c1c2d25703dd71ed98c7e874bc97d5_85935520-f862-41d0-8334-043d2dadcc03.webp?v=1714721232"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/544e2d27b2c1c2d25703dd71ed98c7e874bc97d5_85935520-f862-41d0-8334-043d2dadcc03.webp?v=1714721232","width":2000},{"alt":null,"id":23877205262435,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/73d287e1ca603fb2d7bf2184779d73d0d1fab1ba_5bd75f90-37ee-4052-b56c-513f6471dac7.webp?v=1714721235"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/73d287e1ca603fb2d7bf2184779d73d0d1fab1ba_5bd75f90-37ee-4052-b56c-513f6471dac7.webp?v=1714721235","width":2000},{"alt":null,"id":23877205655651,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a5c3a0b1260ff5f39f6b6f2a9586ad0c295ca3b_e3df7af3-31ca-4f27-ba97-5d4629d24545.webp?v=1714721237"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a5c3a0b1260ff5f39f6b6f2a9586ad0c295ca3b_e3df7af3-31ca-4f27-ba97-5d4629d24545.webp?v=1714721237","width":2000},{"alt":null,"id":23877206081635,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29451b262c1e5a4f966bcb3e2fcd83637f0ef0ec_0058d82a-15e2-4507-8305-89f83247eec7.webp?v=1714721239"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29451b262c1e5a4f966bcb3e2fcd83637f0ef0ec_0058d82a-15e2-4507-8305-89f83247eec7.webp?v=1714721239","width":2000},{"alt":null,"id":23877206474851,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/526eecb727fe2de7ac4a102e375b152a8c128826_c4d8e9df-5836-46a9-ad00-8a6509d578dd.webp?v=1714721242"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/526eecb727fe2de7ac4a102e375b152a8c128826_c4d8e9df-5836-46a9-ad00-8a6509d578dd.webp?v=1714721242","width":2000},{"alt":null,"id":23877206933603,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/747935682b3e91075bce5aed4798454a041b2a39_620d81a5-e956-4b5e-a192-680e7c5436d8.webp?v=1714721244"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/747935682b3e91075bce5aed4798454a041b2a39_620d81a5-e956-4b5e-a192-680e7c5436d8.webp?v=1714721244","width":2000},{"alt":null,"id":23877207392355,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35a17e74869f77f5c3fe8a48526739900fe6babb_15779993-cc2b-40c0-ab37-f18302f7252c.webp?v=1714721246"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35a17e74869f77f5c3fe8a48526739900fe6babb_15779993-cc2b-40c0-ab37-f18302f7252c.webp?v=1714721246","width":2000},{"alt":null,"id":23877207687267,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffe2c0fe53d743d6da4b9c7b9d2a2d2d6b62b7d2_0925ca0f-3ada-4735-9c81-c8817f540613.webp?v=1714721248"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffe2c0fe53d743d6da4b9c7b9d2a2d2d6b62b7d2_0925ca0f-3ada-4735-9c81-c8817f540613.webp?v=1714721248","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41885510533219,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB23","requires_shipping":true,"taxable":true,"featured_image":{"id":31472289742947,"product_id":7408441163875,"position":6,"created_at":"2024-05-03T15:27:19+08:00","updated_at":"2024-05-03T15:27:19+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29451b262c1e5a4f966bcb3e2fcd83637f0ef0ec_0058d82a-15e2-4507-8305-89f83247eec7.webp?v=1714721239","variant_ids":[41885510533219]},"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-PB23","featured_media":{"alt":null,"id":23877206081635,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29451b262c1e5a4f966bcb3e2fcd83637f0ef0ec_0058d82a-15e2-4507-8305-89f83247eec7.webp?v=1714721239"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41885510533219,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB23","requires_shipping":true,"taxable":true,"featured_image":{"id":31472289742947,"product_id":7408441163875,"position":6,"created_at":"2024-05-03T15:27:19+08:00","updated_at":"2024-05-03T15:27:19+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29451b262c1e5a4f966bcb3e2fcd83637f0ef0ec_0058d82a-15e2-4507-8305-89f83247eec7.webp?v=1714721239","variant_ids":[41885510533219]},"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-PB23","featured_media":{"alt":null,"id":23877206081635,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29451b262c1e5a4f966bcb3e2fcd83637f0ef0ec_0058d82a-15e2-4507-8305-89f83247eec7.webp?v=1714721239"}},"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: "停產"
}