$product = {"id":7408537895011,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - JEDI ORDER 原力-潮流系列","handle":"iphone-12-mini-mod-nx-printable-pb48","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 mini","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":41886623498339,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB48","requires_shipping":true,"taxable":true,"featured_image":{"id":31472534323299,"product_id":7408537895011,"position":10,"created_at":"2024-05-03T15:46:29+08:00","updated_at":"2024-05-03T15:46:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b259ce4cef3fcfbf6e552a9725c19633d7efc409_6c354560-e139-4c36-8ac7-af6f87a1d680.webp?v=1714722389","variant_ids":[41886623498339]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - JEDI ORDER 原力-潮流系列 - 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":"NPB0118424-PB48","featured_media":{"alt":null,"id":23877451579491,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b259ce4cef3fcfbf6e552a9725c19633d7efc409_6c354560-e139-4c36-8ac7-af6f87a1d680.webp?v=1714722389"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a40a5337b13a46069e9ac64fe034edbf715d24ba_0351aff0-d915-4237-a970-59b5c79e06f8.webp?v=1714722368","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2f12a061d6dc6c2a8f7514df1afd53115af01f3_4a9c4a86-f50d-406d-bb61-92ac6541dd7e.webp?v=1714722370","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b234769904e6b24ce11fe8345687421869b4df88_0c9b0f16-b72d-49f5-929c-92cb7e90c411.webp?v=1714722372","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/671d15caa6350703a070915e9697163185dd4912_901335ad-97d9-4abe-987d-5f9f1154df16.webp?v=1714722375","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f4ae044c229ceb5c09794badf374125ae92450f_fbce63b6-0db7-42ec-afad-9c6b6f076fd1.webp?v=1714722377","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f24b065686f2d5311ea53d057c82301e9a42ddfd_ddd7b110-44c3-4fb4-9560-e229eac86a8d.webp?v=1714722379","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f7b394b481bb8db89767d6ef28d403a09961b327_addb4905-ad1e-489f-9d9e-9fdd4e36e350.webp?v=1714722382","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/369a7ba4352dc52582673c0a506aa83118019dc2_36d7ca16-f85f-43b5-b321-4f7125744235.webp?v=1714722384","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02cd1c9c26e373305be20fadf4fe717093c6b620_2aca1ea4-10d1-4fa1-a7ef-10eb848e3f18.webp?v=1714722387","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b259ce4cef3fcfbf6e552a9725c19633d7efc409_6c354560-e139-4c36-8ac7-af6f87a1d680.webp?v=1714722389","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88c6544e07bc4e4c5808f923cee7ccc7f397fa82_8ce3bd17-bab6-403f-8f01-383c8e288e07.webp?v=1714722392"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a40a5337b13a46069e9ac64fe034edbf715d24ba_0351aff0-d915-4237-a970-59b5c79e06f8.webp?v=1714722368","options":["color"],"media":[{"alt":null,"id":23877446926435,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a40a5337b13a46069e9ac64fe034edbf715d24ba_0351aff0-d915-4237-a970-59b5c79e06f8.webp?v=1714722368"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a40a5337b13a46069e9ac64fe034edbf715d24ba_0351aff0-d915-4237-a970-59b5c79e06f8.webp?v=1714722368","width":2000},{"alt":null,"id":23877447417955,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2f12a061d6dc6c2a8f7514df1afd53115af01f3_4a9c4a86-f50d-406d-bb61-92ac6541dd7e.webp?v=1714722370"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2f12a061d6dc6c2a8f7514df1afd53115af01f3_4a9c4a86-f50d-406d-bb61-92ac6541dd7e.webp?v=1714722370","width":2000},{"alt":null,"id":23877448204387,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b234769904e6b24ce11fe8345687421869b4df88_0c9b0f16-b72d-49f5-929c-92cb7e90c411.webp?v=1714722372"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b234769904e6b24ce11fe8345687421869b4df88_0c9b0f16-b72d-49f5-929c-92cb7e90c411.webp?v=1714722372","width":2000},{"alt":null,"id":23877448695907,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/671d15caa6350703a070915e9697163185dd4912_901335ad-97d9-4abe-987d-5f9f1154df16.webp?v=1714722375"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/671d15caa6350703a070915e9697163185dd4912_901335ad-97d9-4abe-987d-5f9f1154df16.webp?v=1714722375","width":2000},{"alt":null,"id":23877449285731,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f4ae044c229ceb5c09794badf374125ae92450f_fbce63b6-0db7-42ec-afad-9c6b6f076fd1.webp?v=1714722377"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f4ae044c229ceb5c09794badf374125ae92450f_fbce63b6-0db7-42ec-afad-9c6b6f076fd1.webp?v=1714722377","width":2000},{"alt":null,"id":23877449711715,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f24b065686f2d5311ea53d057c82301e9a42ddfd_ddd7b110-44c3-4fb4-9560-e229eac86a8d.webp?v=1714722379"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f24b065686f2d5311ea53d057c82301e9a42ddfd_ddd7b110-44c3-4fb4-9560-e229eac86a8d.webp?v=1714722379","width":2000},{"alt":null,"id":23877450236003,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f7b394b481bb8db89767d6ef28d403a09961b327_addb4905-ad1e-489f-9d9e-9fdd4e36e350.webp?v=1714722382"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f7b394b481bb8db89767d6ef28d403a09961b327_addb4905-ad1e-489f-9d9e-9fdd4e36e350.webp?v=1714722382","width":2000},{"alt":null,"id":23877450629219,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/369a7ba4352dc52582673c0a506aa83118019dc2_36d7ca16-f85f-43b5-b321-4f7125744235.webp?v=1714722384"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/369a7ba4352dc52582673c0a506aa83118019dc2_36d7ca16-f85f-43b5-b321-4f7125744235.webp?v=1714722384","width":2000},{"alt":null,"id":23877451251811,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02cd1c9c26e373305be20fadf4fe717093c6b620_2aca1ea4-10d1-4fa1-a7ef-10eb848e3f18.webp?v=1714722387"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02cd1c9c26e373305be20fadf4fe717093c6b620_2aca1ea4-10d1-4fa1-a7ef-10eb848e3f18.webp?v=1714722387","width":2000},{"alt":null,"id":23877451579491,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b259ce4cef3fcfbf6e552a9725c19633d7efc409_6c354560-e139-4c36-8ac7-af6f87a1d680.webp?v=1714722389"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b259ce4cef3fcfbf6e552a9725c19633d7efc409_6c354560-e139-4c36-8ac7-af6f87a1d680.webp?v=1714722389","width":2000},{"alt":null,"id":23877452234851,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88c6544e07bc4e4c5808f923cee7ccc7f397fa82_8ce3bd17-bab6-403f-8f01-383c8e288e07.webp?v=1714722392"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88c6544e07bc4e4c5808f923cee7ccc7f397fa82_8ce3bd17-bab6-403f-8f01-383c8e288e07.webp?v=1714722392","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41886623498339,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB48","requires_shipping":true,"taxable":true,"featured_image":{"id":31472534323299,"product_id":7408537895011,"position":10,"created_at":"2024-05-03T15:46:29+08:00","updated_at":"2024-05-03T15:46:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b259ce4cef3fcfbf6e552a9725c19633d7efc409_6c354560-e139-4c36-8ac7-af6f87a1d680.webp?v=1714722389","variant_ids":[41886623498339]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - JEDI ORDER 原力-潮流系列 - 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":"NPB0118424-PB48","featured_media":{"alt":null,"id":23877451579491,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b259ce4cef3fcfbf6e552a9725c19633d7efc409_6c354560-e139-4c36-8ac7-af6f87a1d680.webp?v=1714722389"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41886623498339,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB48","requires_shipping":true,"taxable":true,"featured_image":{"id":31472534323299,"product_id":7408537895011,"position":10,"created_at":"2024-05-03T15:46:29+08:00","updated_at":"2024-05-03T15:46:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b259ce4cef3fcfbf6e552a9725c19633d7efc409_6c354560-e139-4c36-8ac7-af6f87a1d680.webp?v=1714722389","variant_ids":[41886623498339]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - JEDI ORDER 原力-潮流系列 - 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":"NPB0118424-PB48","featured_media":{"alt":null,"id":23877451579491,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b259ce4cef3fcfbf6e552a9725c19633d7efc409_6c354560-e139-4c36-8ac7-af6f87a1d680.webp?v=1714722389"}},"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: "停產"
}