$product = {"id":7415047159907,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Weiweiboy - 讓世界再可愛一點","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-eo02","description":null,"published_at":"2024-06-11T17:56:33+08:00","created_at":"2024-05-05T20:12:54+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區Weiweiboy","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-weiweiboy","device-iPhone 12 pro max","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-weiweiboy","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":41911309107299,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-EO02","requires_shipping":true,"taxable":true,"featured_image":{"id":31488015564899,"product_id":7415047159907,"position":2,"created_at":"2024-05-05T20:12:59+08:00","updated_at":"2024-05-05T20:12:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e82b069b95477c9b5431eeef6e3a01bf58819cdf_43d72f25-129f-4ea0-9781-49d445e7b7f7.webp?v=1714911179","variant_ids":[41911309107299]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Weiweiboy - 讓世界再可愛一點 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118724-EO02","featured_media":{"alt":null,"id":23893359853667,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e82b069b95477c9b5431eeef6e3a01bf58819cdf_43d72f25-129f-4ea0-9781-49d445e7b7f7.webp?v=1714911179"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2ab750d57fafcbad9176f30ba1f1b1373699c66_217da132-ff27-467c-aa3e-7f767e4d2241.webp?v=1714911177","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e82b069b95477c9b5431eeef6e3a01bf58819cdf_43d72f25-129f-4ea0-9781-49d445e7b7f7.webp?v=1714911179","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a314047793a661a8c6175ad1d08da16eec5ae7a_258921c7-f9af-400f-bdc8-618567765c89.webp?v=1714911181","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e8328ccf2fa85a0f7338eb1731ac493ff1cb5af_40079cda-7857-4992-9569-7c010b859391.webp?v=1714911184","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/56006d42d1ebd3c07048f36e8317a8ec081d8ad8_9dcec6e4-aeb1-46a6-8c28-cc66c1b1c355.webp?v=1714911186","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/822838ce8c16fecb26816e75b55317b7e2b31b07_8cf4820a-ef9b-4df8-9129-e45ca25c17a2.webp?v=1714911189","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3fac02cb3bdcc11a0efdcadd991e6837c3e06c4_ce8d41f7-998f-4b28-8d41-7ed321f33cf0.webp?v=1714911191","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2e2eeae2933ae1690c7688064cb6c1b0889a4b9_35082eb9-5d41-4616-a972-37d59e7d500f.webp?v=1714911194","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7273552af74bface488aa2352179d2f3df68a3de_bcfeba70-5b8d-447d-81fe-e133bbe2883d.webp?v=1714911196","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d2cef9d643fdec08ca60a23f95e8382f4692b9d_867ebe76-811f-4154-9163-9b522d913f69.webp?v=1714911199","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7f8dadc2e611b93daff167d2be2e0adfb7cfd8e_5c3881f1-d4b1-425a-b48d-22e701f31926.webp?v=1714911201"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2ab750d57fafcbad9176f30ba1f1b1373699c66_217da132-ff27-467c-aa3e-7f767e4d2241.webp?v=1714911177","options":["color"],"media":[{"alt":null,"id":23893359493219,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2ab750d57fafcbad9176f30ba1f1b1373699c66_217da132-ff27-467c-aa3e-7f767e4d2241.webp?v=1714911177"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2ab750d57fafcbad9176f30ba1f1b1373699c66_217da132-ff27-467c-aa3e-7f767e4d2241.webp?v=1714911177","width":2000},{"alt":null,"id":23893359853667,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e82b069b95477c9b5431eeef6e3a01bf58819cdf_43d72f25-129f-4ea0-9781-49d445e7b7f7.webp?v=1714911179"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e82b069b95477c9b5431eeef6e3a01bf58819cdf_43d72f25-129f-4ea0-9781-49d445e7b7f7.webp?v=1714911179","width":2000},{"alt":null,"id":23893360476259,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a314047793a661a8c6175ad1d08da16eec5ae7a_258921c7-f9af-400f-bdc8-618567765c89.webp?v=1714911181"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a314047793a661a8c6175ad1d08da16eec5ae7a_258921c7-f9af-400f-bdc8-618567765c89.webp?v=1714911181","width":2000},{"alt":null,"id":23893360902243,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e8328ccf2fa85a0f7338eb1731ac493ff1cb5af_40079cda-7857-4992-9569-7c010b859391.webp?v=1714911184"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e8328ccf2fa85a0f7338eb1731ac493ff1cb5af_40079cda-7857-4992-9569-7c010b859391.webp?v=1714911184","width":2000},{"alt":null,"id":23893361721443,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/56006d42d1ebd3c07048f36e8317a8ec081d8ad8_9dcec6e4-aeb1-46a6-8c28-cc66c1b1c355.webp?v=1714911186"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/56006d42d1ebd3c07048f36e8317a8ec081d8ad8_9dcec6e4-aeb1-46a6-8c28-cc66c1b1c355.webp?v=1714911186","width":2000},{"alt":null,"id":23893362081891,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/822838ce8c16fecb26816e75b55317b7e2b31b07_8cf4820a-ef9b-4df8-9129-e45ca25c17a2.webp?v=1714911189"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/822838ce8c16fecb26816e75b55317b7e2b31b07_8cf4820a-ef9b-4df8-9129-e45ca25c17a2.webp?v=1714911189","width":2000},{"alt":null,"id":23893363097699,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3fac02cb3bdcc11a0efdcadd991e6837c3e06c4_ce8d41f7-998f-4b28-8d41-7ed321f33cf0.webp?v=1714911191"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3fac02cb3bdcc11a0efdcadd991e6837c3e06c4_ce8d41f7-998f-4b28-8d41-7ed321f33cf0.webp?v=1714911191","width":2000},{"alt":null,"id":23893363556451,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2e2eeae2933ae1690c7688064cb6c1b0889a4b9_35082eb9-5d41-4616-a972-37d59e7d500f.webp?v=1714911194"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2e2eeae2933ae1690c7688064cb6c1b0889a4b9_35082eb9-5d41-4616-a972-37d59e7d500f.webp?v=1714911194","width":2000},{"alt":null,"id":23893364015203,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7273552af74bface488aa2352179d2f3df68a3de_bcfeba70-5b8d-447d-81fe-e133bbe2883d.webp?v=1714911196"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7273552af74bface488aa2352179d2f3df68a3de_bcfeba70-5b8d-447d-81fe-e133bbe2883d.webp?v=1714911196","width":2000},{"alt":null,"id":23893364539491,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d2cef9d643fdec08ca60a23f95e8382f4692b9d_867ebe76-811f-4154-9163-9b522d913f69.webp?v=1714911199"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d2cef9d643fdec08ca60a23f95e8382f4692b9d_867ebe76-811f-4154-9163-9b522d913f69.webp?v=1714911199","width":2000},{"alt":null,"id":23893364965475,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7f8dadc2e611b93daff167d2be2e0adfb7cfd8e_5c3881f1-d4b1-425a-b48d-22e701f31926.webp?v=1714911201"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7f8dadc2e611b93daff167d2be2e0adfb7cfd8e_5c3881f1-d4b1-425a-b48d-22e701f31926.webp?v=1714911201","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$bumper = null;
$variants = [{"id":41911309107299,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-EO02","requires_shipping":true,"taxable":true,"featured_image":{"id":31488015564899,"product_id":7415047159907,"position":2,"created_at":"2024-05-05T20:12:59+08:00","updated_at":"2024-05-05T20:12:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e82b069b95477c9b5431eeef6e3a01bf58819cdf_43d72f25-129f-4ea0-9781-49d445e7b7f7.webp?v=1714911179","variant_ids":[41911309107299]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Weiweiboy - 讓世界再可愛一點 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118724-EO02","featured_media":{"alt":null,"id":23893359853667,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e82b069b95477c9b5431eeef6e3a01bf58819cdf_43d72f25-129f-4ea0-9781-49d445e7b7f7.webp?v=1714911179"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41911309107299,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-EO02","requires_shipping":true,"taxable":true,"featured_image":{"id":31488015564899,"product_id":7415047159907,"position":2,"created_at":"2024-05-05T20:12:59+08:00","updated_at":"2024-05-05T20:12:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e82b069b95477c9b5431eeef6e3a01bf58819cdf_43d72f25-129f-4ea0-9781-49d445e7b7f7.webp?v=1714911179","variant_ids":[41911309107299]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Weiweiboy - 讓世界再可愛一點 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118724-EO02","featured_media":{"alt":null,"id":23893359853667,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e82b069b95477c9b5431eeef6e3a01bf58819cdf_43d72f25-129f-4ea0-9781-49d445e7b7f7.webp?v=1714911179"}},"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: "停產"
}