$product = {"id":7408445390947,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【獨家設計款】 - 願傷疤開花(恆春)","handle":"iphone-12-pro-max-mod-nx-printable-ae01","description":null,"published_at":"2024-06-11T16:37:25+08:00","created_at":"2024-05-03T15:27:49+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"MOD NX 客製化","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","device-iPhone 12 pro max","discountable-item","member","merge","mod-nx-printable","new-modnx-sku","reseller","reseller-modnx-chi-po-lin-series","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":41885555425379,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-AE01","requires_shipping":true,"taxable":true,"featured_image":{"id":31472300523619,"product_id":7408445390947,"position":10,"created_at":"2024-05-03T15:28:15+08:00","updated_at":"2024-05-03T15:28:15+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab83d0dce3ead853bda854d62d082cb3ce80ffd1_1ea7e283-a420-4b9a-8bf8-c1f912587457.webp?v=1714721295","variant_ids":[41885555425379]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【獨家設計款】 - 願傷疤開花(恆春) - 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-AE01","featured_media":{"alt":null,"id":23877216895075,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab83d0dce3ead853bda854d62d082cb3ce80ffd1_1ea7e283-a420-4b9a-8bf8-c1f912587457.webp?v=1714721295"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a5d239d54405893d573ca20028417e1f81d3082_faed689d-f258-4a99-ba62-9e9f29cbf580.webp?v=1714721272","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/943fe3f01ceb333eeb95999bdde06808942cff12_79c262e3-03c7-479c-bb45-25c76d5187be.webp?v=1714721275","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e4e2b4b5eccb814252b192ba16258e51263817af_aa52d4b1-5561-4a93-90e2-039567f6c54e.webp?v=1714721277","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/33714d499ddb7fca6db9c68540789f912dafc1e8_035b6fb8-72e7-4cb4-9328-607f02470fc2.webp?v=1714721280","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ff9591d7523815ecee1e9029eb1266dab348ee8_383d0253-50ee-4260-a094-fde464594955.webp?v=1714721282","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58b2d7338b7172e51a4cb6eb9a0db3a0678896ae_a720f653-4c76-4d93-89ea-2fcac9536f00.webp?v=1714721285","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86e7bd056930f7e86709f120619d96c9b72812dd_b0537eb3-3ca5-4f4c-84d2-0eb6ea897123.webp?v=1714721287","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5970fd5cd81a4d788ef0c19ff5355d59259b6615_8b1649ab-5732-4b44-8337-dd8ec0ccd18d.webp?v=1714721289","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7360664f4a17be45366fb285fe741d074e72b23d_3d6bab37-ef2d-4dec-9857-2f4abea31c5d.webp?v=1714721292","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab83d0dce3ead853bda854d62d082cb3ce80ffd1_1ea7e283-a420-4b9a-8bf8-c1f912587457.webp?v=1714721295"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a5d239d54405893d573ca20028417e1f81d3082_faed689d-f258-4a99-ba62-9e9f29cbf580.webp?v=1714721272","options":["color"],"media":[{"alt":null,"id":23877212274787,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a5d239d54405893d573ca20028417e1f81d3082_faed689d-f258-4a99-ba62-9e9f29cbf580.webp?v=1714721272"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a5d239d54405893d573ca20028417e1f81d3082_faed689d-f258-4a99-ba62-9e9f29cbf580.webp?v=1714721272","width":2000},{"alt":null,"id":23877212733539,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/943fe3f01ceb333eeb95999bdde06808942cff12_79c262e3-03c7-479c-bb45-25c76d5187be.webp?v=1714721275"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/943fe3f01ceb333eeb95999bdde06808942cff12_79c262e3-03c7-479c-bb45-25c76d5187be.webp?v=1714721275","width":2000},{"alt":null,"id":23877213159523,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e4e2b4b5eccb814252b192ba16258e51263817af_aa52d4b1-5561-4a93-90e2-039567f6c54e.webp?v=1714721277"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e4e2b4b5eccb814252b192ba16258e51263817af_aa52d4b1-5561-4a93-90e2-039567f6c54e.webp?v=1714721277","width":2000},{"alt":null,"id":23877213651043,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/33714d499ddb7fca6db9c68540789f912dafc1e8_035b6fb8-72e7-4cb4-9328-607f02470fc2.webp?v=1714721280"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/33714d499ddb7fca6db9c68540789f912dafc1e8_035b6fb8-72e7-4cb4-9328-607f02470fc2.webp?v=1714721280","width":2000},{"alt":null,"id":23877214208099,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ff9591d7523815ecee1e9029eb1266dab348ee8_383d0253-50ee-4260-a094-fde464594955.webp?v=1714721282"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ff9591d7523815ecee1e9029eb1266dab348ee8_383d0253-50ee-4260-a094-fde464594955.webp?v=1714721282","width":2000},{"alt":null,"id":23877214732387,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58b2d7338b7172e51a4cb6eb9a0db3a0678896ae_a720f653-4c76-4d93-89ea-2fcac9536f00.webp?v=1714721285"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58b2d7338b7172e51a4cb6eb9a0db3a0678896ae_a720f653-4c76-4d93-89ea-2fcac9536f00.webp?v=1714721285","width":2000},{"alt":null,"id":23877215354979,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86e7bd056930f7e86709f120619d96c9b72812dd_b0537eb3-3ca5-4f4c-84d2-0eb6ea897123.webp?v=1714721287"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86e7bd056930f7e86709f120619d96c9b72812dd_b0537eb3-3ca5-4f4c-84d2-0eb6ea897123.webp?v=1714721287","width":2000},{"alt":null,"id":23877215813731,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5970fd5cd81a4d788ef0c19ff5355d59259b6615_8b1649ab-5732-4b44-8337-dd8ec0ccd18d.webp?v=1714721289"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5970fd5cd81a4d788ef0c19ff5355d59259b6615_8b1649ab-5732-4b44-8337-dd8ec0ccd18d.webp?v=1714721289","width":2000},{"alt":null,"id":23877216436323,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7360664f4a17be45366fb285fe741d074e72b23d_3d6bab37-ef2d-4dec-9857-2f4abea31c5d.webp?v=1714721292"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7360664f4a17be45366fb285fe741d074e72b23d_3d6bab37-ef2d-4dec-9857-2f4abea31c5d.webp?v=1714721292","width":2000},{"alt":null,"id":23877216895075,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab83d0dce3ead853bda854d62d082cb3ce80ffd1_1ea7e283-a420-4b9a-8bf8-c1f912587457.webp?v=1714721295"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab83d0dce3ead853bda854d62d082cb3ce80ffd1_1ea7e283-a420-4b9a-8bf8-c1f912587457.webp?v=1714721295","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41885555425379,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-AE01","requires_shipping":true,"taxable":true,"featured_image":{"id":31472300523619,"product_id":7408445390947,"position":10,"created_at":"2024-05-03T15:28:15+08:00","updated_at":"2024-05-03T15:28:15+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab83d0dce3ead853bda854d62d082cb3ce80ffd1_1ea7e283-a420-4b9a-8bf8-c1f912587457.webp?v=1714721295","variant_ids":[41885555425379]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【獨家設計款】 - 願傷疤開花(恆春) - 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-AE01","featured_media":{"alt":null,"id":23877216895075,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab83d0dce3ead853bda854d62d082cb3ce80ffd1_1ea7e283-a420-4b9a-8bf8-c1f912587457.webp?v=1714721295"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41885555425379,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-AE01","requires_shipping":true,"taxable":true,"featured_image":{"id":31472300523619,"product_id":7408445390947,"position":10,"created_at":"2024-05-03T15:28:15+08:00","updated_at":"2024-05-03T15:28:15+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab83d0dce3ead853bda854d62d082cb3ce80ffd1_1ea7e283-a420-4b9a-8bf8-c1f912587457.webp?v=1714721295","variant_ids":[41885555425379]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【獨家設計款】 - 願傷疤開花(恆春) - 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-AE01","featured_media":{"alt":null,"id":23877216895075,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab83d0dce3ead853bda854d62d082cb3ce80ffd1_1ea7e283-a420-4b9a-8bf8-c1f912587457.webp?v=1714721295"}},"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: "停產"
}