$product = {"id":7369170419811,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Snoopy 史努比 - 夏日活動","handle":"iphone-12-pro-max-mod-nx-printable-pl61","description":null,"published_at":"2024-06-11T16:13:43+08:00","created_at":"2024-04-23T15:37:25+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":41793252065379,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PL61","requires_shipping":true,"taxable":true,"featured_image":{"id":31386976485475,"product_id":7369170419811,"position":10,"created_at":"2024-04-23T15:37:59+08:00","updated_at":"2024-04-23T15:37:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/506b8c47c17894a7895bcc582578cc4c0eec9785_4aaac5a5-7fb3-4b8c-ab9e-c445180296a1.webp?v=1713857879","variant_ids":[41793252065379]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 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":"NPB0118724-PL61","featured_media":{"alt":null,"id":23789214728291,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/506b8c47c17894a7895bcc582578cc4c0eec9785_4aaac5a5-7fb3-4b8c-ab9e-c445180296a1.webp?v=1713857879"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2d9290265ec792ce9c02a95568d882c4878b2aa_1ace3aad-87ab-44e8-873b-ba31d1a4fd52.webp?v=1713857849","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b338ae0877605887e87ed83d52a0bf6666e34a7f_ef37f455-a251-4f4e-ac08-0a8b9a9449d5.webp?v=1713857851","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/283e56a67bc97d93e273de075ea287ef30caf635_60865235-959d-485c-8e36-ad073b3db8f6.webp?v=1713857860","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d88bbcaee5f225626debde18c195204f82be376_c124ba76-6044-47d4-809c-4dd762911b44.webp?v=1713857863","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f887f980ed0aa49827f087183893d8fa5476121_86a93695-32b0-47a5-8f37-92d8efaeee57.webp?v=1713857865","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35c58ac7b6243c84168e2135077908dfc7735261_4855445b-9dd6-4c2f-8b23-4f2c199309d1.webp?v=1713857868","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e1833df2835d8208ab30f14d0b500490ae2c951_9f1c057f-8c74-41e5-8e52-373c4c74a3e4.webp?v=1713857871","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b00486c96be0a4f462bb4a1b73f426146a07226_290d71c1-b707-44d3-8c03-e2ca61ec5bf7.webp?v=1713857874","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/205533d414f1b6abb7bf52280d6083850bf11363_39fa9a95-a7c5-488d-8257-c22ca2ab2d7b.webp?v=1713857876","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/506b8c47c17894a7895bcc582578cc4c0eec9785_4aaac5a5-7fb3-4b8c-ab9e-c445180296a1.webp?v=1713857879"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2d9290265ec792ce9c02a95568d882c4878b2aa_1ace3aad-87ab-44e8-873b-ba31d1a4fd52.webp?v=1713857849","options":["color"],"media":[{"alt":null,"id":23789207158883,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2d9290265ec792ce9c02a95568d882c4878b2aa_1ace3aad-87ab-44e8-873b-ba31d1a4fd52.webp?v=1713857849"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2d9290265ec792ce9c02a95568d882c4878b2aa_1ace3aad-87ab-44e8-873b-ba31d1a4fd52.webp?v=1713857849","width":2000},{"alt":null,"id":23789207912547,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b338ae0877605887e87ed83d52a0bf6666e34a7f_ef37f455-a251-4f4e-ac08-0a8b9a9449d5.webp?v=1713857851"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b338ae0877605887e87ed83d52a0bf6666e34a7f_ef37f455-a251-4f4e-ac08-0a8b9a9449d5.webp?v=1713857851","width":2000},{"alt":null,"id":23789210009699,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/283e56a67bc97d93e273de075ea287ef30caf635_60865235-959d-485c-8e36-ad073b3db8f6.webp?v=1713857860"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/283e56a67bc97d93e273de075ea287ef30caf635_60865235-959d-485c-8e36-ad073b3db8f6.webp?v=1713857860","width":2000},{"alt":null,"id":23789210632291,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d88bbcaee5f225626debde18c195204f82be376_c124ba76-6044-47d4-809c-4dd762911b44.webp?v=1713857863"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d88bbcaee5f225626debde18c195204f82be376_c124ba76-6044-47d4-809c-4dd762911b44.webp?v=1713857863","width":2000},{"alt":null,"id":23789211189347,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f887f980ed0aa49827f087183893d8fa5476121_86a93695-32b0-47a5-8f37-92d8efaeee57.webp?v=1713857865"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f887f980ed0aa49827f087183893d8fa5476121_86a93695-32b0-47a5-8f37-92d8efaeee57.webp?v=1713857865","width":2000},{"alt":null,"id":23789211910243,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35c58ac7b6243c84168e2135077908dfc7735261_4855445b-9dd6-4c2f-8b23-4f2c199309d1.webp?v=1713857868"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35c58ac7b6243c84168e2135077908dfc7735261_4855445b-9dd6-4c2f-8b23-4f2c199309d1.webp?v=1713857868","width":2000},{"alt":null,"id":23789212500067,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e1833df2835d8208ab30f14d0b500490ae2c951_9f1c057f-8c74-41e5-8e52-373c4c74a3e4.webp?v=1713857871"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e1833df2835d8208ab30f14d0b500490ae2c951_9f1c057f-8c74-41e5-8e52-373c4c74a3e4.webp?v=1713857871","width":2000},{"alt":null,"id":23789213352035,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b00486c96be0a4f462bb4a1b73f426146a07226_290d71c1-b707-44d3-8c03-e2ca61ec5bf7.webp?v=1713857874"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b00486c96be0a4f462bb4a1b73f426146a07226_290d71c1-b707-44d3-8c03-e2ca61ec5bf7.webp?v=1713857874","width":2000},{"alt":null,"id":23789214105699,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/205533d414f1b6abb7bf52280d6083850bf11363_39fa9a95-a7c5-488d-8257-c22ca2ab2d7b.webp?v=1713857876"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/205533d414f1b6abb7bf52280d6083850bf11363_39fa9a95-a7c5-488d-8257-c22ca2ab2d7b.webp?v=1713857876","width":2000},{"alt":null,"id":23789214728291,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/506b8c47c17894a7895bcc582578cc4c0eec9785_4aaac5a5-7fb3-4b8c-ab9e-c445180296a1.webp?v=1713857879"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/506b8c47c17894a7895bcc582578cc4c0eec9785_4aaac5a5-7fb3-4b8c-ab9e-c445180296a1.webp?v=1713857879","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$bumper = null;
$variants = [{"id":41793252065379,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PL61","requires_shipping":true,"taxable":true,"featured_image":{"id":31386976485475,"product_id":7369170419811,"position":10,"created_at":"2024-04-23T15:37:59+08:00","updated_at":"2024-04-23T15:37:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/506b8c47c17894a7895bcc582578cc4c0eec9785_4aaac5a5-7fb3-4b8c-ab9e-c445180296a1.webp?v=1713857879","variant_ids":[41793252065379]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 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":"NPB0118724-PL61","featured_media":{"alt":null,"id":23789214728291,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/506b8c47c17894a7895bcc582578cc4c0eec9785_4aaac5a5-7fb3-4b8c-ab9e-c445180296a1.webp?v=1713857879"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41793252065379,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PL61","requires_shipping":true,"taxable":true,"featured_image":{"id":31386976485475,"product_id":7369170419811,"position":10,"created_at":"2024-04-23T15:37:59+08:00","updated_at":"2024-04-23T15:37:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/506b8c47c17894a7895bcc582578cc4c0eec9785_4aaac5a5-7fb3-4b8c-ab9e-c445180296a1.webp?v=1713857879","variant_ids":[41793252065379]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 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":"NPB0118724-PL61","featured_media":{"alt":null,"id":23789214728291,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/506b8c47c17894a7895bcc582578cc4c0eec9785_4aaac5a5-7fb3-4b8c-ab9e-c445180296a1.webp?v=1713857879"}},"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: "停產"
}