$product = {"id":7414998171747,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Look - 大自然的傑作(錫安國家公園)","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-af14","description":null,"published_at":"2024-06-11T17:55:13+08:00","created_at":"2024-05-05T20:03:29+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區Look","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-look","device-iPhone 12 pro max","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-look","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":41910780788835,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-AF14","requires_shipping":true,"taxable":true,"featured_image":{"id":31487887605859,"product_id":7414998171747,"position":7,"created_at":"2024-05-05T20:03:46+08:00","updated_at":"2024-05-05T20:03:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f8a54dc1ba06fc6a74d63aead673b56cfd592d1_ad52e6b5-a1e9-4bc2-abc3-20d78e29d747.webp?v=1714910626","variant_ids":[41910780788835]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Look - 大自然的傑作(錫安國家公園) - 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-AF14","featured_media":{"alt":null,"id":23893231632483,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f8a54dc1ba06fc6a74d63aead673b56cfd592d1_ad52e6b5-a1e9-4bc2-abc3-20d78e29d747.webp?v=1714910626"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dfef5d60b840569f1b0b133b6148d3cec811d8a8_9c48dcce-3cd7-4800-a8f0-24f5c18698b0.webp?v=1714910611","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d99d7a3897ccf24b5156149267791dc397dd5fb3_757882e5-c3a0-4a4f-94d6-01061f98ffa2.webp?v=1714910614","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ced9799bd5a0152034185525b0bb8c645caa7ee_cdb1ecb6-b3e3-4843-9b27-69e61281c2d5.webp?v=1714910616","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/196ea1a2032906705c5e1656ecf0cc5316e4f319_c3422cea-f883-46a9-92f6-340b70cba0fb.webp?v=1714910619","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a308115bce844bca5f1c39bc4f1b3a520e079e4_fdc909e9-0ae1-464a-8c51-8f5e72573fee.webp?v=1714910621","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6598d2bd1a715775a6c5495c3789782e82f295a6_3f6e0dc3-1bef-4d65-8fa3-e965818cb4d8.webp?v=1714910623","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f8a54dc1ba06fc6a74d63aead673b56cfd592d1_ad52e6b5-a1e9-4bc2-abc3-20d78e29d747.webp?v=1714910626","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5cb3f4fb2ac7b3ad2741edcf39a1233e1b67ba98_dd9eebb4-07b7-4522-976b-2905146597bd.webp?v=1714910628","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a8fc31f8f690f5960d8eaf698394b6d77ff96ff_817a77f1-11b2-4329-b3ab-531dd25f8554.webp?v=1714910631","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0998e7836cd8e976927bab61ab85bd0bae72e8f0_148d165a-aa16-47c9-8a4a-c0749dd24019.webp?v=1714910633"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dfef5d60b840569f1b0b133b6148d3cec811d8a8_9c48dcce-3cd7-4800-a8f0-24f5c18698b0.webp?v=1714910611","options":["color"],"media":[{"alt":null,"id":23893227503715,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dfef5d60b840569f1b0b133b6148d3cec811d8a8_9c48dcce-3cd7-4800-a8f0-24f5c18698b0.webp?v=1714910611"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dfef5d60b840569f1b0b133b6148d3cec811d8a8_9c48dcce-3cd7-4800-a8f0-24f5c18698b0.webp?v=1714910611","width":2000},{"alt":null,"id":23893229076579,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d99d7a3897ccf24b5156149267791dc397dd5fb3_757882e5-c3a0-4a4f-94d6-01061f98ffa2.webp?v=1714910614"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d99d7a3897ccf24b5156149267791dc397dd5fb3_757882e5-c3a0-4a4f-94d6-01061f98ffa2.webp?v=1714910614","width":2000},{"alt":null,"id":23893229437027,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ced9799bd5a0152034185525b0bb8c645caa7ee_cdb1ecb6-b3e3-4843-9b27-69e61281c2d5.webp?v=1714910616"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ced9799bd5a0152034185525b0bb8c645caa7ee_cdb1ecb6-b3e3-4843-9b27-69e61281c2d5.webp?v=1714910616","width":2000},{"alt":null,"id":23893229863011,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/196ea1a2032906705c5e1656ecf0cc5316e4f319_c3422cea-f883-46a9-92f6-340b70cba0fb.webp?v=1714910619"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/196ea1a2032906705c5e1656ecf0cc5316e4f319_c3422cea-f883-46a9-92f6-340b70cba0fb.webp?v=1714910619","width":2000},{"alt":null,"id":23893230321763,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a308115bce844bca5f1c39bc4f1b3a520e079e4_fdc909e9-0ae1-464a-8c51-8f5e72573fee.webp?v=1714910621"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a308115bce844bca5f1c39bc4f1b3a520e079e4_fdc909e9-0ae1-464a-8c51-8f5e72573fee.webp?v=1714910621","width":2000},{"alt":null,"id":23893230846051,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6598d2bd1a715775a6c5495c3789782e82f295a6_3f6e0dc3-1bef-4d65-8fa3-e965818cb4d8.webp?v=1714910623"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6598d2bd1a715775a6c5495c3789782e82f295a6_3f6e0dc3-1bef-4d65-8fa3-e965818cb4d8.webp?v=1714910623","width":2000},{"alt":null,"id":23893231632483,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f8a54dc1ba06fc6a74d63aead673b56cfd592d1_ad52e6b5-a1e9-4bc2-abc3-20d78e29d747.webp?v=1714910626"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f8a54dc1ba06fc6a74d63aead673b56cfd592d1_ad52e6b5-a1e9-4bc2-abc3-20d78e29d747.webp?v=1714910626","width":2000},{"alt":null,"id":23893232058467,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5cb3f4fb2ac7b3ad2741edcf39a1233e1b67ba98_dd9eebb4-07b7-4522-976b-2905146597bd.webp?v=1714910628"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5cb3f4fb2ac7b3ad2741edcf39a1233e1b67ba98_dd9eebb4-07b7-4522-976b-2905146597bd.webp?v=1714910628","width":2000},{"alt":null,"id":23893232451683,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a8fc31f8f690f5960d8eaf698394b6d77ff96ff_817a77f1-11b2-4329-b3ab-531dd25f8554.webp?v=1714910631"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a8fc31f8f690f5960d8eaf698394b6d77ff96ff_817a77f1-11b2-4329-b3ab-531dd25f8554.webp?v=1714910631","width":2000},{"alt":null,"id":23893232975971,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0998e7836cd8e976927bab61ab85bd0bae72e8f0_148d165a-aa16-47c9-8a4a-c0749dd24019.webp?v=1714910633"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0998e7836cd8e976927bab61ab85bd0bae72e8f0_148d165a-aa16-47c9-8a4a-c0749dd24019.webp?v=1714910633","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$bumper = null;
$variants = [{"id":41910780788835,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-AF14","requires_shipping":true,"taxable":true,"featured_image":{"id":31487887605859,"product_id":7414998171747,"position":7,"created_at":"2024-05-05T20:03:46+08:00","updated_at":"2024-05-05T20:03:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f8a54dc1ba06fc6a74d63aead673b56cfd592d1_ad52e6b5-a1e9-4bc2-abc3-20d78e29d747.webp?v=1714910626","variant_ids":[41910780788835]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Look - 大自然的傑作(錫安國家公園) - 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-AF14","featured_media":{"alt":null,"id":23893231632483,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f8a54dc1ba06fc6a74d63aead673b56cfd592d1_ad52e6b5-a1e9-4bc2-abc3-20d78e29d747.webp?v=1714910626"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41910780788835,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-AF14","requires_shipping":true,"taxable":true,"featured_image":{"id":31487887605859,"product_id":7414998171747,"position":7,"created_at":"2024-05-05T20:03:46+08:00","updated_at":"2024-05-05T20:03:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f8a54dc1ba06fc6a74d63aead673b56cfd592d1_ad52e6b5-a1e9-4bc2-abc3-20d78e29d747.webp?v=1714910626","variant_ids":[41910780788835]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Look - 大自然的傑作(錫安國家公園) - 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-AF14","featured_media":{"alt":null,"id":23893231632483,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f8a54dc1ba06fc6a74d63aead673b56cfd592d1_ad52e6b5-a1e9-4bc2-abc3-20d78e29d747.webp?v=1714910626"}},"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: "停產"
}