$product = {"id":7408453615715,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP千年鷹","handle":"iphone-12-pro-max-mod-nx-printable-pb27","description":null,"published_at":"2024-06-11T16:37:39+08:00","created_at":"2024-05-03T15:29:32+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":41885648453731,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB27","requires_shipping":true,"taxable":true,"featured_image":{"id":31472319791203,"product_id":7408453615715,"position":7,"created_at":"2024-05-03T15:29:49+08:00","updated_at":"2024-05-03T15:29:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/599b749cd9f008bc6d50195773a2765a36799418_49576bbf-9056-49e2-a853-6fdac7af4c18.webp?v=1714721389","variant_ids":[41885648453731]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP千年鷹 - 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-PB27","featured_media":{"alt":null,"id":23877236195427,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/599b749cd9f008bc6d50195773a2765a36799418_49576bbf-9056-49e2-a853-6fdac7af4c18.webp?v=1714721389"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b9ff021bb3e4b1e29244271b5aa76c21db984e2_6512195b-bdc7-4210-862a-610784ba00d1.webp?v=1714721375","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b134800b12641355cf4e044295ca3979929fea83_dab77baf-247e-4452-8756-5d6ab61a23d2.webp?v=1714721377","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/195bd862862abb5386ba7f740440d8b265715268_2ec244d5-9062-4997-abc6-a79791b6096f.webp?v=1714721380","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ba1b453c218b5300a270f1415fc5acaca21b0fa_4a529f34-f799-41c4-8d61-7814ab4e209a.webp?v=1714721382","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f0f95c274a900802e1353216ba46e9105d9ff85_65411361-a7f4-47d8-acc5-4c1208107278.webp?v=1714721385","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b732df72be01412f7814cde9b79472a4b8d6e639_df6fbe32-dfd4-4b0b-98b1-49d7520e6551.webp?v=1714721387","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/599b749cd9f008bc6d50195773a2765a36799418_49576bbf-9056-49e2-a853-6fdac7af4c18.webp?v=1714721389","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d2dba0d212f3de04dc1a05fe3f5bb32c6663eee_edf67354-7762-4d8d-a9eb-af9f2e4b990f.webp?v=1714721392","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/97bce28debe07afaa5ab90d712b20e6c20edc387_53d4cebf-878d-4780-8b4d-38e68466a2fe.webp?v=1714721394","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f00cbe3b8c6cdeafcb9edcf9bc717df8eb3e46e5_b38e122b-ffd2-4850-b7b2-d661d76c408e.webp?v=1714721396"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b9ff021bb3e4b1e29244271b5aa76c21db984e2_6512195b-bdc7-4210-862a-610784ba00d1.webp?v=1714721375","options":["color"],"media":[{"alt":null,"id":23877232984163,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b9ff021bb3e4b1e29244271b5aa76c21db984e2_6512195b-bdc7-4210-862a-610784ba00d1.webp?v=1714721375"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b9ff021bb3e4b1e29244271b5aa76c21db984e2_6512195b-bdc7-4210-862a-610784ba00d1.webp?v=1714721375","width":2000},{"alt":null,"id":23877233508451,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b134800b12641355cf4e044295ca3979929fea83_dab77baf-247e-4452-8756-5d6ab61a23d2.webp?v=1714721377"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b134800b12641355cf4e044295ca3979929fea83_dab77baf-247e-4452-8756-5d6ab61a23d2.webp?v=1714721377","width":2000},{"alt":null,"id":23877234229347,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/195bd862862abb5386ba7f740440d8b265715268_2ec244d5-9062-4997-abc6-a79791b6096f.webp?v=1714721380"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/195bd862862abb5386ba7f740440d8b265715268_2ec244d5-9062-4997-abc6-a79791b6096f.webp?v=1714721380","width":2000},{"alt":null,"id":23877234753635,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ba1b453c218b5300a270f1415fc5acaca21b0fa_4a529f34-f799-41c4-8d61-7814ab4e209a.webp?v=1714721382"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ba1b453c218b5300a270f1415fc5acaca21b0fa_4a529f34-f799-41c4-8d61-7814ab4e209a.webp?v=1714721382","width":2000},{"alt":null,"id":23877235408995,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f0f95c274a900802e1353216ba46e9105d9ff85_65411361-a7f4-47d8-acc5-4c1208107278.webp?v=1714721385"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f0f95c274a900802e1353216ba46e9105d9ff85_65411361-a7f4-47d8-acc5-4c1208107278.webp?v=1714721385","width":2000},{"alt":null,"id":23877235802211,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b732df72be01412f7814cde9b79472a4b8d6e639_df6fbe32-dfd4-4b0b-98b1-49d7520e6551.webp?v=1714721387"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b732df72be01412f7814cde9b79472a4b8d6e639_df6fbe32-dfd4-4b0b-98b1-49d7520e6551.webp?v=1714721387","width":2000},{"alt":null,"id":23877236195427,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/599b749cd9f008bc6d50195773a2765a36799418_49576bbf-9056-49e2-a853-6fdac7af4c18.webp?v=1714721389"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/599b749cd9f008bc6d50195773a2765a36799418_49576bbf-9056-49e2-a853-6fdac7af4c18.webp?v=1714721389","width":2000},{"alt":null,"id":23877236686947,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d2dba0d212f3de04dc1a05fe3f5bb32c6663eee_edf67354-7762-4d8d-a9eb-af9f2e4b990f.webp?v=1714721392"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d2dba0d212f3de04dc1a05fe3f5bb32c6663eee_edf67354-7762-4d8d-a9eb-af9f2e4b990f.webp?v=1714721392","width":2000},{"alt":null,"id":23877237178467,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/97bce28debe07afaa5ab90d712b20e6c20edc387_53d4cebf-878d-4780-8b4d-38e68466a2fe.webp?v=1714721394"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/97bce28debe07afaa5ab90d712b20e6c20edc387_53d4cebf-878d-4780-8b4d-38e68466a2fe.webp?v=1714721394","width":2000},{"alt":null,"id":23877237997667,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f00cbe3b8c6cdeafcb9edcf9bc717df8eb3e46e5_b38e122b-ffd2-4850-b7b2-d661d76c408e.webp?v=1714721396"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f00cbe3b8c6cdeafcb9edcf9bc717df8eb3e46e5_b38e122b-ffd2-4850-b7b2-d661d76c408e.webp?v=1714721396","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41885648453731,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB27","requires_shipping":true,"taxable":true,"featured_image":{"id":31472319791203,"product_id":7408453615715,"position":7,"created_at":"2024-05-03T15:29:49+08:00","updated_at":"2024-05-03T15:29:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/599b749cd9f008bc6d50195773a2765a36799418_49576bbf-9056-49e2-a853-6fdac7af4c18.webp?v=1714721389","variant_ids":[41885648453731]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP千年鷹 - 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-PB27","featured_media":{"alt":null,"id":23877236195427,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/599b749cd9f008bc6d50195773a2765a36799418_49576bbf-9056-49e2-a853-6fdac7af4c18.webp?v=1714721389"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41885648453731,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB27","requires_shipping":true,"taxable":true,"featured_image":{"id":31472319791203,"product_id":7408453615715,"position":7,"created_at":"2024-05-03T15:29:49+08:00","updated_at":"2024-05-03T15:29:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/599b749cd9f008bc6d50195773a2765a36799418_49576bbf-9056-49e2-a853-6fdac7af4c18.webp?v=1714721389","variant_ids":[41885648453731]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP千年鷹 - 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-PB27","featured_media":{"alt":null,"id":23877236195427,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/599b749cd9f008bc6d50195773a2765a36799418_49576bbf-9056-49e2-a853-6fdac7af4c18.webp?v=1714721389"}},"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: "停產"
}