$product = {"id":7369174941795,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Snoopy 史努比 - Chill moment","handle":"iphone-12-pro-max-mod-nx-printable-pl58","description":null,"published_at":"2024-06-11T16:13:49+08:00","created_at":"2024-04-23T15:38:18+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-Snoopy 史努比","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-snoopy","device-iPhone 12 pro max","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-snoopy","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":41793290338403,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PL58","requires_shipping":true,"taxable":true,"featured_image":{"id":31386984087651,"product_id":7369174941795,"position":6,"created_at":"2024-04-23T15:38:32+08:00","updated_at":"2024-04-23T15:38:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/089671d99f5edc817296c9fe4801003b843dbbb5_ec756805-f637-4f70-b8e2-3d6103bc4caf.webp?v=1713857912","variant_ids":[41793290338403]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Snoopy 史努比 - Chill moment - 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-PL58","featured_media":{"alt":null,"id":23789222428771,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/089671d99f5edc817296c9fe4801003b843dbbb5_ec756805-f637-4f70-b8e2-3d6103bc4caf.webp?v=1713857912"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/74cc0e21d4f5c77ed457e894f442c81963a08508_fb2932f2-ebbd-4922-8872-15a2a2436d05.webp?v=1713857900","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/394f64ca4ed2baa138747be7f076d59ec82834eb_c1c97d9c-01c2-4fd3-81ed-482b776f7103.webp?v=1713857902","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2de8be476bb891418490bea6126c60bfd269f54_e4182d4a-301c-4164-bc12-58d1f7abaa63.webp?v=1713857905","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9659970319b4b530953da8fd8fb5c0252fd7eb3f_4e206ee4-e491-494f-830d-4931068add6e.webp?v=1713857907","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9093daab026bb442ff178d886e89e0fcc3d02d22_89cc6e2b-e925-4c3f-9b9d-a517cc61a08b.webp?v=1713857909","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/089671d99f5edc817296c9fe4801003b843dbbb5_ec756805-f637-4f70-b8e2-3d6103bc4caf.webp?v=1713857912","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c3bef111ff3194edc57849659be6e76704f3d3b_e34f71f4-5216-4ad0-a5e5-d63ddaee15ff.webp?v=1713857915","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/925a43103b918025c15b389fa9e68ff18a244dfc_433aedcc-d030-4cc6-93ef-c79cb5bdf263.webp?v=1713857917","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d7b056837c502e3f69959d70ed71a60a05dc2897_1f3a11bd-8dfc-4725-8d08-54c0dcbbc0ad.webp?v=1713857920","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/edf390d8f973b55212d49d57e7d8627824c8ca69_9e439e72-fcfe-483a-a0a2-0eb275079de6.webp?v=1713857923"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/74cc0e21d4f5c77ed457e894f442c81963a08508_fb2932f2-ebbd-4922-8872-15a2a2436d05.webp?v=1713857900","options":["color"],"media":[{"alt":null,"id":23789219577955,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/74cc0e21d4f5c77ed457e894f442c81963a08508_fb2932f2-ebbd-4922-8872-15a2a2436d05.webp?v=1713857900"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/74cc0e21d4f5c77ed457e894f442c81963a08508_fb2932f2-ebbd-4922-8872-15a2a2436d05.webp?v=1713857900","width":2000},{"alt":null,"id":23789220167779,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/394f64ca4ed2baa138747be7f076d59ec82834eb_c1c97d9c-01c2-4fd3-81ed-482b776f7103.webp?v=1713857902"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/394f64ca4ed2baa138747be7f076d59ec82834eb_c1c97d9c-01c2-4fd3-81ed-482b776f7103.webp?v=1713857902","width":2000},{"alt":null,"id":23789220757603,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2de8be476bb891418490bea6126c60bfd269f54_e4182d4a-301c-4164-bc12-58d1f7abaa63.webp?v=1713857905"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2de8be476bb891418490bea6126c60bfd269f54_e4182d4a-301c-4164-bc12-58d1f7abaa63.webp?v=1713857905","width":2000},{"alt":null,"id":23789221314659,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9659970319b4b530953da8fd8fb5c0252fd7eb3f_4e206ee4-e491-494f-830d-4931068add6e.webp?v=1713857907"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9659970319b4b530953da8fd8fb5c0252fd7eb3f_4e206ee4-e491-494f-830d-4931068add6e.webp?v=1713857907","width":2000},{"alt":null,"id":23789221838947,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9093daab026bb442ff178d886e89e0fcc3d02d22_89cc6e2b-e925-4c3f-9b9d-a517cc61a08b.webp?v=1713857909"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9093daab026bb442ff178d886e89e0fcc3d02d22_89cc6e2b-e925-4c3f-9b9d-a517cc61a08b.webp?v=1713857909","width":2000},{"alt":null,"id":23789222428771,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/089671d99f5edc817296c9fe4801003b843dbbb5_ec756805-f637-4f70-b8e2-3d6103bc4caf.webp?v=1713857912"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/089671d99f5edc817296c9fe4801003b843dbbb5_ec756805-f637-4f70-b8e2-3d6103bc4caf.webp?v=1713857912","width":2000},{"alt":null,"id":23789222985827,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c3bef111ff3194edc57849659be6e76704f3d3b_e34f71f4-5216-4ad0-a5e5-d63ddaee15ff.webp?v=1713857915"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c3bef111ff3194edc57849659be6e76704f3d3b_e34f71f4-5216-4ad0-a5e5-d63ddaee15ff.webp?v=1713857915","width":2000},{"alt":null,"id":23789223936099,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/925a43103b918025c15b389fa9e68ff18a244dfc_433aedcc-d030-4cc6-93ef-c79cb5bdf263.webp?v=1713857917"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/925a43103b918025c15b389fa9e68ff18a244dfc_433aedcc-d030-4cc6-93ef-c79cb5bdf263.webp?v=1713857917","width":2000},{"alt":null,"id":23789224460387,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d7b056837c502e3f69959d70ed71a60a05dc2897_1f3a11bd-8dfc-4725-8d08-54c0dcbbc0ad.webp?v=1713857920"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d7b056837c502e3f69959d70ed71a60a05dc2897_1f3a11bd-8dfc-4725-8d08-54c0dcbbc0ad.webp?v=1713857920","width":2000},{"alt":null,"id":23789225148515,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/edf390d8f973b55212d49d57e7d8627824c8ca69_9e439e72-fcfe-483a-a0a2-0eb275079de6.webp?v=1713857923"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/edf390d8f973b55212d49d57e7d8627824c8ca69_9e439e72-fcfe-483a-a0a2-0eb275079de6.webp?v=1713857923","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41793290338403,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PL58","requires_shipping":true,"taxable":true,"featured_image":{"id":31386984087651,"product_id":7369174941795,"position":6,"created_at":"2024-04-23T15:38:32+08:00","updated_at":"2024-04-23T15:38:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/089671d99f5edc817296c9fe4801003b843dbbb5_ec756805-f637-4f70-b8e2-3d6103bc4caf.webp?v=1713857912","variant_ids":[41793290338403]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Snoopy 史努比 - Chill moment - 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-PL58","featured_media":{"alt":null,"id":23789222428771,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/089671d99f5edc817296c9fe4801003b843dbbb5_ec756805-f637-4f70-b8e2-3d6103bc4caf.webp?v=1713857912"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41793290338403,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PL58","requires_shipping":true,"taxable":true,"featured_image":{"id":31386984087651,"product_id":7369174941795,"position":6,"created_at":"2024-04-23T15:38:32+08:00","updated_at":"2024-04-23T15:38:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/089671d99f5edc817296c9fe4801003b843dbbb5_ec756805-f637-4f70-b8e2-3d6103bc4caf.webp?v=1713857912","variant_ids":[41793290338403]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Snoopy 史努比 - Chill moment - 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-PL58","featured_media":{"alt":null,"id":23789222428771,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/089671d99f5edc817296c9fe4801003b843dbbb5_ec756805-f637-4f70-b8e2-3d6103bc4caf.webp?v=1713857912"}},"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: "停產"
}