$product = {"id":7408537862243,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Pattern 伊沃克人-Galaxy","handle":"iphone-12-pro-max-mod-nx-printable-pb60","description":null,"published_at":"2024-06-11T16:40:03+08:00","created_at":"2024-05-03T15:46: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":41886620090467,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB60","requires_shipping":true,"taxable":true,"featured_image":{"id":31472533307491,"product_id":7408537862243,"position":8,"created_at":"2024-05-03T15:46:24+08:00","updated_at":"2024-05-03T15:46:24+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bcd9dbb1a3ef4592191d2e9134f947d1ec7f9805_e9cd72b9-a592-44db-ae8d-daf9585e4c10.webp?v=1714722384","variant_ids":[41886620090467]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Pattern 伊沃克人-Galaxy - 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-PB60","featured_media":{"alt":null,"id":23877450563683,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bcd9dbb1a3ef4592191d2e9134f947d1ec7f9805_e9cd72b9-a592-44db-ae8d-daf9585e4c10.webp?v=1714722384"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09d3a6751dadea17d00a5c1012422e3f18a5bc1f_2bda6110-7de3-4ab2-aa27-d0ee8cec9928.webp?v=1714722367","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2316bfb82deafd7e8aece1359f18f5e9de44cf8e_7230c1ae-5c16-4166-b2f7-9dfe7a2e5230.webp?v=1714722370","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2cc09547f9e1c7d91cda18ac8d652c93793b685_8983d6cb-704e-4d79-b022-8064da42e07d.webp?v=1714722372","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b41ad539235fae79d09586785c3f091ee081d1ee_5cdb69bd-b1c4-4526-a752-da343a381fd4.webp?v=1714722374","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5a57a9cf71255b98669c37ad398d26efb192ce0_9ee91def-5f04-4bde-90a3-c3c6b2d82cbf.webp?v=1714722377","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ecd188a7e371c22877f81a11100654971feb115b_bf1c7174-ef71-4af3-b92e-ef765aaba3dd.webp?v=1714722379","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52ca754fe522b84e55a6a78ab13cb8dc7d6ae86c_86501edf-0f43-4f0a-ba6f-f6e09e75708e.webp?v=1714722382","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bcd9dbb1a3ef4592191d2e9134f947d1ec7f9805_e9cd72b9-a592-44db-ae8d-daf9585e4c10.webp?v=1714722384","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcb40073d63019f0be6782fa8cd364bb8a67fb74_de9f9c6f-e4a4-4921-b3d2-261e9cf5775c.webp?v=1714722386","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/904797ff008e128f2f7efa4d23c46039f803ca16_a14ac2d3-9390-418c-8ba0-f321eecaad50.webp?v=1714722389"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09d3a6751dadea17d00a5c1012422e3f18a5bc1f_2bda6110-7de3-4ab2-aa27-d0ee8cec9928.webp?v=1714722367","options":["color"],"media":[{"alt":null,"id":23877446795363,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09d3a6751dadea17d00a5c1012422e3f18a5bc1f_2bda6110-7de3-4ab2-aa27-d0ee8cec9928.webp?v=1714722367"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09d3a6751dadea17d00a5c1012422e3f18a5bc1f_2bda6110-7de3-4ab2-aa27-d0ee8cec9928.webp?v=1714722367","width":2000},{"alt":null,"id":23877447319651,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2316bfb82deafd7e8aece1359f18f5e9de44cf8e_7230c1ae-5c16-4166-b2f7-9dfe7a2e5230.webp?v=1714722370"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2316bfb82deafd7e8aece1359f18f5e9de44cf8e_7230c1ae-5c16-4166-b2f7-9dfe7a2e5230.webp?v=1714722370","width":2000},{"alt":null,"id":23877448106083,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2cc09547f9e1c7d91cda18ac8d652c93793b685_8983d6cb-704e-4d79-b022-8064da42e07d.webp?v=1714722372"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2cc09547f9e1c7d91cda18ac8d652c93793b685_8983d6cb-704e-4d79-b022-8064da42e07d.webp?v=1714722372","width":2000},{"alt":null,"id":23877448564835,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b41ad539235fae79d09586785c3f091ee081d1ee_5cdb69bd-b1c4-4526-a752-da343a381fd4.webp?v=1714722374"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b41ad539235fae79d09586785c3f091ee081d1ee_5cdb69bd-b1c4-4526-a752-da343a381fd4.webp?v=1714722374","width":2000},{"alt":null,"id":23877449187427,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5a57a9cf71255b98669c37ad398d26efb192ce0_9ee91def-5f04-4bde-90a3-c3c6b2d82cbf.webp?v=1714722377"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5a57a9cf71255b98669c37ad398d26efb192ce0_9ee91def-5f04-4bde-90a3-c3c6b2d82cbf.webp?v=1714722377","width":2000},{"alt":null,"id":23877449678947,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ecd188a7e371c22877f81a11100654971feb115b_bf1c7174-ef71-4af3-b92e-ef765aaba3dd.webp?v=1714722379"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ecd188a7e371c22877f81a11100654971feb115b_bf1c7174-ef71-4af3-b92e-ef765aaba3dd.webp?v=1714722379","width":2000},{"alt":null,"id":23877450137699,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52ca754fe522b84e55a6a78ab13cb8dc7d6ae86c_86501edf-0f43-4f0a-ba6f-f6e09e75708e.webp?v=1714722382"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52ca754fe522b84e55a6a78ab13cb8dc7d6ae86c_86501edf-0f43-4f0a-ba6f-f6e09e75708e.webp?v=1714722382","width":2000},{"alt":null,"id":23877450563683,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bcd9dbb1a3ef4592191d2e9134f947d1ec7f9805_e9cd72b9-a592-44db-ae8d-daf9585e4c10.webp?v=1714722384"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bcd9dbb1a3ef4592191d2e9134f947d1ec7f9805_e9cd72b9-a592-44db-ae8d-daf9585e4c10.webp?v=1714722384","width":2000},{"alt":null,"id":23877451087971,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcb40073d63019f0be6782fa8cd364bb8a67fb74_de9f9c6f-e4a4-4921-b3d2-261e9cf5775c.webp?v=1714722386"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcb40073d63019f0be6782fa8cd364bb8a67fb74_de9f9c6f-e4a4-4921-b3d2-261e9cf5775c.webp?v=1714722386","width":2000},{"alt":null,"id":23877451481187,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/904797ff008e128f2f7efa4d23c46039f803ca16_a14ac2d3-9390-418c-8ba0-f321eecaad50.webp?v=1714722389"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/904797ff008e128f2f7efa4d23c46039f803ca16_a14ac2d3-9390-418c-8ba0-f321eecaad50.webp?v=1714722389","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41886620090467,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB60","requires_shipping":true,"taxable":true,"featured_image":{"id":31472533307491,"product_id":7408537862243,"position":8,"created_at":"2024-05-03T15:46:24+08:00","updated_at":"2024-05-03T15:46:24+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bcd9dbb1a3ef4592191d2e9134f947d1ec7f9805_e9cd72b9-a592-44db-ae8d-daf9585e4c10.webp?v=1714722384","variant_ids":[41886620090467]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Pattern 伊沃克人-Galaxy - 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-PB60","featured_media":{"alt":null,"id":23877450563683,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bcd9dbb1a3ef4592191d2e9134f947d1ec7f9805_e9cd72b9-a592-44db-ae8d-daf9585e4c10.webp?v=1714722384"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41886620090467,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB60","requires_shipping":true,"taxable":true,"featured_image":{"id":31472533307491,"product_id":7408537862243,"position":8,"created_at":"2024-05-03T15:46:24+08:00","updated_at":"2024-05-03T15:46:24+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bcd9dbb1a3ef4592191d2e9134f947d1ec7f9805_e9cd72b9-a592-44db-ae8d-daf9585e4c10.webp?v=1714722384","variant_ids":[41886620090467]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Pattern 伊沃克人-Galaxy - 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-PB60","featured_media":{"alt":null,"id":23877450563683,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bcd9dbb1a3ef4592191d2e9134f947d1ec7f9805_e9cd72b9-a592-44db-ae8d-daf9585e4c10.webp?v=1714722384"}},"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: "停產"
}