$product = {"id":7408390864995,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 星際大戰四部曲:曙光乍現-電影海報","handle":"iphone-12-pro-max-mod-nx-printable-pb101","description":null,"published_at":"2024-06-11T16:35:56+08:00","created_at":"2024-05-03T15:17:12+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":41884952330339,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB101","requires_shipping":true,"taxable":true,"featured_image":{"id":31472142024803,"product_id":7408390864995,"position":9,"created_at":"2024-05-03T15:17:35+08:00","updated_at":"2024-05-03T15:17:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f13d990b8afc9f7a529415ee4f4ffbafd1de9f83_a082d28a-d958-4e07-880d-bf4fb9a4f525.webp?v=1714720655","variant_ids":[41884952330339]},"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-PB101","featured_media":{"alt":null,"id":23877057609827,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f13d990b8afc9f7a529415ee4f4ffbafd1de9f83_a082d28a-d958-4e07-880d-bf4fb9a4f525.webp?v=1714720655"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f2ff69a6b0c83fce7de265a09b077ac0e233176_d3d90ada-8a4a-45f4-8efa-e8a6998dfd81.webp?v=1714720635","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a099a255d5d2197bde8f27f87301a741a32b2215_b34c995a-6ec9-4d40-af19-70014cfb78fe.webp?v=1714720637","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4951d7147e745e011c2122cca4cca8809a0fc930_c807cc57-e100-4f9b-9c74-4ee872ea99a8.webp?v=1714720640","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a277aab263e818fd7935e9bd3f6c90021c9cd446_bfb5e15f-59fd-4003-badb-80e5cbc21809.webp?v=1714720642","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a6b99936f65866ea8b5a78c1708c2e83cff242e_93b36a5c-ff94-4eb4-bb94-c9bd96f01d98.webp?v=1714720645","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78d9ad54f3dbef2fd4c36c9aa35c151c14e0e38c_0cea4070-6e17-483e-8b67-f51640ef9b2b.webp?v=1714720647","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab9d9bd946bd2e597183c7de7a480c87dc7176f6_5e0d05b7-3f3f-4ce6-9853-44db2f0981e4.webp?v=1714720650","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/463ace5e8b7ece9429e98969088e3df45f442c0e_be0b8e80-2002-42df-b366-45e440decf0e.webp?v=1714720652","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f13d990b8afc9f7a529415ee4f4ffbafd1de9f83_a082d28a-d958-4e07-880d-bf4fb9a4f525.webp?v=1714720655","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee6abd2a3af06c1229d04644b7c8a12ebcbdf5d7_c2c79c95-ec3d-488d-aaa5-cb6564ca252a.webp?v=1714720657"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f2ff69a6b0c83fce7de265a09b077ac0e233176_d3d90ada-8a4a-45f4-8efa-e8a6998dfd81.webp?v=1714720635","options":["color"],"media":[{"alt":null,"id":23877053153379,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f2ff69a6b0c83fce7de265a09b077ac0e233176_d3d90ada-8a4a-45f4-8efa-e8a6998dfd81.webp?v=1714720635"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f2ff69a6b0c83fce7de265a09b077ac0e233176_d3d90ada-8a4a-45f4-8efa-e8a6998dfd81.webp?v=1714720635","width":2000},{"alt":null,"id":23877053546595,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a099a255d5d2197bde8f27f87301a741a32b2215_b34c995a-6ec9-4d40-af19-70014cfb78fe.webp?v=1714720637"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a099a255d5d2197bde8f27f87301a741a32b2215_b34c995a-6ec9-4d40-af19-70014cfb78fe.webp?v=1714720637","width":2000},{"alt":null,"id":23877054201955,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4951d7147e745e011c2122cca4cca8809a0fc930_c807cc57-e100-4f9b-9c74-4ee872ea99a8.webp?v=1714720640"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4951d7147e745e011c2122cca4cca8809a0fc930_c807cc57-e100-4f9b-9c74-4ee872ea99a8.webp?v=1714720640","width":2000},{"alt":null,"id":23877054595171,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a277aab263e818fd7935e9bd3f6c90021c9cd446_bfb5e15f-59fd-4003-badb-80e5cbc21809.webp?v=1714720642"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a277aab263e818fd7935e9bd3f6c90021c9cd446_bfb5e15f-59fd-4003-badb-80e5cbc21809.webp?v=1714720642","width":2000},{"alt":null,"id":23877055217763,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a6b99936f65866ea8b5a78c1708c2e83cff242e_93b36a5c-ff94-4eb4-bb94-c9bd96f01d98.webp?v=1714720645"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a6b99936f65866ea8b5a78c1708c2e83cff242e_93b36a5c-ff94-4eb4-bb94-c9bd96f01d98.webp?v=1714720645","width":2000},{"alt":null,"id":23877055643747,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78d9ad54f3dbef2fd4c36c9aa35c151c14e0e38c_0cea4070-6e17-483e-8b67-f51640ef9b2b.webp?v=1714720647"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78d9ad54f3dbef2fd4c36c9aa35c151c14e0e38c_0cea4070-6e17-483e-8b67-f51640ef9b2b.webp?v=1714720647","width":2000},{"alt":null,"id":23877056135267,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab9d9bd946bd2e597183c7de7a480c87dc7176f6_5e0d05b7-3f3f-4ce6-9853-44db2f0981e4.webp?v=1714720650"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab9d9bd946bd2e597183c7de7a480c87dc7176f6_5e0d05b7-3f3f-4ce6-9853-44db2f0981e4.webp?v=1714720650","width":2000},{"alt":null,"id":23877056561251,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/463ace5e8b7ece9429e98969088e3df45f442c0e_be0b8e80-2002-42df-b366-45e440decf0e.webp?v=1714720652"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/463ace5e8b7ece9429e98969088e3df45f442c0e_be0b8e80-2002-42df-b366-45e440decf0e.webp?v=1714720652","width":2000},{"alt":null,"id":23877057609827,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f13d990b8afc9f7a529415ee4f4ffbafd1de9f83_a082d28a-d958-4e07-880d-bf4fb9a4f525.webp?v=1714720655"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f13d990b8afc9f7a529415ee4f4ffbafd1de9f83_a082d28a-d958-4e07-880d-bf4fb9a4f525.webp?v=1714720655","width":2000},{"alt":null,"id":23877058101347,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee6abd2a3af06c1229d04644b7c8a12ebcbdf5d7_c2c79c95-ec3d-488d-aaa5-cb6564ca252a.webp?v=1714720657"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee6abd2a3af06c1229d04644b7c8a12ebcbdf5d7_c2c79c95-ec3d-488d-aaa5-cb6564ca252a.webp?v=1714720657","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41884952330339,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB101","requires_shipping":true,"taxable":true,"featured_image":{"id":31472142024803,"product_id":7408390864995,"position":9,"created_at":"2024-05-03T15:17:35+08:00","updated_at":"2024-05-03T15:17:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f13d990b8afc9f7a529415ee4f4ffbafd1de9f83_a082d28a-d958-4e07-880d-bf4fb9a4f525.webp?v=1714720655","variant_ids":[41884952330339]},"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-PB101","featured_media":{"alt":null,"id":23877057609827,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f13d990b8afc9f7a529415ee4f4ffbafd1de9f83_a082d28a-d958-4e07-880d-bf4fb9a4f525.webp?v=1714720655"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41884952330339,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB101","requires_shipping":true,"taxable":true,"featured_image":{"id":31472142024803,"product_id":7408390864995,"position":9,"created_at":"2024-05-03T15:17:35+08:00","updated_at":"2024-05-03T15:17:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f13d990b8afc9f7a529415ee4f4ffbafd1de9f83_a082d28a-d958-4e07-880d-bf4fb9a4f525.webp?v=1714720655","variant_ids":[41884952330339]},"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-PB101","featured_media":{"alt":null,"id":23877057609827,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f13d990b8afc9f7a529415ee4f4ffbafd1de9f83_a082d28a-d958-4e07-880d-bf4fb9a4f525.webp?v=1714720655"}},"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: "停產"
}