$product = {"id":7408489758819,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 爪哇族1-塗鴉藝術","handle":"iphone-12-pro-max-mod-nx-printable-pb35","description":null,"published_at":"2024-06-11T16:38:41+08:00","created_at":"2024-05-03T15:36:43+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":41886065524835,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB35","requires_shipping":true,"taxable":true,"featured_image":{"id":31472411148387,"product_id":7408489758819,"position":10,"created_at":"2024-05-03T15:37:05+08:00","updated_at":"2024-05-03T15:37:05+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86416243a7a0efb19a0a28ea04433ba55b10cb53_ef6ba2fe-6955-4d79-8555-8549305ab6b9.webp?v=1714721825","variant_ids":[41886065524835]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 爪哇族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":"NPB0118724-PB35","featured_media":{"alt":null,"id":23877328175203,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86416243a7a0efb19a0a28ea04433ba55b10cb53_ef6ba2fe-6955-4d79-8555-8549305ab6b9.webp?v=1714721825"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/55f5dd4d1d9ec28d38214d6ae937a959be4cde5a_ba4462d0-33ff-44f6-805f-5247cffac074.webp?v=1714721805","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/13243116de3c3c92db3feee8d00db146f445c49e_23741b53-ec67-49d2-8868-b7d1c93863e7.webp?v=1714721807","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88da1a3de60c3f2d44bffdf85059c9b310aa84c3_4a00d37e-8e49-4bb5-9858-04ee115cb413.webp?v=1714721809","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44ba665e384ed5046925b833f0ef2cb512752dfc_18af8751-f3e2-48a7-91cd-a6217f225816.webp?v=1714721812","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fbe057cbdd49062219f0bdb3f93920ae0092cf55_199018aa-f410-4918-ba32-b6169ea641c5.webp?v=1714721814","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/16ab310ec641ba80d6d4c700979ef929b2fcd774_0ee787b7-0c77-42d0-890d-124e5903029c.webp?v=1714721816","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d96eb534c851336b28ac584b293b2914d872f09b_e549bf0f-97ec-417e-ab16-9951272543da.webp?v=1714721818","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/683e7378b9f33fd5991812c1e0a1bcd5418c8152_6660dad7-2878-4dee-96e6-bcb28f42d4e6.webp?v=1714721820","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f7e07ea12a3d47473d8c9c3ba46b39d0dee1f588_b8d99234-5b72-4914-8834-c989bd78d727.webp?v=1714721823","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86416243a7a0efb19a0a28ea04433ba55b10cb53_ef6ba2fe-6955-4d79-8555-8549305ab6b9.webp?v=1714721825"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/55f5dd4d1d9ec28d38214d6ae937a959be4cde5a_ba4462d0-33ff-44f6-805f-5247cffac074.webp?v=1714721805","options":["color"],"media":[{"alt":null,"id":23877323325539,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/55f5dd4d1d9ec28d38214d6ae937a959be4cde5a_ba4462d0-33ff-44f6-805f-5247cffac074.webp?v=1714721805"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/55f5dd4d1d9ec28d38214d6ae937a959be4cde5a_ba4462d0-33ff-44f6-805f-5247cffac074.webp?v=1714721805","width":2000},{"alt":null,"id":23877323784291,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/13243116de3c3c92db3feee8d00db146f445c49e_23741b53-ec67-49d2-8868-b7d1c93863e7.webp?v=1714721807"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/13243116de3c3c92db3feee8d00db146f445c49e_23741b53-ec67-49d2-8868-b7d1c93863e7.webp?v=1714721807","width":2000},{"alt":null,"id":23877324505187,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88da1a3de60c3f2d44bffdf85059c9b310aa84c3_4a00d37e-8e49-4bb5-9858-04ee115cb413.webp?v=1714721809"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88da1a3de60c3f2d44bffdf85059c9b310aa84c3_4a00d37e-8e49-4bb5-9858-04ee115cb413.webp?v=1714721809","width":2000},{"alt":null,"id":23877324865635,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44ba665e384ed5046925b833f0ef2cb512752dfc_18af8751-f3e2-48a7-91cd-a6217f225816.webp?v=1714721812"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44ba665e384ed5046925b833f0ef2cb512752dfc_18af8751-f3e2-48a7-91cd-a6217f225816.webp?v=1714721812","width":2000},{"alt":null,"id":23877325488227,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fbe057cbdd49062219f0bdb3f93920ae0092cf55_199018aa-f410-4918-ba32-b6169ea641c5.webp?v=1714721814"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fbe057cbdd49062219f0bdb3f93920ae0092cf55_199018aa-f410-4918-ba32-b6169ea641c5.webp?v=1714721814","width":2000},{"alt":null,"id":23877325946979,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/16ab310ec641ba80d6d4c700979ef929b2fcd774_0ee787b7-0c77-42d0-890d-124e5903029c.webp?v=1714721816"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/16ab310ec641ba80d6d4c700979ef929b2fcd774_0ee787b7-0c77-42d0-890d-124e5903029c.webp?v=1714721816","width":2000},{"alt":null,"id":23877326405731,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d96eb534c851336b28ac584b293b2914d872f09b_e549bf0f-97ec-417e-ab16-9951272543da.webp?v=1714721818"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d96eb534c851336b28ac584b293b2914d872f09b_e549bf0f-97ec-417e-ab16-9951272543da.webp?v=1714721818","width":2000},{"alt":null,"id":23877327028323,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/683e7378b9f33fd5991812c1e0a1bcd5418c8152_6660dad7-2878-4dee-96e6-bcb28f42d4e6.webp?v=1714721820"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/683e7378b9f33fd5991812c1e0a1bcd5418c8152_6660dad7-2878-4dee-96e6-bcb28f42d4e6.webp?v=1714721820","width":2000},{"alt":null,"id":23877327519843,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f7e07ea12a3d47473d8c9c3ba46b39d0dee1f588_b8d99234-5b72-4914-8834-c989bd78d727.webp?v=1714721823"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f7e07ea12a3d47473d8c9c3ba46b39d0dee1f588_b8d99234-5b72-4914-8834-c989bd78d727.webp?v=1714721823","width":2000},{"alt":null,"id":23877328175203,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86416243a7a0efb19a0a28ea04433ba55b10cb53_ef6ba2fe-6955-4d79-8555-8549305ab6b9.webp?v=1714721825"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86416243a7a0efb19a0a28ea04433ba55b10cb53_ef6ba2fe-6955-4d79-8555-8549305ab6b9.webp?v=1714721825","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41886065524835,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB35","requires_shipping":true,"taxable":true,"featured_image":{"id":31472411148387,"product_id":7408489758819,"position":10,"created_at":"2024-05-03T15:37:05+08:00","updated_at":"2024-05-03T15:37:05+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86416243a7a0efb19a0a28ea04433ba55b10cb53_ef6ba2fe-6955-4d79-8555-8549305ab6b9.webp?v=1714721825","variant_ids":[41886065524835]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 爪哇族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":"NPB0118724-PB35","featured_media":{"alt":null,"id":23877328175203,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86416243a7a0efb19a0a28ea04433ba55b10cb53_ef6ba2fe-6955-4d79-8555-8549305ab6b9.webp?v=1714721825"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41886065524835,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB35","requires_shipping":true,"taxable":true,"featured_image":{"id":31472411148387,"product_id":7408489758819,"position":10,"created_at":"2024-05-03T15:37:05+08:00","updated_at":"2024-05-03T15:37:05+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86416243a7a0efb19a0a28ea04433ba55b10cb53_ef6ba2fe-6955-4d79-8555-8549305ab6b9.webp?v=1714721825","variant_ids":[41886065524835]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 爪哇族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":"NPB0118724-PB35","featured_media":{"alt":null,"id":23877328175203,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86416243a7a0efb19a0a28ea04433ba55b10cb53_ef6ba2fe-6955-4d79-8555-8549305ab6b9.webp?v=1714721825"}},"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: "停產"
}