$product = {"id":7415073833059,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Look - 願傷疤 有天開出花(泰國林地濫伐)","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-af04","description":null,"published_at":"2024-06-11T17:57:15+08:00","created_at":"2024-05-05T20:17:43+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":41911587438691,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-AF04","requires_shipping":true,"taxable":true,"featured_image":{"id":31488088604771,"product_id":7415073833059,"position":8,"created_at":"2024-05-05T20:18:03+08:00","updated_at":"2024-05-05T20:18:03+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/324c031dce1add3c19f462b5ef644eaf5781d4da_00ceea14-1d02-42ef-828c-6dd59ed12e98.webp?v=1714911483","variant_ids":[41911587438691]},"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-AF04","featured_media":{"alt":null,"id":23893433188451,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/324c031dce1add3c19f462b5ef644eaf5781d4da_00ceea14-1d02-42ef-828c-6dd59ed12e98.webp?v=1714911483"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c2e71985a1ee602b4d0dd1a0c8ef1929f486d98_7908dded-100b-4a8e-a6e6-bfba68da087c.webp?v=1714911466","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/461efcb5ea9d1d4a4eef5fad546321345a826e12_fcc865da-0456-426d-b366-f34175adac45.webp?v=1714911468","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65f215506ca76e779f1475f4c1f86a6a61e62ac0_622161fb-477f-4174-ad81-0e1d4eef6b2f.webp?v=1714911470","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6847383edbc11d1cb94403f8c9bff9c1563314be_843f96d4-099f-4b85-bf4d-4527f193c71b.webp?v=1714911473","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/535d9ff93162c847b890d21ca0d9044a9525f7a8_b7757616-e43a-46f4-854d-cd2842b01b7a.webp?v=1714911475","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99347e0c8828141dda7446547c3811e6481dcd5b_c9696a9c-c074-4149-b809-3c9fc7d6f4d0.webp?v=1714911477","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb1f8d8587a3c5c6558c8efdedfd9440d44d7f21_ec562758-0b8e-4989-b19f-a1b44daa425e.webp?v=1714911480","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/324c031dce1add3c19f462b5ef644eaf5781d4da_00ceea14-1d02-42ef-828c-6dd59ed12e98.webp?v=1714911483","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/04c85123e1b5ec7cbed7cb5a3973a0d64e2a03f6_4336f8b6-49b7-446e-aec7-c2ba3be2fd12.webp?v=1714911485","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65380205de42d85a28ed7da2fccb2e53647f404b_f54228f3-d77d-4fa8-9530-4b4309eb9877.webp?v=1714911488"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c2e71985a1ee602b4d0dd1a0c8ef1929f486d98_7908dded-100b-4a8e-a6e6-bfba68da087c.webp?v=1714911466","options":["color"],"media":[{"alt":null,"id":23893429747811,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c2e71985a1ee602b4d0dd1a0c8ef1929f486d98_7908dded-100b-4a8e-a6e6-bfba68da087c.webp?v=1714911466"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c2e71985a1ee602b4d0dd1a0c8ef1929f486d98_7908dded-100b-4a8e-a6e6-bfba68da087c.webp?v=1714911466","width":2000},{"alt":null,"id":23893430206563,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/461efcb5ea9d1d4a4eef5fad546321345a826e12_fcc865da-0456-426d-b366-f34175adac45.webp?v=1714911468"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/461efcb5ea9d1d4a4eef5fad546321345a826e12_fcc865da-0456-426d-b366-f34175adac45.webp?v=1714911468","width":2000},{"alt":null,"id":23893430534243,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65f215506ca76e779f1475f4c1f86a6a61e62ac0_622161fb-477f-4174-ad81-0e1d4eef6b2f.webp?v=1714911470"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65f215506ca76e779f1475f4c1f86a6a61e62ac0_622161fb-477f-4174-ad81-0e1d4eef6b2f.webp?v=1714911470","width":2000},{"alt":null,"id":23893431091299,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6847383edbc11d1cb94403f8c9bff9c1563314be_843f96d4-099f-4b85-bf4d-4527f193c71b.webp?v=1714911473"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6847383edbc11d1cb94403f8c9bff9c1563314be_843f96d4-099f-4b85-bf4d-4527f193c71b.webp?v=1714911473","width":2000},{"alt":null,"id":23893431451747,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/535d9ff93162c847b890d21ca0d9044a9525f7a8_b7757616-e43a-46f4-854d-cd2842b01b7a.webp?v=1714911475"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/535d9ff93162c847b890d21ca0d9044a9525f7a8_b7757616-e43a-46f4-854d-cd2842b01b7a.webp?v=1714911475","width":2000},{"alt":null,"id":23893432303715,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99347e0c8828141dda7446547c3811e6481dcd5b_c9696a9c-c074-4149-b809-3c9fc7d6f4d0.webp?v=1714911477"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99347e0c8828141dda7446547c3811e6481dcd5b_c9696a9c-c074-4149-b809-3c9fc7d6f4d0.webp?v=1714911477","width":2000},{"alt":null,"id":23893432762467,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb1f8d8587a3c5c6558c8efdedfd9440d44d7f21_ec562758-0b8e-4989-b19f-a1b44daa425e.webp?v=1714911480"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb1f8d8587a3c5c6558c8efdedfd9440d44d7f21_ec562758-0b8e-4989-b19f-a1b44daa425e.webp?v=1714911480","width":2000},{"alt":null,"id":23893433188451,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/324c031dce1add3c19f462b5ef644eaf5781d4da_00ceea14-1d02-42ef-828c-6dd59ed12e98.webp?v=1714911483"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/324c031dce1add3c19f462b5ef644eaf5781d4da_00ceea14-1d02-42ef-828c-6dd59ed12e98.webp?v=1714911483","width":2000},{"alt":null,"id":23893434171491,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/04c85123e1b5ec7cbed7cb5a3973a0d64e2a03f6_4336f8b6-49b7-446e-aec7-c2ba3be2fd12.webp?v=1714911485"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/04c85123e1b5ec7cbed7cb5a3973a0d64e2a03f6_4336f8b6-49b7-446e-aec7-c2ba3be2fd12.webp?v=1714911485","width":2000},{"alt":null,"id":23893434630243,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65380205de42d85a28ed7da2fccb2e53647f404b_f54228f3-d77d-4fa8-9530-4b4309eb9877.webp?v=1714911488"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65380205de42d85a28ed7da2fccb2e53647f404b_f54228f3-d77d-4fa8-9530-4b4309eb9877.webp?v=1714911488","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41911587438691,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-AF04","requires_shipping":true,"taxable":true,"featured_image":{"id":31488088604771,"product_id":7415073833059,"position":8,"created_at":"2024-05-05T20:18:03+08:00","updated_at":"2024-05-05T20:18:03+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/324c031dce1add3c19f462b5ef644eaf5781d4da_00ceea14-1d02-42ef-828c-6dd59ed12e98.webp?v=1714911483","variant_ids":[41911587438691]},"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-AF04","featured_media":{"alt":null,"id":23893433188451,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/324c031dce1add3c19f462b5ef644eaf5781d4da_00ceea14-1d02-42ef-828c-6dd59ed12e98.webp?v=1714911483"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41911587438691,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-AF04","requires_shipping":true,"taxable":true,"featured_image":{"id":31488088604771,"product_id":7415073833059,"position":8,"created_at":"2024-05-05T20:18:03+08:00","updated_at":"2024-05-05T20:18:03+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/324c031dce1add3c19f462b5ef644eaf5781d4da_00ceea14-1d02-42ef-828c-6dd59ed12e98.webp?v=1714911483","variant_ids":[41911587438691]},"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-AF04","featured_media":{"alt":null,"id":23893433188451,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/324c031dce1add3c19f462b5ef644eaf5781d4da_00ceea14-1d02-42ef-828c-6dd59ed12e98.webp?v=1714911483"}},"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: "停產"
}