$product = {"id":7369143746659,"title":"犀牛盾Mod NX手機殼 - iPhone 11 Pro Max - 【聯名設計款】 - Snoopy 史努比 - 冰淇淋甜筒","handle":"iphone-11-pro-max-mod-nx-printable-pl59","description":"","published_at":"2024-06-11T16:13:11+08:00","created_at":"2024-04-23T15:32:58+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 11 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":41792988020835,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0114924-PL59","requires_shipping":true,"taxable":true,"featured_image":{"id":31386899677283,"product_id":7369143746659,"position":2,"created_at":"2024-04-23T15:33:03+08:00","updated_at":"2025-01-22T15:01:14+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f65cf020d07b270ac4f8301db32ffd6bd554109_68f7025d-a08e-4af7-b737-46a1d299f842.webp?v=1737529274","variant_ids":[41792988020835]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 11 Pro Max - 【聯名設計款】 - Snoopy 史努比 - 冰淇淋甜筒 - 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":"NPB0114924-PL59","featured_media":{"alt":null,"id":23789137625187,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f65cf020d07b270ac4f8301db32ffd6bd554109_68f7025d-a08e-4af7-b737-46a1d299f842.webp?v=1737529274"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63eb4ebe1e28021ad72ad571ab96a31eafb1b8a6_265bd0ab-20c5-4e52-b08f-850fde1985f7.webp?v=1737529274","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f65cf020d07b270ac4f8301db32ffd6bd554109_68f7025d-a08e-4af7-b737-46a1d299f842.webp?v=1737529274","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a61b755a0126b4471b23ebe325b0142f5cea52a2_d3d077ae-ad21-4425-806f-c771a3734885.webp?v=1737529274","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bab9fa9a62595a99131de5d11887cd7b833bef3_e16cece3-b920-410f-ad05-2efcc48540ff.webp?v=1737529274","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9789ecf701de54f930278d9574cd9cd4ea4edb6_99a212e5-866f-4d60-98be-56c3f0b73ce8.webp?v=1737529274","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf8e0cf52b5efdaf5e74cefe17a0427b7885af2b_43858079-9ea2-4f12-a900-1513ff964038.webp?v=1737529274","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c526fca9362a945c0ce5883249e14481b39dd6c6_da0f2d21-b9e0-4992-be7f-f3392e824928.webp?v=1737529274","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1395a8db3581ef9aad29c5db074cc7a559f59f2_c3fe270a-910d-4e1e-be8b-414bf7b5fdeb.webp?v=1737529274","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f29264a1a874ef21538a52823756a2d29384fb9e_2174f359-7e88-4097-9ff7-bdc67c8134ce.webp?v=1737529274","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03e35422bd2a5eb6ae48014cdf748fc3da7a9e3b_9689055b-5af0-4779-a67c-f032e42e1e1f.webp?v=1737529274"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63eb4ebe1e28021ad72ad571ab96a31eafb1b8a6_265bd0ab-20c5-4e52-b08f-850fde1985f7.webp?v=1737529274","options":["color"],"media":[{"alt":null,"id":23789136969827,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63eb4ebe1e28021ad72ad571ab96a31eafb1b8a6_265bd0ab-20c5-4e52-b08f-850fde1985f7.webp?v=1737529274"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63eb4ebe1e28021ad72ad571ab96a31eafb1b8a6_265bd0ab-20c5-4e52-b08f-850fde1985f7.webp?v=1737529274","width":2000},{"alt":null,"id":23789137625187,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f65cf020d07b270ac4f8301db32ffd6bd554109_68f7025d-a08e-4af7-b737-46a1d299f842.webp?v=1737529274"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f65cf020d07b270ac4f8301db32ffd6bd554109_68f7025d-a08e-4af7-b737-46a1d299f842.webp?v=1737529274","width":2000},{"alt":null,"id":23789138346083,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a61b755a0126b4471b23ebe325b0142f5cea52a2_d3d077ae-ad21-4425-806f-c771a3734885.webp?v=1737529274"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a61b755a0126b4471b23ebe325b0142f5cea52a2_d3d077ae-ad21-4425-806f-c771a3734885.webp?v=1737529274","width":2000},{"alt":null,"id":23789138772067,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bab9fa9a62595a99131de5d11887cd7b833bef3_e16cece3-b920-410f-ad05-2efcc48540ff.webp?v=1737529274"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bab9fa9a62595a99131de5d11887cd7b833bef3_e16cece3-b920-410f-ad05-2efcc48540ff.webp?v=1737529274","width":2000},{"alt":null,"id":23789139624035,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9789ecf701de54f930278d9574cd9cd4ea4edb6_99a212e5-866f-4d60-98be-56c3f0b73ce8.webp?v=1737529274"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9789ecf701de54f930278d9574cd9cd4ea4edb6_99a212e5-866f-4d60-98be-56c3f0b73ce8.webp?v=1737529274","width":2000},{"alt":null,"id":23789140869219,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf8e0cf52b5efdaf5e74cefe17a0427b7885af2b_43858079-9ea2-4f12-a900-1513ff964038.webp?v=1737529274"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf8e0cf52b5efdaf5e74cefe17a0427b7885af2b_43858079-9ea2-4f12-a900-1513ff964038.webp?v=1737529274","width":2000},{"alt":null,"id":23789141393507,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c526fca9362a945c0ce5883249e14481b39dd6c6_da0f2d21-b9e0-4992-be7f-f3392e824928.webp?v=1737529274"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c526fca9362a945c0ce5883249e14481b39dd6c6_da0f2d21-b9e0-4992-be7f-f3392e824928.webp?v=1737529274","width":2000},{"alt":null,"id":23789142114403,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1395a8db3581ef9aad29c5db074cc7a559f59f2_c3fe270a-910d-4e1e-be8b-414bf7b5fdeb.webp?v=1737529274"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1395a8db3581ef9aad29c5db074cc7a559f59f2_c3fe270a-910d-4e1e-be8b-414bf7b5fdeb.webp?v=1737529274","width":2000},{"alt":null,"id":25221969608803,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f29264a1a874ef21538a52823756a2d29384fb9e_2174f359-7e88-4097-9ff7-bdc67c8134ce.webp?v=1737529274"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f29264a1a874ef21538a52823756a2d29384fb9e_2174f359-7e88-4097-9ff7-bdc67c8134ce.webp?v=1737529274","width":2000},{"alt":null,"id":23789142802531,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03e35422bd2a5eb6ae48014cdf748fc3da7a9e3b_9689055b-5af0-4779-a67c-f032e42e1e1f.webp?v=1737529274"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03e35422bd2a5eb6ae48014cdf748fc3da7a9e3b_9689055b-5af0-4779-a67c-f032e42e1e1f.webp?v=1737529274","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":""};
$bumper = null;
$variants = [{"id":41792988020835,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0114924-PL59","requires_shipping":true,"taxable":true,"featured_image":{"id":31386899677283,"product_id":7369143746659,"position":2,"created_at":"2024-04-23T15:33:03+08:00","updated_at":"2025-01-22T15:01:14+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f65cf020d07b270ac4f8301db32ffd6bd554109_68f7025d-a08e-4af7-b737-46a1d299f842.webp?v=1737529274","variant_ids":[41792988020835]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 11 Pro Max - 【聯名設計款】 - Snoopy 史努比 - 冰淇淋甜筒 - 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":"NPB0114924-PL59","featured_media":{"alt":null,"id":23789137625187,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f65cf020d07b270ac4f8301db32ffd6bd554109_68f7025d-a08e-4af7-b737-46a1d299f842.webp?v=1737529274"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41792988020835,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0114924-PL59","requires_shipping":true,"taxable":true,"featured_image":{"id":31386899677283,"product_id":7369143746659,"position":2,"created_at":"2024-04-23T15:33:03+08:00","updated_at":"2025-01-22T15:01:14+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f65cf020d07b270ac4f8301db32ffd6bd554109_68f7025d-a08e-4af7-b737-46a1d299f842.webp?v=1737529274","variant_ids":[41792988020835]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 11 Pro Max - 【聯名設計款】 - Snoopy 史努比 - 冰淇淋甜筒 - 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":"NPB0114924-PL59","featured_media":{"alt":null,"id":23789137625187,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f65cf020d07b270ac4f8301db32ffd6bd554109_68f7025d-a08e-4af7-b737-46a1d299f842.webp?v=1737529274"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}};
$device_handle = null
var sellingStatus
if ($bumper) {
$(document).ready(function() {
var productImg = $product.images[0]
var bumperVariants = $bumper.variants;
var bumperColors = new Object();
var currentVariant = '';
var productType = '';
bumperVariants.forEach(variant => {
bumperColors[`${variant.title.split(' (')[0].toLowerCase()}`] = variant.featured_image.src;
});
if (productType === 'mod-nx-backplate' || productType === 'mod-backplate') {
mergeImages(
[productImg, bumperColors[currentVariant]],
{ crossOrigin: 'anonymous' }
).then(mergedImg => {
$('.merged-img').attr('src', mergedImg);
});
} else {
mergeImages(
[bumperColors[currentVariant], productImg],
{ crossOrigin: 'anonymous' }
).then(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: "停產"
}