$product = {"id":7408540647523,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 波巴費特-推推-幽默系列","handle":"iphone-12-pro-max-mod-nx-printable-pc08","description":null,"published_at":"2024-06-11T16:40:08+08:00","created_at":"2024-05-03T15:46:39+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":41886645846115,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PC08","requires_shipping":true,"taxable":true,"featured_image":{"id":31472537337955,"product_id":7408540647523,"position":2,"created_at":"2024-05-03T15:46:44+08:00","updated_at":"2024-05-03T15:46:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8cf79bb77e3780b7d400c0b9699237a7cf2fb5c6_7c449381-d3fa-484f-91d6-68a04766bc76.webp?v=1714722404","variant_ids":[41886645846115]},"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-PC08","featured_media":{"alt":null,"id":23877454594147,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8cf79bb77e3780b7d400c0b9699237a7cf2fb5c6_7c449381-d3fa-484f-91d6-68a04766bc76.webp?v=1714722404"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1018e7c18e888d5afbe5ae89d3b34719b390f5ae_0d6407fa-4128-424f-99df-d23f2ee68e06.webp?v=1714722402","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8cf79bb77e3780b7d400c0b9699237a7cf2fb5c6_7c449381-d3fa-484f-91d6-68a04766bc76.webp?v=1714722404","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e094682a88ad48c539654a17af5f0b6ea6eb662d_f2621fca-ab6b-438c-9214-01b5198b75a7.webp?v=1714722406","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aab7e2a129dffcdad6aebce94a689fa38a0bc831_5019bd2e-c945-4a0f-8bc3-75b651edb2e9.webp?v=1714722409","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7363b318c06278ce2cfa53b46cecf4be6a739779_cd89004f-abde-47d7-8298-e93bfda762b3.webp?v=1714722411","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a21d99aed6b6dd40d0ba705209d3548b7b7a4a89_2670ad34-c320-4054-9527-53c56253e16e.webp?v=1714722413","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3fcc8439e29e3b4fe93241fde8ecf88b7956ee39_b65244b2-5804-4c86-bb77-3b6d5aac33d0.webp?v=1714722415","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9e8849fcb75eb38250e3e50ef5ae626ca3781c7_cdd057a7-db14-4e49-a56b-747096b00203.webp?v=1714722417","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b79147cf6cbd66430ee068228d61cecc9dcbe4c9_50dbaba3-6505-4853-9568-af090eafd057.webp?v=1714722420","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36f944dbab46b9b1343a0f3d56c9b6dd0031bd4d_c65d2c3c-3d57-4865-a032-453f6a5d4506.webp?v=1714722422"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1018e7c18e888d5afbe5ae89d3b34719b390f5ae_0d6407fa-4128-424f-99df-d23f2ee68e06.webp?v=1714722402","options":["color"],"media":[{"alt":null,"id":23877453971555,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1018e7c18e888d5afbe5ae89d3b34719b390f5ae_0d6407fa-4128-424f-99df-d23f2ee68e06.webp?v=1714722402"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1018e7c18e888d5afbe5ae89d3b34719b390f5ae_0d6407fa-4128-424f-99df-d23f2ee68e06.webp?v=1714722402","width":2000},{"alt":null,"id":23877454594147,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8cf79bb77e3780b7d400c0b9699237a7cf2fb5c6_7c449381-d3fa-484f-91d6-68a04766bc76.webp?v=1714722404"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8cf79bb77e3780b7d400c0b9699237a7cf2fb5c6_7c449381-d3fa-484f-91d6-68a04766bc76.webp?v=1714722404","width":2000},{"alt":null,"id":23877455085667,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e094682a88ad48c539654a17af5f0b6ea6eb662d_f2621fca-ab6b-438c-9214-01b5198b75a7.webp?v=1714722406"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e094682a88ad48c539654a17af5f0b6ea6eb662d_f2621fca-ab6b-438c-9214-01b5198b75a7.webp?v=1714722406","width":2000},{"alt":null,"id":23877455478883,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aab7e2a129dffcdad6aebce94a689fa38a0bc831_5019bd2e-c945-4a0f-8bc3-75b651edb2e9.webp?v=1714722409"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aab7e2a129dffcdad6aebce94a689fa38a0bc831_5019bd2e-c945-4a0f-8bc3-75b651edb2e9.webp?v=1714722409","width":2000},{"alt":null,"id":23877456167011,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7363b318c06278ce2cfa53b46cecf4be6a739779_cd89004f-abde-47d7-8298-e93bfda762b3.webp?v=1714722411"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7363b318c06278ce2cfa53b46cecf4be6a739779_cd89004f-abde-47d7-8298-e93bfda762b3.webp?v=1714722411","width":2000},{"alt":null,"id":23877456887907,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a21d99aed6b6dd40d0ba705209d3548b7b7a4a89_2670ad34-c320-4054-9527-53c56253e16e.webp?v=1714722413"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a21d99aed6b6dd40d0ba705209d3548b7b7a4a89_2670ad34-c320-4054-9527-53c56253e16e.webp?v=1714722413","width":2000},{"alt":null,"id":23877457379427,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3fcc8439e29e3b4fe93241fde8ecf88b7956ee39_b65244b2-5804-4c86-bb77-3b6d5aac33d0.webp?v=1714722415"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3fcc8439e29e3b4fe93241fde8ecf88b7956ee39_b65244b2-5804-4c86-bb77-3b6d5aac33d0.webp?v=1714722415","width":2000},{"alt":null,"id":23877457772643,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9e8849fcb75eb38250e3e50ef5ae626ca3781c7_cdd057a7-db14-4e49-a56b-747096b00203.webp?v=1714722417"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9e8849fcb75eb38250e3e50ef5ae626ca3781c7_cdd057a7-db14-4e49-a56b-747096b00203.webp?v=1714722417","width":2000},{"alt":null,"id":23877458395235,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b79147cf6cbd66430ee068228d61cecc9dcbe4c9_50dbaba3-6505-4853-9568-af090eafd057.webp?v=1714722420"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b79147cf6cbd66430ee068228d61cecc9dcbe4c9_50dbaba3-6505-4853-9568-af090eafd057.webp?v=1714722420","width":2000},{"alt":null,"id":23877458853987,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36f944dbab46b9b1343a0f3d56c9b6dd0031bd4d_c65d2c3c-3d57-4865-a032-453f6a5d4506.webp?v=1714722422"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36f944dbab46b9b1343a0f3d56c9b6dd0031bd4d_c65d2c3c-3d57-4865-a032-453f6a5d4506.webp?v=1714722422","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41886645846115,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PC08","requires_shipping":true,"taxable":true,"featured_image":{"id":31472537337955,"product_id":7408540647523,"position":2,"created_at":"2024-05-03T15:46:44+08:00","updated_at":"2024-05-03T15:46:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8cf79bb77e3780b7d400c0b9699237a7cf2fb5c6_7c449381-d3fa-484f-91d6-68a04766bc76.webp?v=1714722404","variant_ids":[41886645846115]},"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-PC08","featured_media":{"alt":null,"id":23877454594147,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8cf79bb77e3780b7d400c0b9699237a7cf2fb5c6_7c449381-d3fa-484f-91d6-68a04766bc76.webp?v=1714722404"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41886645846115,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PC08","requires_shipping":true,"taxable":true,"featured_image":{"id":31472537337955,"product_id":7408540647523,"position":2,"created_at":"2024-05-03T15:46:44+08:00","updated_at":"2024-05-03T15:46:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8cf79bb77e3780b7d400c0b9699237a7cf2fb5c6_7c449381-d3fa-484f-91d6-68a04766bc76.webp?v=1714722404","variant_ids":[41886645846115]},"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-PC08","featured_media":{"alt":null,"id":23877454594147,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8cf79bb77e3780b7d400c0b9699237a7cf2fb5c6_7c449381-d3fa-484f-91d6-68a04766bc76.webp?v=1714722404"}},"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: "停產"
}