$product = {"id":7414993584227,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Batman - 經典Logo","handle":"iphone-12-mini-mod-nx-magsafe-printable-sb11","description":null,"published_at":"2024-06-11T17:55:06+08:00","created_at":"2024-05-05T20:02:33+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區Batman","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-batman","device-iPhone 12 mini","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-batman","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":41910724886627,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-SB11","requires_shipping":true,"taxable":true,"featured_image":{"id":31487876661347,"product_id":7414993584227,"position":10,"created_at":"2024-05-05T20:02:58+08:00","updated_at":"2024-05-05T20:02:58+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3bb89905580838b40bde0cb477fc00459b5eda2c_61807756-6cd4-4380-8595-af9c60d15794.webp?v=1714910578","variant_ids":[41910724886627]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Batman - 經典Logo - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-SB11","featured_media":{"alt":null,"id":23893220655203,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3bb89905580838b40bde0cb477fc00459b5eda2c_61807756-6cd4-4380-8595-af9c60d15794.webp?v=1714910578"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2982a750a934660ec6b5beac178d8b90e14ee234_a9018df1-deea-4d77-af1e-dae7b0b3491a.webp?v=1714910556","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ce9a4b68b8491665e4ccadd2fcedc7f9f7746fc7_0afd4dc0-f1a7-4b31-b160-3c0826b38e91.webp?v=1714910558","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50cb265c992402d82a1ed0ef7286863c070b1159_eccd5948-4898-4221-be26-d65beab4109f.webp?v=1714910561","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/241b28b90097479d0d7cd357c8e4c1c8523bec61_5b499d17-9667-4c88-b361-290b21992a15.webp?v=1714910563","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c68aa9afe546833c5f6f4ad252be4e170a93054_51d9bf42-1789-40ef-b179-552538834a38.webp?v=1714910566","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51e238718b62fb3c0f48648c8a866f2a51716ec3_743650bf-d64c-4215-b019-1d58ffb2e928.webp?v=1714910568","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a3bd9952bf901884e86775952bcdba1ba640e84_c4492949-8f35-4e09-9441-2569a625d8a4.webp?v=1714910571","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/279f1dbc9ce947c12fc840275d12392c490eb854_b47424fe-14cf-45fd-aeb9-0ed458fb6e6d.webp?v=1714910573","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b40e774996ddb41d41f62fbe214c0458e57ccf0_0838ae20-c2ce-4b72-ad57-625c74b0923d.webp?v=1714910575","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3bb89905580838b40bde0cb477fc00459b5eda2c_61807756-6cd4-4380-8595-af9c60d15794.webp?v=1714910578","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99c3b05c7521fb347bfc33b00598c5cdee7eb677_d86343d3-f8d8-4136-8fe6-d46b98d82813.webp?v=1714910580"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2982a750a934660ec6b5beac178d8b90e14ee234_a9018df1-deea-4d77-af1e-dae7b0b3491a.webp?v=1714910556","options":["color"],"media":[{"alt":null,"id":23893215084643,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2982a750a934660ec6b5beac178d8b90e14ee234_a9018df1-deea-4d77-af1e-dae7b0b3491a.webp?v=1714910556"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2982a750a934660ec6b5beac178d8b90e14ee234_a9018df1-deea-4d77-af1e-dae7b0b3491a.webp?v=1714910556","width":2000},{"alt":null,"id":23893215510627,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ce9a4b68b8491665e4ccadd2fcedc7f9f7746fc7_0afd4dc0-f1a7-4b31-b160-3c0826b38e91.webp?v=1714910558"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ce9a4b68b8491665e4ccadd2fcedc7f9f7746fc7_0afd4dc0-f1a7-4b31-b160-3c0826b38e91.webp?v=1714910558","width":2000},{"alt":null,"id":23893216297059,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50cb265c992402d82a1ed0ef7286863c070b1159_eccd5948-4898-4221-be26-d65beab4109f.webp?v=1714910561"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50cb265c992402d82a1ed0ef7286863c070b1159_eccd5948-4898-4221-be26-d65beab4109f.webp?v=1714910561","width":2000},{"alt":null,"id":23893216821347,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/241b28b90097479d0d7cd357c8e4c1c8523bec61_5b499d17-9667-4c88-b361-290b21992a15.webp?v=1714910563"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/241b28b90097479d0d7cd357c8e4c1c8523bec61_5b499d17-9667-4c88-b361-290b21992a15.webp?v=1714910563","width":2000},{"alt":null,"id":23893217640547,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c68aa9afe546833c5f6f4ad252be4e170a93054_51d9bf42-1789-40ef-b179-552538834a38.webp?v=1714910566"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c68aa9afe546833c5f6f4ad252be4e170a93054_51d9bf42-1789-40ef-b179-552538834a38.webp?v=1714910566","width":2000},{"alt":null,"id":23893218132067,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51e238718b62fb3c0f48648c8a866f2a51716ec3_743650bf-d64c-4215-b019-1d58ffb2e928.webp?v=1714910568"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51e238718b62fb3c0f48648c8a866f2a51716ec3_743650bf-d64c-4215-b019-1d58ffb2e928.webp?v=1714910568","width":2000},{"alt":null,"id":23893218689123,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a3bd9952bf901884e86775952bcdba1ba640e84_c4492949-8f35-4e09-9441-2569a625d8a4.webp?v=1714910571"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a3bd9952bf901884e86775952bcdba1ba640e84_c4492949-8f35-4e09-9441-2569a625d8a4.webp?v=1714910571","width":2000},{"alt":null,"id":23893219147875,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/279f1dbc9ce947c12fc840275d12392c490eb854_b47424fe-14cf-45fd-aeb9-0ed458fb6e6d.webp?v=1714910573"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/279f1dbc9ce947c12fc840275d12392c490eb854_b47424fe-14cf-45fd-aeb9-0ed458fb6e6d.webp?v=1714910573","width":2000},{"alt":null,"id":23893219967075,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b40e774996ddb41d41f62fbe214c0458e57ccf0_0838ae20-c2ce-4b72-ad57-625c74b0923d.webp?v=1714910575"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b40e774996ddb41d41f62fbe214c0458e57ccf0_0838ae20-c2ce-4b72-ad57-625c74b0923d.webp?v=1714910575","width":2000},{"alt":null,"id":23893220655203,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3bb89905580838b40bde0cb477fc00459b5eda2c_61807756-6cd4-4380-8595-af9c60d15794.webp?v=1714910578"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3bb89905580838b40bde0cb477fc00459b5eda2c_61807756-6cd4-4380-8595-af9c60d15794.webp?v=1714910578","width":2000},{"alt":null,"id":23893221310563,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99c3b05c7521fb347bfc33b00598c5cdee7eb677_d86343d3-f8d8-4136-8fe6-d46b98d82813.webp?v=1714910580"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99c3b05c7521fb347bfc33b00598c5cdee7eb677_d86343d3-f8d8-4136-8fe6-d46b98d82813.webp?v=1714910580","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41910724886627,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-SB11","requires_shipping":true,"taxable":true,"featured_image":{"id":31487876661347,"product_id":7414993584227,"position":10,"created_at":"2024-05-05T20:02:58+08:00","updated_at":"2024-05-05T20:02:58+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3bb89905580838b40bde0cb477fc00459b5eda2c_61807756-6cd4-4380-8595-af9c60d15794.webp?v=1714910578","variant_ids":[41910724886627]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Batman - 經典Logo - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-SB11","featured_media":{"alt":null,"id":23893220655203,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3bb89905580838b40bde0cb477fc00459b5eda2c_61807756-6cd4-4380-8595-af9c60d15794.webp?v=1714910578"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41910724886627,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-SB11","requires_shipping":true,"taxable":true,"featured_image":{"id":31487876661347,"product_id":7414993584227,"position":10,"created_at":"2024-05-05T20:02:58+08:00","updated_at":"2024-05-05T20:02:58+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3bb89905580838b40bde0cb477fc00459b5eda2c_61807756-6cd4-4380-8595-af9c60d15794.webp?v=1714910578","variant_ids":[41910724886627]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Batman - 經典Logo - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-SB11","featured_media":{"alt":null,"id":23893220655203,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3bb89905580838b40bde0cb477fc00459b5eda2c_61807756-6cd4-4380-8595-af9c60d15794.webp?v=1714910578"}},"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: "停產"
}