$product = {"id":7369203581027,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Snoopy 史努比 - Chill moment","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-pl58","description":null,"published_at":"2024-06-11T17:31:23+08:00","created_at":"2024-04-23T15:44:04+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區Snoopy 史努比","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-snoopy","device-iPhone 12 pro max","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-snoopy","Top50","type-Mod NX Printable MagSafe Printable"],"price":110000,"price_min":110000,"price_max":110000,"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":41793568505955,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-PL58","requires_shipping":true,"taxable":true,"featured_image":{"id":31387060371555,"product_id":7369203581027,"position":8,"created_at":"2024-04-23T15:44:23+08:00","updated_at":"2024-04-23T15:44:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0bea66e9808f0cb5193d60209cde6d40af73e018_b9e441ab-b564-4033-8ed8-aa3fa79ca4ae.webp?v=1713858263","variant_ids":[41793568505955]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Snoopy 史努比 - Chill moment - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118724-PL58","featured_media":{"alt":null,"id":23789299007587,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0bea66e9808f0cb5193d60209cde6d40af73e018_b9e441ab-b564-4033-8ed8-aa3fa79ca4ae.webp?v=1713858263"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e3b27e264665cd58234aa55ed3b50a5b64870f47_c722207f-b7f0-432e-a984-66a3e2bf8e7d.webp?v=1713858246","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/203cfa8959c4dc9c29ed4c36d206307ba99c4b2e_2ac892f7-3fc5-46da-88b6-53b28eced299.webp?v=1713858249","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/13bedf68e65ede1973743f81062a21f2b4aa6281_a2657661-abd8-4601-8c64-038352a24182.webp?v=1713858251","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/270929c194ceb23ee0743cea1f3f1e535ac32c7c_d5e87743-e75f-4e47-b186-218844fc0558.webp?v=1713858253","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52ea09f0e96be370e1423a917f978fa88e1c71d1_f850afc2-aa71-4c6d-b526-e135de1f7770.webp?v=1713858255","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e062f0cf66e13bf9b11fe8994d169ed5df03449_3fc55e0a-2625-4a47-89c5-29052bc14a29.webp?v=1713858258","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/340b80ac35bc09182eaaf8bf5310862f5bb77645_cce68dfb-1cb9-4961-95ec-06e32baad9e4.webp?v=1713858260","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0bea66e9808f0cb5193d60209cde6d40af73e018_b9e441ab-b564-4033-8ed8-aa3fa79ca4ae.webp?v=1713858263","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b73a1f752a2d2c2b89214c684c3ca4738964802c_b056cc7f-f981-4825-bdf0-5326aee39aff.webp?v=1713858265","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac3841e129dca5800150629742f0d7aee06aa336_afbe7eed-ffb9-44a6-82ed-69db6fa48885.webp?v=1713858267"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e3b27e264665cd58234aa55ed3b50a5b64870f47_c722207f-b7f0-432e-a984-66a3e2bf8e7d.webp?v=1713858246","options":["color"],"media":[{"alt":null,"id":23789294518371,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e3b27e264665cd58234aa55ed3b50a5b64870f47_c722207f-b7f0-432e-a984-66a3e2bf8e7d.webp?v=1713858246"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e3b27e264665cd58234aa55ed3b50a5b64870f47_c722207f-b7f0-432e-a984-66a3e2bf8e7d.webp?v=1713858246","width":2000},{"alt":null,"id":23789295206499,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/203cfa8959c4dc9c29ed4c36d206307ba99c4b2e_2ac892f7-3fc5-46da-88b6-53b28eced299.webp?v=1713858249"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/203cfa8959c4dc9c29ed4c36d206307ba99c4b2e_2ac892f7-3fc5-46da-88b6-53b28eced299.webp?v=1713858249","width":2000},{"alt":null,"id":23789295796323,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/13bedf68e65ede1973743f81062a21f2b4aa6281_a2657661-abd8-4601-8c64-038352a24182.webp?v=1713858251"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/13bedf68e65ede1973743f81062a21f2b4aa6281_a2657661-abd8-4601-8c64-038352a24182.webp?v=1713858251","width":2000},{"alt":null,"id":23789296353379,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/270929c194ceb23ee0743cea1f3f1e535ac32c7c_d5e87743-e75f-4e47-b186-218844fc0558.webp?v=1713858253"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/270929c194ceb23ee0743cea1f3f1e535ac32c7c_d5e87743-e75f-4e47-b186-218844fc0558.webp?v=1713858253","width":2000},{"alt":null,"id":23789297008739,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52ea09f0e96be370e1423a917f978fa88e1c71d1_f850afc2-aa71-4c6d-b526-e135de1f7770.webp?v=1713858255"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52ea09f0e96be370e1423a917f978fa88e1c71d1_f850afc2-aa71-4c6d-b526-e135de1f7770.webp?v=1713858255","width":2000},{"alt":null,"id":23789297631331,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e062f0cf66e13bf9b11fe8994d169ed5df03449_3fc55e0a-2625-4a47-89c5-29052bc14a29.webp?v=1713858258"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e062f0cf66e13bf9b11fe8994d169ed5df03449_3fc55e0a-2625-4a47-89c5-29052bc14a29.webp?v=1713858258","width":2000},{"alt":null,"id":23789298384995,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/340b80ac35bc09182eaaf8bf5310862f5bb77645_cce68dfb-1cb9-4961-95ec-06e32baad9e4.webp?v=1713858260"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/340b80ac35bc09182eaaf8bf5310862f5bb77645_cce68dfb-1cb9-4961-95ec-06e32baad9e4.webp?v=1713858260","width":2000},{"alt":null,"id":23789299007587,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0bea66e9808f0cb5193d60209cde6d40af73e018_b9e441ab-b564-4033-8ed8-aa3fa79ca4ae.webp?v=1713858263"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0bea66e9808f0cb5193d60209cde6d40af73e018_b9e441ab-b564-4033-8ed8-aa3fa79ca4ae.webp?v=1713858263","width":2000},{"alt":null,"id":23789299662947,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b73a1f752a2d2c2b89214c684c3ca4738964802c_b056cc7f-f981-4825-bdf0-5326aee39aff.webp?v=1713858265"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b73a1f752a2d2c2b89214c684c3ca4738964802c_b056cc7f-f981-4825-bdf0-5326aee39aff.webp?v=1713858265","width":2000},{"alt":null,"id":23789300154467,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac3841e129dca5800150629742f0d7aee06aa336_afbe7eed-ffb9-44a6-82ed-69db6fa48885.webp?v=1713858267"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac3841e129dca5800150629742f0d7aee06aa336_afbe7eed-ffb9-44a6-82ed-69db6fa48885.webp?v=1713858267","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41793568505955,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-PL58","requires_shipping":true,"taxable":true,"featured_image":{"id":31387060371555,"product_id":7369203581027,"position":8,"created_at":"2024-04-23T15:44:23+08:00","updated_at":"2024-04-23T15:44:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0bea66e9808f0cb5193d60209cde6d40af73e018_b9e441ab-b564-4033-8ed8-aa3fa79ca4ae.webp?v=1713858263","variant_ids":[41793568505955]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Snoopy 史努比 - Chill moment - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118724-PL58","featured_media":{"alt":null,"id":23789299007587,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0bea66e9808f0cb5193d60209cde6d40af73e018_b9e441ab-b564-4033-8ed8-aa3fa79ca4ae.webp?v=1713858263"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41793568505955,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-PL58","requires_shipping":true,"taxable":true,"featured_image":{"id":31387060371555,"product_id":7369203581027,"position":8,"created_at":"2024-04-23T15:44:23+08:00","updated_at":"2024-04-23T15:44:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0bea66e9808f0cb5193d60209cde6d40af73e018_b9e441ab-b564-4033-8ed8-aa3fa79ca4ae.webp?v=1713858263","variant_ids":[41793568505955]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Snoopy 史努比 - Chill moment - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118724-PL58","featured_media":{"alt":null,"id":23789299007587,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0bea66e9808f0cb5193d60209cde6d40af73e018_b9e441ab-b564-4033-8ed8-aa3fa79ca4ae.webp?v=1713858263"}},"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: "停產"
}