$product = {"id":7408411115619,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵-黑白條紋","handle":"iphone-12-pro-max-mod-nx-printable-pb19","description":null,"published_at":"2024-06-11T16:36:29+08:00","created_at":"2024-05-03T15:21:10+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":41885173940323,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB19","requires_shipping":true,"taxable":true,"featured_image":{"id":31472200417379,"product_id":7408411115619,"position":6,"created_at":"2024-05-03T15:21:25+08:00","updated_at":"2024-05-03T15:21:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b94433ad3b9338103f8279c8e36ffc672b38874_4f8613e4-6c82-4c75-93bd-58cea2da7897.webp?v=1714720885","variant_ids":[41885173940323]},"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-PB19","featured_media":{"alt":null,"id":23877116231779,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b94433ad3b9338103f8279c8e36ffc672b38874_4f8613e4-6c82-4c75-93bd-58cea2da7897.webp?v=1714720885"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3055c5832b34503dc5ee1a82212fb71d028393c_6a6e36c2-87b8-4b8a-a5f3-769fd72f32ad.webp?v=1714720873","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/16fa27dd98726a72e5b8954fcdbfe6c4e4087dd4_988d5460-5647-4289-9cd1-7a82c61680f8.webp?v=1714720875","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e0143e5706335935d3d3aa1dbc431b7889fe7b2_5c11a7e6-6e13-4682-b932-411ec72c68e9.webp?v=1714720878","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36bbbdbf88a46e328cdc0b29f573b1440c1819ca_5664b6f4-c8e4-47fc-8c5e-a961a86dfad5.webp?v=1714720880","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b96b8592079ec77ceb5948f9b999908452d3817_9413341a-04f8-43d3-9ca1-c7818959c0c0.webp?v=1714720882","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b94433ad3b9338103f8279c8e36ffc672b38874_4f8613e4-6c82-4c75-93bd-58cea2da7897.webp?v=1714720885","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fbac86cda5fbab8cdce97c5c3888b48b78b1930e_dbae95b8-d98f-4c76-aeff-430c76154632.webp?v=1714720887","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c706b124d9ba28e0f71704b4b5afcfdaeb40c95c_1fc85182-6ab2-4bc5-b968-d8f276bc51fb.webp?v=1714720889","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da0a5bf43a971b896f819e9bc57e00b245af1dc5_c144406c-70e9-4632-91c5-129a3e85e691.webp?v=1714720892","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4976fc03bca4e2296e59a5d7b8868634225418dd_d7f7952e-6494-4798-98d4-c24bf727a32d.webp?v=1714720894"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3055c5832b34503dc5ee1a82212fb71d028393c_6a6e36c2-87b8-4b8a-a5f3-769fd72f32ad.webp?v=1714720873","options":["color"],"media":[{"alt":null,"id":23877113643107,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3055c5832b34503dc5ee1a82212fb71d028393c_6a6e36c2-87b8-4b8a-a5f3-769fd72f32ad.webp?v=1714720873"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3055c5832b34503dc5ee1a82212fb71d028393c_6a6e36c2-87b8-4b8a-a5f3-769fd72f32ad.webp?v=1714720873","width":2000},{"alt":null,"id":23877114298467,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/16fa27dd98726a72e5b8954fcdbfe6c4e4087dd4_988d5460-5647-4289-9cd1-7a82c61680f8.webp?v=1714720875"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/16fa27dd98726a72e5b8954fcdbfe6c4e4087dd4_988d5460-5647-4289-9cd1-7a82c61680f8.webp?v=1714720875","width":2000},{"alt":null,"id":23877114691683,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e0143e5706335935d3d3aa1dbc431b7889fe7b2_5c11a7e6-6e13-4682-b932-411ec72c68e9.webp?v=1714720878"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e0143e5706335935d3d3aa1dbc431b7889fe7b2_5c11a7e6-6e13-4682-b932-411ec72c68e9.webp?v=1714720878","width":2000},{"alt":null,"id":23877115281507,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36bbbdbf88a46e328cdc0b29f573b1440c1819ca_5664b6f4-c8e4-47fc-8c5e-a961a86dfad5.webp?v=1714720880"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36bbbdbf88a46e328cdc0b29f573b1440c1819ca_5664b6f4-c8e4-47fc-8c5e-a961a86dfad5.webp?v=1714720880","width":2000},{"alt":null,"id":23877115707491,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b96b8592079ec77ceb5948f9b999908452d3817_9413341a-04f8-43d3-9ca1-c7818959c0c0.webp?v=1714720882"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b96b8592079ec77ceb5948f9b999908452d3817_9413341a-04f8-43d3-9ca1-c7818959c0c0.webp?v=1714720882","width":2000},{"alt":null,"id":23877116231779,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b94433ad3b9338103f8279c8e36ffc672b38874_4f8613e4-6c82-4c75-93bd-58cea2da7897.webp?v=1714720885"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b94433ad3b9338103f8279c8e36ffc672b38874_4f8613e4-6c82-4c75-93bd-58cea2da7897.webp?v=1714720885","width":2000},{"alt":null,"id":23877116723299,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fbac86cda5fbab8cdce97c5c3888b48b78b1930e_dbae95b8-d98f-4c76-aeff-430c76154632.webp?v=1714720887"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fbac86cda5fbab8cdce97c5c3888b48b78b1930e_dbae95b8-d98f-4c76-aeff-430c76154632.webp?v=1714720887","width":2000},{"alt":null,"id":23877117149283,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c706b124d9ba28e0f71704b4b5afcfdaeb40c95c_1fc85182-6ab2-4bc5-b968-d8f276bc51fb.webp?v=1714720889"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c706b124d9ba28e0f71704b4b5afcfdaeb40c95c_1fc85182-6ab2-4bc5-b968-d8f276bc51fb.webp?v=1714720889","width":2000},{"alt":null,"id":23877117608035,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da0a5bf43a971b896f819e9bc57e00b245af1dc5_c144406c-70e9-4632-91c5-129a3e85e691.webp?v=1714720892"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da0a5bf43a971b896f819e9bc57e00b245af1dc5_c144406c-70e9-4632-91c5-129a3e85e691.webp?v=1714720892","width":2000},{"alt":null,"id":23877118001251,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4976fc03bca4e2296e59a5d7b8868634225418dd_d7f7952e-6494-4798-98d4-c24bf727a32d.webp?v=1714720894"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4976fc03bca4e2296e59a5d7b8868634225418dd_d7f7952e-6494-4798-98d4-c24bf727a32d.webp?v=1714720894","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41885173940323,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB19","requires_shipping":true,"taxable":true,"featured_image":{"id":31472200417379,"product_id":7408411115619,"position":6,"created_at":"2024-05-03T15:21:25+08:00","updated_at":"2024-05-03T15:21:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b94433ad3b9338103f8279c8e36ffc672b38874_4f8613e4-6c82-4c75-93bd-58cea2da7897.webp?v=1714720885","variant_ids":[41885173940323]},"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-PB19","featured_media":{"alt":null,"id":23877116231779,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b94433ad3b9338103f8279c8e36ffc672b38874_4f8613e4-6c82-4c75-93bd-58cea2da7897.webp?v=1714720885"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41885173940323,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB19","requires_shipping":true,"taxable":true,"featured_image":{"id":31472200417379,"product_id":7408411115619,"position":6,"created_at":"2024-05-03T15:21:25+08:00","updated_at":"2024-05-03T15:21:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b94433ad3b9338103f8279c8e36ffc672b38874_4f8613e4-6c82-4c75-93bd-58cea2da7897.webp?v=1714720885","variant_ids":[41885173940323]},"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-PB19","featured_media":{"alt":null,"id":23877116231779,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b94433ad3b9338103f8279c8e36ffc672b38874_4f8613e4-6c82-4c75-93bd-58cea2da7897.webp?v=1714720885"}},"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: "停產"
}