$product = {"id":7415105126499,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Look - 大自然的傑作(大堡礁)","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-af11","description":null,"published_at":"2024-06-11T17:58:06+08:00","created_at":"2024-05-05T20:23:50+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":41911922786403,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-AF11","requires_shipping":true,"taxable":true,"featured_image":{"id":31488175308899,"product_id":7415105126499,"position":5,"created_at":"2024-05-05T20:24:03+08:00","updated_at":"2024-05-05T20:24:03+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ffeb04e3d0097fa7d08b14164eeddc8eab19824_699e3354-ac9e-4539-b348-d4c8a0b59863.webp?v=1714911843","variant_ids":[41911922786403]},"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-AF11","featured_media":{"alt":null,"id":23893519990883,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ffeb04e3d0097fa7d08b14164eeddc8eab19824_699e3354-ac9e-4539-b348-d4c8a0b59863.webp?v=1714911843"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6dcd3e002df053d54926f7a2b668a629e891e8f_d0499d35-55f9-42d9-924a-1d12fb51b29e.webp?v=1714911833","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc77d63224d01ae0bb2010be29f48979c965a255_7604269b-d95d-454c-b879-8ac83f4bef90.webp?v=1714911835","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3990afbda3314b567db770505b060097db3d7a3_c9f5ba29-af26-4f1e-a82f-bfc92c697a21.webp?v=1714911838","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e734d9315f6648ce60aa9e498a8581192db582a9_2bc3f856-eecf-470f-907e-053fd7c50aa6.webp?v=1714911840","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ffeb04e3d0097fa7d08b14164eeddc8eab19824_699e3354-ac9e-4539-b348-d4c8a0b59863.webp?v=1714911843","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf4589504d37d360b7141af6130e3d4a52fd20cb_0fd1ec7d-922b-43e8-9ad8-875cba6a977f.webp?v=1714911845","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cee482b047b4bce632ddeed1347e3847b1dea5fc_02e32491-820a-431e-9196-e17efc52cb74.webp?v=1714911847","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6cfb6abb1e6bd760350dd56a7c30ba3c69723566_fe6a2361-b548-45d6-86e7-2c91fde6890d.webp?v=1714911850","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d9c015a8dd070c9ff45262d32f9cd48825693005_70d52ffa-f817-490a-ac07-fb394c480315.webp?v=1714911852","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62c81946eaa07d1be36afd5c46a1bef9eaed04a1_d6797ab4-f113-4683-b3c8-8c1fddc2e64b.webp?v=1714911855"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6dcd3e002df053d54926f7a2b668a629e891e8f_d0499d35-55f9-42d9-924a-1d12fb51b29e.webp?v=1714911833","options":["color"],"media":[{"alt":null,"id":23893517434979,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6dcd3e002df053d54926f7a2b668a629e891e8f_d0499d35-55f9-42d9-924a-1d12fb51b29e.webp?v=1714911833"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6dcd3e002df053d54926f7a2b668a629e891e8f_d0499d35-55f9-42d9-924a-1d12fb51b29e.webp?v=1714911833","width":2000},{"alt":null,"id":23893518483555,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc77d63224d01ae0bb2010be29f48979c965a255_7604269b-d95d-454c-b879-8ac83f4bef90.webp?v=1714911835"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc77d63224d01ae0bb2010be29f48979c965a255_7604269b-d95d-454c-b879-8ac83f4bef90.webp?v=1714911835","width":2000},{"alt":null,"id":23893519040611,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3990afbda3314b567db770505b060097db3d7a3_c9f5ba29-af26-4f1e-a82f-bfc92c697a21.webp?v=1714911838"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3990afbda3314b567db770505b060097db3d7a3_c9f5ba29-af26-4f1e-a82f-bfc92c697a21.webp?v=1714911838","width":2000},{"alt":null,"id":23893519401059,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e734d9315f6648ce60aa9e498a8581192db582a9_2bc3f856-eecf-470f-907e-053fd7c50aa6.webp?v=1714911840"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e734d9315f6648ce60aa9e498a8581192db582a9_2bc3f856-eecf-470f-907e-053fd7c50aa6.webp?v=1714911840","width":2000},{"alt":null,"id":23893519990883,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ffeb04e3d0097fa7d08b14164eeddc8eab19824_699e3354-ac9e-4539-b348-d4c8a0b59863.webp?v=1714911843"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ffeb04e3d0097fa7d08b14164eeddc8eab19824_699e3354-ac9e-4539-b348-d4c8a0b59863.webp?v=1714911843","width":2000},{"alt":null,"id":23893520580707,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf4589504d37d360b7141af6130e3d4a52fd20cb_0fd1ec7d-922b-43e8-9ad8-875cba6a977f.webp?v=1714911845"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf4589504d37d360b7141af6130e3d4a52fd20cb_0fd1ec7d-922b-43e8-9ad8-875cba6a977f.webp?v=1714911845","width":2000},{"alt":null,"id":23893521039459,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cee482b047b4bce632ddeed1347e3847b1dea5fc_02e32491-820a-431e-9196-e17efc52cb74.webp?v=1714911847"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cee482b047b4bce632ddeed1347e3847b1dea5fc_02e32491-820a-431e-9196-e17efc52cb74.webp?v=1714911847","width":2000},{"alt":null,"id":23893521989731,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6cfb6abb1e6bd760350dd56a7c30ba3c69723566_fe6a2361-b548-45d6-86e7-2c91fde6890d.webp?v=1714911850"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6cfb6abb1e6bd760350dd56a7c30ba3c69723566_fe6a2361-b548-45d6-86e7-2c91fde6890d.webp?v=1714911850","width":2000},{"alt":null,"id":23893522481251,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d9c015a8dd070c9ff45262d32f9cd48825693005_70d52ffa-f817-490a-ac07-fb394c480315.webp?v=1714911852"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d9c015a8dd070c9ff45262d32f9cd48825693005_70d52ffa-f817-490a-ac07-fb394c480315.webp?v=1714911852","width":2000},{"alt":null,"id":23893523071075,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62c81946eaa07d1be36afd5c46a1bef9eaed04a1_d6797ab4-f113-4683-b3c8-8c1fddc2e64b.webp?v=1714911855"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62c81946eaa07d1be36afd5c46a1bef9eaed04a1_d6797ab4-f113-4683-b3c8-8c1fddc2e64b.webp?v=1714911855","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41911922786403,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-AF11","requires_shipping":true,"taxable":true,"featured_image":{"id":31488175308899,"product_id":7415105126499,"position":5,"created_at":"2024-05-05T20:24:03+08:00","updated_at":"2024-05-05T20:24:03+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ffeb04e3d0097fa7d08b14164eeddc8eab19824_699e3354-ac9e-4539-b348-d4c8a0b59863.webp?v=1714911843","variant_ids":[41911922786403]},"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-AF11","featured_media":{"alt":null,"id":23893519990883,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ffeb04e3d0097fa7d08b14164eeddc8eab19824_699e3354-ac9e-4539-b348-d4c8a0b59863.webp?v=1714911843"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41911922786403,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-AF11","requires_shipping":true,"taxable":true,"featured_image":{"id":31488175308899,"product_id":7415105126499,"position":5,"created_at":"2024-05-05T20:24:03+08:00","updated_at":"2024-05-05T20:24:03+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ffeb04e3d0097fa7d08b14164eeddc8eab19824_699e3354-ac9e-4539-b348-d4c8a0b59863.webp?v=1714911843","variant_ids":[41911922786403]},"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-AF11","featured_media":{"alt":null,"id":23893519990883,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ffeb04e3d0097fa7d08b14164eeddc8eab19824_699e3354-ac9e-4539-b348-d4c8a0b59863.webp?v=1714911843"}},"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: "停產"
}