$product = {"id":7408444211299,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士-Useless to Resist","handle":"iphone-12-pro-max-mod-nx-printable-pb96","description":null,"published_at":"2024-06-11T16:37:23+08:00","created_at":"2024-05-03T15:27:37+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":41885544218723,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB96","requires_shipping":true,"taxable":true,"featured_image":{"id":31472296591459,"product_id":7408444211299,"position":8,"created_at":"2024-05-03T15:27:56+08:00","updated_at":"2024-05-03T15:27:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3ad65e536821c2624afc82916bf355b539ce48dc_5221abba-9735-48c9-adbf-4209cffd482c.webp?v=1714721276","variant_ids":[41885544218723]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士-Useless to Resist - 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-PB96","featured_media":{"alt":null,"id":23877212930147,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3ad65e536821c2624afc82916bf355b539ce48dc_5221abba-9735-48c9-adbf-4209cffd482c.webp?v=1714721276"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a66e61a4b5b79c428708419f6477f0e381c803a_8da3b84c-5437-4ee5-a131-f63a191a8729.webp?v=1714721259","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a9bb1734a958139f1b6c4faa8a9e5b24ed461d6_8c120ecd-51db-49e0-88ad-66e56e89a6e0.webp?v=1714721261","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4ba98e3b2e29f2a44857e5ac9486c3d9aa089d07_16858684-b134-4e69-8275-21b50c04a160.webp?v=1714721264","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9cb499087981e5a2c195152deac5a9abf7975730_a8462328-2769-4319-8885-9d9756de3901.webp?v=1714721266","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80a0d5941fd96e89313d4f412f0a3ff51c10a46a_e7ddae21-fb1c-46cb-953e-5e7a308a4fc3.webp?v=1714721269","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e2ff899851acb564a197c4d9c959725ff3f3db07_cfb0ce0b-c177-4869-a520-a72a20a117b7.webp?v=1714721271","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/027ca4acab576c069132d9c36d7c2ddc95459b42_4464ead7-9c2d-4845-a863-d4cf710807ad.webp?v=1714721273","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3ad65e536821c2624afc82916bf355b539ce48dc_5221abba-9735-48c9-adbf-4209cffd482c.webp?v=1714721276","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6934a05597ab61654f8c8854f7fd399f4fba82c7_11097dc4-5a48-4591-a231-b7f11e2e4f38.webp?v=1714721278","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a6d10fc484428f98647781fc6da397e34568c870_4a21d577-ab69-472b-86b8-659901937e96.webp?v=1714721280"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a66e61a4b5b79c428708419f6477f0e381c803a_8da3b84c-5437-4ee5-a131-f63a191a8729.webp?v=1714721259","options":["color"],"media":[{"alt":null,"id":23877209718883,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a66e61a4b5b79c428708419f6477f0e381c803a_8da3b84c-5437-4ee5-a131-f63a191a8729.webp?v=1714721259"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a66e61a4b5b79c428708419f6477f0e381c803a_8da3b84c-5437-4ee5-a131-f63a191a8729.webp?v=1714721259","width":2000},{"alt":null,"id":23877210112099,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a9bb1734a958139f1b6c4faa8a9e5b24ed461d6_8c120ecd-51db-49e0-88ad-66e56e89a6e0.webp?v=1714721261"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a9bb1734a958139f1b6c4faa8a9e5b24ed461d6_8c120ecd-51db-49e0-88ad-66e56e89a6e0.webp?v=1714721261","width":2000},{"alt":null,"id":23877210570851,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4ba98e3b2e29f2a44857e5ac9486c3d9aa089d07_16858684-b134-4e69-8275-21b50c04a160.webp?v=1714721264"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4ba98e3b2e29f2a44857e5ac9486c3d9aa089d07_16858684-b134-4e69-8275-21b50c04a160.webp?v=1714721264","width":2000},{"alt":null,"id":23877210931299,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9cb499087981e5a2c195152deac5a9abf7975730_a8462328-2769-4319-8885-9d9756de3901.webp?v=1714721266"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9cb499087981e5a2c195152deac5a9abf7975730_a8462328-2769-4319-8885-9d9756de3901.webp?v=1714721266","width":2000},{"alt":null,"id":23877211390051,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80a0d5941fd96e89313d4f412f0a3ff51c10a46a_e7ddae21-fb1c-46cb-953e-5e7a308a4fc3.webp?v=1714721269"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80a0d5941fd96e89313d4f412f0a3ff51c10a46a_e7ddae21-fb1c-46cb-953e-5e7a308a4fc3.webp?v=1714721269","width":2000},{"alt":null,"id":23877211979875,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e2ff899851acb564a197c4d9c959725ff3f3db07_cfb0ce0b-c177-4869-a520-a72a20a117b7.webp?v=1714721271"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e2ff899851acb564a197c4d9c959725ff3f3db07_cfb0ce0b-c177-4869-a520-a72a20a117b7.webp?v=1714721271","width":2000},{"alt":null,"id":23877212536931,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/027ca4acab576c069132d9c36d7c2ddc95459b42_4464ead7-9c2d-4845-a863-d4cf710807ad.webp?v=1714721273"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/027ca4acab576c069132d9c36d7c2ddc95459b42_4464ead7-9c2d-4845-a863-d4cf710807ad.webp?v=1714721273","width":2000},{"alt":null,"id":23877212930147,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3ad65e536821c2624afc82916bf355b539ce48dc_5221abba-9735-48c9-adbf-4209cffd482c.webp?v=1714721276"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3ad65e536821c2624afc82916bf355b539ce48dc_5221abba-9735-48c9-adbf-4209cffd482c.webp?v=1714721276","width":2000},{"alt":null,"id":23877213290595,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6934a05597ab61654f8c8854f7fd399f4fba82c7_11097dc4-5a48-4591-a231-b7f11e2e4f38.webp?v=1714721278"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6934a05597ab61654f8c8854f7fd399f4fba82c7_11097dc4-5a48-4591-a231-b7f11e2e4f38.webp?v=1714721278","width":2000},{"alt":null,"id":23877213782115,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a6d10fc484428f98647781fc6da397e34568c870_4a21d577-ab69-472b-86b8-659901937e96.webp?v=1714721280"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a6d10fc484428f98647781fc6da397e34568c870_4a21d577-ab69-472b-86b8-659901937e96.webp?v=1714721280","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41885544218723,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB96","requires_shipping":true,"taxable":true,"featured_image":{"id":31472296591459,"product_id":7408444211299,"position":8,"created_at":"2024-05-03T15:27:56+08:00","updated_at":"2024-05-03T15:27:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3ad65e536821c2624afc82916bf355b539ce48dc_5221abba-9735-48c9-adbf-4209cffd482c.webp?v=1714721276","variant_ids":[41885544218723]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士-Useless to Resist - 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-PB96","featured_media":{"alt":null,"id":23877212930147,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3ad65e536821c2624afc82916bf355b539ce48dc_5221abba-9735-48c9-adbf-4209cffd482c.webp?v=1714721276"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41885544218723,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB96","requires_shipping":true,"taxable":true,"featured_image":{"id":31472296591459,"product_id":7408444211299,"position":8,"created_at":"2024-05-03T15:27:56+08:00","updated_at":"2024-05-03T15:27:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3ad65e536821c2624afc82916bf355b539ce48dc_5221abba-9735-48c9-adbf-4209cffd482c.webp?v=1714721276","variant_ids":[41885544218723]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士-Useless to Resist - 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-PB96","featured_media":{"alt":null,"id":23877212930147,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3ad65e536821c2624afc82916bf355b539ce48dc_5221abba-9735-48c9-adbf-4209cffd482c.webp?v=1714721276"}},"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: "停產"
}