$product = {"id":7415084515427,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Look - 願傷疤 有天開出花(亞馬遜雨林)","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-af01","description":null,"published_at":"2024-06-11T17:57:33+08:00","created_at":"2024-05-05T20:19:48+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":41911700553827,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-AF01","requires_shipping":true,"taxable":true,"featured_image":{"id":31488118030435,"product_id":7415084515427,"position":5,"created_at":"2024-05-05T20:20:01+08:00","updated_at":"2024-05-05T20:20:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7e7ad816e7ad976d388f271151ffa13e54beb591_a62175cc-37f2-4b1b-82c9-ea2117e617a2.webp?v=1714911601","variant_ids":[41911700553827]},"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-AF01","featured_media":{"alt":null,"id":23893462646883,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7e7ad816e7ad976d388f271151ffa13e54beb591_a62175cc-37f2-4b1b-82c9-ea2117e617a2.webp?v=1714911601"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd258036248313db4ff1a1ed805f24cba7274f5c_c0257cb6-ac61-4109-a5f5-5ee98c716c54.webp?v=1714911591","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8ea87f49a8a80119202ae147bfd85f8459c3a37_834a3421-761e-4378-a19e-fc69e2bf1179.webp?v=1714911593","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f245bcef55b36b8a46fd7fb026c567092fa6ff12_bb0fab8f-fb29-4ca6-a1f9-3a51275cbb0a.webp?v=1714911596","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e1ce86cfb4ec0b709bd22918ebd1df304d72d063_b3d83ec9-1d25-4545-93ec-6450047ffc23.webp?v=1714911598","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7e7ad816e7ad976d388f271151ffa13e54beb591_a62175cc-37f2-4b1b-82c9-ea2117e617a2.webp?v=1714911601","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe2d431e2e7981453b4e53edd925c8d9f7815a8a_cf50a6d6-06fa-43ff-bb6c-1fb64ec51f26.webp?v=1714911603","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/629ec6199bc81ee3df4da64f8e215efed2e91342_2b1dccbf-1138-43c5-8744-8d7dc897d600.webp?v=1714911606","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ff80b481f7323cb8a04139f57adc48ca2d0fb36_a8040b46-1757-464b-b8ee-0868ef09b4fb.webp?v=1714911608","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5fb4e6867c210544bd9689b83f0d6593f7f1a52_9d8484a0-e94a-46a3-8dcb-c089f4aca4c8.webp?v=1714911611","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/15128df7780ca73d1850ff6f0f6a2658fc0de473_b73bf6a2-eee5-4091-a38f-e4b4ddbaf273.webp?v=1714911613"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd258036248313db4ff1a1ed805f24cba7274f5c_c0257cb6-ac61-4109-a5f5-5ee98c716c54.webp?v=1714911591","options":["color"],"media":[{"alt":null,"id":23893459861603,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd258036248313db4ff1a1ed805f24cba7274f5c_c0257cb6-ac61-4109-a5f5-5ee98c716c54.webp?v=1714911591"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd258036248313db4ff1a1ed805f24cba7274f5c_c0257cb6-ac61-4109-a5f5-5ee98c716c54.webp?v=1714911591","width":2000},{"alt":null,"id":23893460582499,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8ea87f49a8a80119202ae147bfd85f8459c3a37_834a3421-761e-4378-a19e-fc69e2bf1179.webp?v=1714911593"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8ea87f49a8a80119202ae147bfd85f8459c3a37_834a3421-761e-4378-a19e-fc69e2bf1179.webp?v=1714911593","width":2000},{"alt":null,"id":23893461303395,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f245bcef55b36b8a46fd7fb026c567092fa6ff12_bb0fab8f-fb29-4ca6-a1f9-3a51275cbb0a.webp?v=1714911596"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f245bcef55b36b8a46fd7fb026c567092fa6ff12_bb0fab8f-fb29-4ca6-a1f9-3a51275cbb0a.webp?v=1714911596","width":2000},{"alt":null,"id":23893461794915,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e1ce86cfb4ec0b709bd22918ebd1df304d72d063_b3d83ec9-1d25-4545-93ec-6450047ffc23.webp?v=1714911598"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e1ce86cfb4ec0b709bd22918ebd1df304d72d063_b3d83ec9-1d25-4545-93ec-6450047ffc23.webp?v=1714911598","width":2000},{"alt":null,"id":23893462646883,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7e7ad816e7ad976d388f271151ffa13e54beb591_a62175cc-37f2-4b1b-82c9-ea2117e617a2.webp?v=1714911601"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7e7ad816e7ad976d388f271151ffa13e54beb591_a62175cc-37f2-4b1b-82c9-ea2117e617a2.webp?v=1714911601","width":2000},{"alt":null,"id":23893463269475,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe2d431e2e7981453b4e53edd925c8d9f7815a8a_cf50a6d6-06fa-43ff-bb6c-1fb64ec51f26.webp?v=1714911603"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe2d431e2e7981453b4e53edd925c8d9f7815a8a_cf50a6d6-06fa-43ff-bb6c-1fb64ec51f26.webp?v=1714911603","width":2000},{"alt":null,"id":23893464088675,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/629ec6199bc81ee3df4da64f8e215efed2e91342_2b1dccbf-1138-43c5-8744-8d7dc897d600.webp?v=1714911606"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/629ec6199bc81ee3df4da64f8e215efed2e91342_2b1dccbf-1138-43c5-8744-8d7dc897d600.webp?v=1714911606","width":2000},{"alt":null,"id":23893464449123,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ff80b481f7323cb8a04139f57adc48ca2d0fb36_a8040b46-1757-464b-b8ee-0868ef09b4fb.webp?v=1714911608"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ff80b481f7323cb8a04139f57adc48ca2d0fb36_a8040b46-1757-464b-b8ee-0868ef09b4fb.webp?v=1714911608","width":2000},{"alt":null,"id":23893465071715,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5fb4e6867c210544bd9689b83f0d6593f7f1a52_9d8484a0-e94a-46a3-8dcb-c089f4aca4c8.webp?v=1714911611"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5fb4e6867c210544bd9689b83f0d6593f7f1a52_9d8484a0-e94a-46a3-8dcb-c089f4aca4c8.webp?v=1714911611","width":2000},{"alt":null,"id":23893465530467,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/15128df7780ca73d1850ff6f0f6a2658fc0de473_b73bf6a2-eee5-4091-a38f-e4b4ddbaf273.webp?v=1714911613"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/15128df7780ca73d1850ff6f0f6a2658fc0de473_b73bf6a2-eee5-4091-a38f-e4b4ddbaf273.webp?v=1714911613","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41911700553827,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-AF01","requires_shipping":true,"taxable":true,"featured_image":{"id":31488118030435,"product_id":7415084515427,"position":5,"created_at":"2024-05-05T20:20:01+08:00","updated_at":"2024-05-05T20:20:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7e7ad816e7ad976d388f271151ffa13e54beb591_a62175cc-37f2-4b1b-82c9-ea2117e617a2.webp?v=1714911601","variant_ids":[41911700553827]},"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-AF01","featured_media":{"alt":null,"id":23893462646883,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7e7ad816e7ad976d388f271151ffa13e54beb591_a62175cc-37f2-4b1b-82c9-ea2117e617a2.webp?v=1714911601"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41911700553827,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-AF01","requires_shipping":true,"taxable":true,"featured_image":{"id":31488118030435,"product_id":7415084515427,"position":5,"created_at":"2024-05-05T20:20:01+08:00","updated_at":"2024-05-05T20:20:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7e7ad816e7ad976d388f271151ffa13e54beb591_a62175cc-37f2-4b1b-82c9-ea2117e617a2.webp?v=1714911601","variant_ids":[41911700553827]},"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-AF01","featured_media":{"alt":null,"id":23893462646883,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7e7ad816e7ad976d388f271151ffa13e54beb591_a62175cc-37f2-4b1b-82c9-ea2117e617a2.webp?v=1714911601"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}};
$device_handle = null;
$type = "";
var sellingStatus
if ($isMerge) {
$(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: "停產"
}