$product = {"id":7408421306467,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具3","handle":"iphone-12-pro-max-mod-nx-printable-pb26","description":null,"published_at":"2024-06-11T16:36:46+08:00","created_at":"2024-05-03T15:23:18+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":41885285515363,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB26","requires_shipping":true,"taxable":true,"featured_image":{"id":31472227385443,"product_id":7408421306467,"position":2,"created_at":"2024-05-03T15:23:23+08:00","updated_at":"2024-05-03T15:23:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99eb9fd9f2aaf2ee7341b384c7103f1d4a22eeb3_4604f3a0-1017-44f8-a5fc-30f58bbe8f00.webp?v=1714721003","variant_ids":[41885285515363]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具3 - 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-PB26","featured_media":{"alt":null,"id":23877143232611,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99eb9fd9f2aaf2ee7341b384c7103f1d4a22eeb3_4604f3a0-1017-44f8-a5fc-30f58bbe8f00.webp?v=1714721003"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d2d480d09dfc6783bb1368bfe43b16e32641de96_9f17172e-711d-464b-a84d-ce802734e111.webp?v=1714721000","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99eb9fd9f2aaf2ee7341b384c7103f1d4a22eeb3_4604f3a0-1017-44f8-a5fc-30f58bbe8f00.webp?v=1714721003","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5ba708ea618b3c63062cf5e221ef9b35dafa6f8b_e2bc16a5-1646-4f32-8295-e5e3042105b9.webp?v=1714721005","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/41b99848f6e33a1b2e68313a3a0d2ae0e44e40fc_551c3e25-2c4d-4504-acb9-5b6bde14ecad.webp?v=1714721008","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72330f084a89b9b0510cc97d9a8b3d2a4623857a_7268f95d-4e28-4e48-bc3c-7c0f7cf8e019.webp?v=1714721010","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17e2bc0c54be3d78b4efb8e834bd5eac802154f8_ad16d27c-0db6-4f2c-9b85-822102621a24.webp?v=1714721013","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b55fdfa06b9cd2b60986357465ebb93af6351fc2_60b72f7e-b03f-4cb3-98ad-294ef19b22ea.webp?v=1714721015","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e4d6d45f5c20cc4e1c7da17f54aca291d15caf25_0faa801a-2762-4969-8d51-802e36d85c1a.webp?v=1714721017","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6d227bd31f0ab2733447eb8b9f3117a1dfee100c_bf1bdb6b-2b24-4eb4-a357-5018dc72bef0.webp?v=1714721020","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0bab7f1b16c2e5dfd1eb703bd9d561457bf74a03_e841d79f-6b67-46a9-b299-66c4cad72185.webp?v=1714721023"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d2d480d09dfc6783bb1368bfe43b16e32641de96_9f17172e-711d-464b-a84d-ce802734e111.webp?v=1714721000","options":["color"],"media":[{"alt":null,"id":23877142773859,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d2d480d09dfc6783bb1368bfe43b16e32641de96_9f17172e-711d-464b-a84d-ce802734e111.webp?v=1714721000"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d2d480d09dfc6783bb1368bfe43b16e32641de96_9f17172e-711d-464b-a84d-ce802734e111.webp?v=1714721000","width":2000},{"alt":null,"id":23877143232611,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99eb9fd9f2aaf2ee7341b384c7103f1d4a22eeb3_4604f3a0-1017-44f8-a5fc-30f58bbe8f00.webp?v=1714721003"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99eb9fd9f2aaf2ee7341b384c7103f1d4a22eeb3_4604f3a0-1017-44f8-a5fc-30f58bbe8f00.webp?v=1714721003","width":2000},{"alt":null,"id":23877143789667,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5ba708ea618b3c63062cf5e221ef9b35dafa6f8b_e2bc16a5-1646-4f32-8295-e5e3042105b9.webp?v=1714721005"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5ba708ea618b3c63062cf5e221ef9b35dafa6f8b_e2bc16a5-1646-4f32-8295-e5e3042105b9.webp?v=1714721005","width":2000},{"alt":null,"id":23877144379491,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/41b99848f6e33a1b2e68313a3a0d2ae0e44e40fc_551c3e25-2c4d-4504-acb9-5b6bde14ecad.webp?v=1714721008"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/41b99848f6e33a1b2e68313a3a0d2ae0e44e40fc_551c3e25-2c4d-4504-acb9-5b6bde14ecad.webp?v=1714721008","width":2000},{"alt":null,"id":23877145296995,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72330f084a89b9b0510cc97d9a8b3d2a4623857a_7268f95d-4e28-4e48-bc3c-7c0f7cf8e019.webp?v=1714721010"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72330f084a89b9b0510cc97d9a8b3d2a4623857a_7268f95d-4e28-4e48-bc3c-7c0f7cf8e019.webp?v=1714721010","width":2000},{"alt":null,"id":23877146411107,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17e2bc0c54be3d78b4efb8e834bd5eac802154f8_ad16d27c-0db6-4f2c-9b85-822102621a24.webp?v=1714721013"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17e2bc0c54be3d78b4efb8e834bd5eac802154f8_ad16d27c-0db6-4f2c-9b85-822102621a24.webp?v=1714721013","width":2000},{"alt":null,"id":23877147754595,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b55fdfa06b9cd2b60986357465ebb93af6351fc2_60b72f7e-b03f-4cb3-98ad-294ef19b22ea.webp?v=1714721015"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b55fdfa06b9cd2b60986357465ebb93af6351fc2_60b72f7e-b03f-4cb3-98ad-294ef19b22ea.webp?v=1714721015","width":2000},{"alt":null,"id":23877148311651,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e4d6d45f5c20cc4e1c7da17f54aca291d15caf25_0faa801a-2762-4969-8d51-802e36d85c1a.webp?v=1714721017"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e4d6d45f5c20cc4e1c7da17f54aca291d15caf25_0faa801a-2762-4969-8d51-802e36d85c1a.webp?v=1714721017","width":2000},{"alt":null,"id":23877148835939,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6d227bd31f0ab2733447eb8b9f3117a1dfee100c_bf1bdb6b-2b24-4eb4-a357-5018dc72bef0.webp?v=1714721020"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6d227bd31f0ab2733447eb8b9f3117a1dfee100c_bf1bdb6b-2b24-4eb4-a357-5018dc72bef0.webp?v=1714721020","width":2000},{"alt":null,"id":23877149392995,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0bab7f1b16c2e5dfd1eb703bd9d561457bf74a03_e841d79f-6b67-46a9-b299-66c4cad72185.webp?v=1714721023"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0bab7f1b16c2e5dfd1eb703bd9d561457bf74a03_e841d79f-6b67-46a9-b299-66c4cad72185.webp?v=1714721023","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41885285515363,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB26","requires_shipping":true,"taxable":true,"featured_image":{"id":31472227385443,"product_id":7408421306467,"position":2,"created_at":"2024-05-03T15:23:23+08:00","updated_at":"2024-05-03T15:23:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99eb9fd9f2aaf2ee7341b384c7103f1d4a22eeb3_4604f3a0-1017-44f8-a5fc-30f58bbe8f00.webp?v=1714721003","variant_ids":[41885285515363]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具3 - 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-PB26","featured_media":{"alt":null,"id":23877143232611,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99eb9fd9f2aaf2ee7341b384c7103f1d4a22eeb3_4604f3a0-1017-44f8-a5fc-30f58bbe8f00.webp?v=1714721003"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41885285515363,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB26","requires_shipping":true,"taxable":true,"featured_image":{"id":31472227385443,"product_id":7408421306467,"position":2,"created_at":"2024-05-03T15:23:23+08:00","updated_at":"2024-05-03T15:23:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99eb9fd9f2aaf2ee7341b384c7103f1d4a22eeb3_4604f3a0-1017-44f8-a5fc-30f58bbe8f00.webp?v=1714721003","variant_ids":[41885285515363]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具3 - 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-PB26","featured_media":{"alt":null,"id":23877143232611,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99eb9fd9f2aaf2ee7341b384c7103f1d4a22eeb3_4604f3a0-1017-44f8-a5fc-30f58bbe8f00.webp?v=1714721003"}},"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: "停產"
}