$product = {"id":7408433397859,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【獨家設計款】 - 願傷疤開花(花蓮)","handle":"iphone-12-pro-max-mod-nx-printable-ae02","description":null,"published_at":"2024-06-11T16:37:06+08:00","created_at":"2024-05-03T15:25:46+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":41885429366883,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-AE02","requires_shipping":true,"taxable":true,"featured_image":{"id":31472265461859,"product_id":7408433397859,"position":2,"created_at":"2024-05-03T15:25:51+08:00","updated_at":"2024-05-03T15:25:51+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/572ac5ce667b0f2583a646960c4d3ba673023441_476c9f09-dc23-4e52-8047-f069136c902b.webp?v=1714721151","variant_ids":[41885429366883]},"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-AE02","featured_media":{"alt":null,"id":23877181767779,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/572ac5ce667b0f2583a646960c4d3ba673023441_476c9f09-dc23-4e52-8047-f069136c902b.webp?v=1714721151"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/15c1d13dbda7cc39a2e01b66b616d34c96e0b486_b727f9f0-e405-45cc-b380-d877d4258501.webp?v=1714721149","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/572ac5ce667b0f2583a646960c4d3ba673023441_476c9f09-dc23-4e52-8047-f069136c902b.webp?v=1714721151","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/922ab7ae0ae31cd77777a8652e10425ccd40af07_f152ed8a-e8ca-42dd-ae26-d2ed923e8cc9.webp?v=1714721153","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f489faafcb4e5317b16a5b3954a17c0e5c4a8391_6f377f6c-48f3-44ce-9119-32fef32904fc.webp?v=1714721156","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b097060cfd24fb8c8c792245754d5a472f540b33_fd309e4f-eb9c-431c-bc07-ee64b225f1f2.webp?v=1714721158","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/309e5b06705af618e5cebb64f1a0ff5e23769ad3_74197924-037d-43ec-abb1-3c049aef876f.webp?v=1714721161","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d18938cb945c5e632da0eab0499afe72d05fcd3a_c55c62f3-35e2-474a-bb92-d744c8a8467f.webp?v=1714721163","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/19cac6b5d040ccfcb75681228f52842c8c1ea252_d5a53e98-3af8-4805-a541-ce83416214d2.webp?v=1714721166","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/883f13729883ac566da4f1b4ca8e3f7fd1a6b55c_1f04c6b1-79e1-42d5-9a0e-804c52509edf.webp?v=1714721168","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c5983c4f8db8d3c71bebd527db04bae59466eecb_7589418f-fb2c-4886-b06e-5724111ee41a.webp?v=1714721171"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/15c1d13dbda7cc39a2e01b66b616d34c96e0b486_b727f9f0-e405-45cc-b380-d877d4258501.webp?v=1714721149","options":["color"],"media":[{"alt":null,"id":23877180981347,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/15c1d13dbda7cc39a2e01b66b616d34c96e0b486_b727f9f0-e405-45cc-b380-d877d4258501.webp?v=1714721149"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/15c1d13dbda7cc39a2e01b66b616d34c96e0b486_b727f9f0-e405-45cc-b380-d877d4258501.webp?v=1714721149","width":2000},{"alt":null,"id":23877181767779,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/572ac5ce667b0f2583a646960c4d3ba673023441_476c9f09-dc23-4e52-8047-f069136c902b.webp?v=1714721151"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/572ac5ce667b0f2583a646960c4d3ba673023441_476c9f09-dc23-4e52-8047-f069136c902b.webp?v=1714721151","width":2000},{"alt":null,"id":23877182488675,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/922ab7ae0ae31cd77777a8652e10425ccd40af07_f152ed8a-e8ca-42dd-ae26-d2ed923e8cc9.webp?v=1714721153"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/922ab7ae0ae31cd77777a8652e10425ccd40af07_f152ed8a-e8ca-42dd-ae26-d2ed923e8cc9.webp?v=1714721153","width":2000},{"alt":null,"id":23877183733859,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f489faafcb4e5317b16a5b3954a17c0e5c4a8391_6f377f6c-48f3-44ce-9119-32fef32904fc.webp?v=1714721156"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f489faafcb4e5317b16a5b3954a17c0e5c4a8391_6f377f6c-48f3-44ce-9119-32fef32904fc.webp?v=1714721156","width":2000},{"alt":null,"id":23877184749667,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b097060cfd24fb8c8c792245754d5a472f540b33_fd309e4f-eb9c-431c-bc07-ee64b225f1f2.webp?v=1714721158"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b097060cfd24fb8c8c792245754d5a472f540b33_fd309e4f-eb9c-431c-bc07-ee64b225f1f2.webp?v=1714721158","width":2000},{"alt":null,"id":23877185372259,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/309e5b06705af618e5cebb64f1a0ff5e23769ad3_74197924-037d-43ec-abb1-3c049aef876f.webp?v=1714721161"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/309e5b06705af618e5cebb64f1a0ff5e23769ad3_74197924-037d-43ec-abb1-3c049aef876f.webp?v=1714721161","width":2000},{"alt":null,"id":23877186158691,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d18938cb945c5e632da0eab0499afe72d05fcd3a_c55c62f3-35e2-474a-bb92-d744c8a8467f.webp?v=1714721163"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d18938cb945c5e632da0eab0499afe72d05fcd3a_c55c62f3-35e2-474a-bb92-d744c8a8467f.webp?v=1714721163","width":2000},{"alt":null,"id":23877186551907,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/19cac6b5d040ccfcb75681228f52842c8c1ea252_d5a53e98-3af8-4805-a541-ce83416214d2.webp?v=1714721166"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/19cac6b5d040ccfcb75681228f52842c8c1ea252_d5a53e98-3af8-4805-a541-ce83416214d2.webp?v=1714721166","width":2000},{"alt":null,"id":23877187108963,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/883f13729883ac566da4f1b4ca8e3f7fd1a6b55c_1f04c6b1-79e1-42d5-9a0e-804c52509edf.webp?v=1714721168"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/883f13729883ac566da4f1b4ca8e3f7fd1a6b55c_1f04c6b1-79e1-42d5-9a0e-804c52509edf.webp?v=1714721168","width":2000},{"alt":null,"id":23877188157539,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c5983c4f8db8d3c71bebd527db04bae59466eecb_7589418f-fb2c-4886-b06e-5724111ee41a.webp?v=1714721171"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c5983c4f8db8d3c71bebd527db04bae59466eecb_7589418f-fb2c-4886-b06e-5724111ee41a.webp?v=1714721171","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41885429366883,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-AE02","requires_shipping":true,"taxable":true,"featured_image":{"id":31472265461859,"product_id":7408433397859,"position":2,"created_at":"2024-05-03T15:25:51+08:00","updated_at":"2024-05-03T15:25:51+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/572ac5ce667b0f2583a646960c4d3ba673023441_476c9f09-dc23-4e52-8047-f069136c902b.webp?v=1714721151","variant_ids":[41885429366883]},"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-AE02","featured_media":{"alt":null,"id":23877181767779,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/572ac5ce667b0f2583a646960c4d3ba673023441_476c9f09-dc23-4e52-8047-f069136c902b.webp?v=1714721151"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41885429366883,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-AE02","requires_shipping":true,"taxable":true,"featured_image":{"id":31472265461859,"product_id":7408433397859,"position":2,"created_at":"2024-05-03T15:25:51+08:00","updated_at":"2024-05-03T15:25:51+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/572ac5ce667b0f2583a646960c4d3ba673023441_476c9f09-dc23-4e52-8047-f069136c902b.webp?v=1714721151","variant_ids":[41885429366883]},"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-AE02","featured_media":{"alt":null,"id":23877181767779,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/572ac5ce667b0f2583a646960c4d3ba673023441_476c9f09-dc23-4e52-8047-f069136c902b.webp?v=1714721151"}},"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: "停產"
}