$product = {"id":7415048601699,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Batman - Logo貼紙款","handle":"iphone-12-mini-mod-nx-magsafe-printable-sb04","description":null,"published_at":"2024-06-11T17:56:35+08:00","created_at":"2024-05-05T20:13:10+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":41911325425763,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-SB04","requires_shipping":true,"taxable":true,"featured_image":{"id":31488023887971,"product_id":7415048601699,"position":10,"created_at":"2024-05-05T20:13:35+08:00","updated_at":"2024-05-05T20:13:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/915af05e488d879cb6bc946989d572c4eded03dd_297181c0-b0ea-4635-bc6d-e2dd838ddf89.webp?v=1714911215","variant_ids":[41911325425763]},"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-SB04","featured_media":{"alt":null,"id":23893368275043,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/915af05e488d879cb6bc946989d572c4eded03dd_297181c0-b0ea-4635-bc6d-e2dd838ddf89.webp?v=1714911215"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78f4e5856bae0286951581478c2ed6c32401ca6a_ce53aae7-6fa6-443f-854c-e498056e73e9.webp?v=1714911192","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71aff18b4c9e179fabfbe2d3f9f11ed8ffba24dd_8e88c76b-2e77-4230-9d47-d4439e0b3c3a.webp?v=1714911195","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ccfc7dbf5e6f89807e2a730aa64ae573ebfbe90b_74f3b558-4b68-4c89-89d4-7cef595c2ea8.webp?v=1714911197","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bfdbd1baa4cc2f3088c3956669d7cf06d4768a6d_25fa7a83-dde7-4dfe-8207-bba8e26587a6.webp?v=1714911200","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40114d7b1f8d5a0d4495455c20af6480a34863f0_d38c3f5f-a99e-4f6c-8c3e-55737437f2a7.webp?v=1714911202","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e8a7f500f76f881c0d593c34fea348529ec44a25_0b73dae1-9207-4c87-a484-8421b8bda201.webp?v=1714911205","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c9831ee49052c3f7d4bc0cb4519eedbc83b336c_d976157e-52be-4b73-9636-f3e5d60eb494.webp?v=1714911207","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/421b1958fabd9cfda375c22caad868d14e9c8d8c_f09d518e-d56a-4379-bddf-ac52026e902a.webp?v=1714911210","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd56f2d7036cf3b13b32abd3246be9ef25f4ae53_144c6151-fec4-41e2-a327-c44cf19728d4.webp?v=1714911212","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/915af05e488d879cb6bc946989d572c4eded03dd_297181c0-b0ea-4635-bc6d-e2dd838ddf89.webp?v=1714911215","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c10502a8cb09812235cc26163cba169b356ee522_9a54fb67-a712-470b-86ba-72b1f5e6dfd6.webp?v=1714911218"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78f4e5856bae0286951581478c2ed6c32401ca6a_ce53aae7-6fa6-443f-854c-e498056e73e9.webp?v=1714911192","options":["color"],"media":[{"alt":null,"id":23893363228771,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78f4e5856bae0286951581478c2ed6c32401ca6a_ce53aae7-6fa6-443f-854c-e498056e73e9.webp?v=1714911192"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78f4e5856bae0286951581478c2ed6c32401ca6a_ce53aae7-6fa6-443f-854c-e498056e73e9.webp?v=1714911192","width":2000},{"alt":null,"id":23893363785827,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71aff18b4c9e179fabfbe2d3f9f11ed8ffba24dd_8e88c76b-2e77-4230-9d47-d4439e0b3c3a.webp?v=1714911195"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71aff18b4c9e179fabfbe2d3f9f11ed8ffba24dd_8e88c76b-2e77-4230-9d47-d4439e0b3c3a.webp?v=1714911195","width":2000},{"alt":null,"id":23893364146275,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ccfc7dbf5e6f89807e2a730aa64ae573ebfbe90b_74f3b558-4b68-4c89-89d4-7cef595c2ea8.webp?v=1714911197"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ccfc7dbf5e6f89807e2a730aa64ae573ebfbe90b_74f3b558-4b68-4c89-89d4-7cef595c2ea8.webp?v=1714911197","width":2000},{"alt":null,"id":23893364736099,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bfdbd1baa4cc2f3088c3956669d7cf06d4768a6d_25fa7a83-dde7-4dfe-8207-bba8e26587a6.webp?v=1714911200"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bfdbd1baa4cc2f3088c3956669d7cf06d4768a6d_25fa7a83-dde7-4dfe-8207-bba8e26587a6.webp?v=1714911200","width":2000},{"alt":null,"id":23893365063779,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40114d7b1f8d5a0d4495455c20af6480a34863f0_d38c3f5f-a99e-4f6c-8c3e-55737437f2a7.webp?v=1714911202"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40114d7b1f8d5a0d4495455c20af6480a34863f0_d38c3f5f-a99e-4f6c-8c3e-55737437f2a7.webp?v=1714911202","width":2000},{"alt":null,"id":23893365620835,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e8a7f500f76f881c0d593c34fea348529ec44a25_0b73dae1-9207-4c87-a484-8421b8bda201.webp?v=1714911205"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e8a7f500f76f881c0d593c34fea348529ec44a25_0b73dae1-9207-4c87-a484-8421b8bda201.webp?v=1714911205","width":2000},{"alt":null,"id":23893366538339,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c9831ee49052c3f7d4bc0cb4519eedbc83b336c_d976157e-52be-4b73-9636-f3e5d60eb494.webp?v=1714911207"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c9831ee49052c3f7d4bc0cb4519eedbc83b336c_d976157e-52be-4b73-9636-f3e5d60eb494.webp?v=1714911207","width":2000},{"alt":null,"id":23893367029859,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/421b1958fabd9cfda375c22caad868d14e9c8d8c_f09d518e-d56a-4379-bddf-ac52026e902a.webp?v=1714911210"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/421b1958fabd9cfda375c22caad868d14e9c8d8c_f09d518e-d56a-4379-bddf-ac52026e902a.webp?v=1714911210","width":2000},{"alt":null,"id":23893367455843,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd56f2d7036cf3b13b32abd3246be9ef25f4ae53_144c6151-fec4-41e2-a327-c44cf19728d4.webp?v=1714911212"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd56f2d7036cf3b13b32abd3246be9ef25f4ae53_144c6151-fec4-41e2-a327-c44cf19728d4.webp?v=1714911212","width":2000},{"alt":null,"id":23893368275043,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/915af05e488d879cb6bc946989d572c4eded03dd_297181c0-b0ea-4635-bc6d-e2dd838ddf89.webp?v=1714911215"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/915af05e488d879cb6bc946989d572c4eded03dd_297181c0-b0ea-4635-bc6d-e2dd838ddf89.webp?v=1714911215","width":2000},{"alt":null,"id":23893368832099,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c10502a8cb09812235cc26163cba169b356ee522_9a54fb67-a712-470b-86ba-72b1f5e6dfd6.webp?v=1714911218"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c10502a8cb09812235cc26163cba169b356ee522_9a54fb67-a712-470b-86ba-72b1f5e6dfd6.webp?v=1714911218","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41911325425763,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-SB04","requires_shipping":true,"taxable":true,"featured_image":{"id":31488023887971,"product_id":7415048601699,"position":10,"created_at":"2024-05-05T20:13:35+08:00","updated_at":"2024-05-05T20:13:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/915af05e488d879cb6bc946989d572c4eded03dd_297181c0-b0ea-4635-bc6d-e2dd838ddf89.webp?v=1714911215","variant_ids":[41911325425763]},"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-SB04","featured_media":{"alt":null,"id":23893368275043,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/915af05e488d879cb6bc946989d572c4eded03dd_297181c0-b0ea-4635-bc6d-e2dd838ddf89.webp?v=1714911215"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41911325425763,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-SB04","requires_shipping":true,"taxable":true,"featured_image":{"id":31488023887971,"product_id":7415048601699,"position":10,"created_at":"2024-05-05T20:13:35+08:00","updated_at":"2024-05-05T20:13:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/915af05e488d879cb6bc946989d572c4eded03dd_297181c0-b0ea-4635-bc6d-e2dd838ddf89.webp?v=1714911215","variant_ids":[41911325425763]},"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-SB04","featured_media":{"alt":null,"id":23893368275043,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/915af05e488d879cb6bc946989d572c4eded03dd_297181c0-b0ea-4635-bc6d-e2dd838ddf89.webp?v=1714911215"}},"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: "停產"
}