$product = {"id":7415106207843,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - R2D2-剪紙系列","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb57","description":null,"published_at":"2024-06-11T17:58:07+08:00","created_at":"2024-05-05T20:24:03+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 12 mini","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-star-wars","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":41911935598691,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB57","requires_shipping":true,"taxable":true,"featured_image":{"id":31488180158563,"product_id":7415106207843,"position":9,"created_at":"2024-05-05T20:24:24+08:00","updated_at":"2024-05-05T20:24:24+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c196b0f1e21de20fce46eb17821cf958cacbbd4_f449a63a-7e14-4844-ab97-5d8c36ae3a99.webp?v=1714911864","variant_ids":[41911935598691]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - R2D2-剪紙系列 - 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-PB57","featured_media":{"alt":null,"id":23893524775011,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c196b0f1e21de20fce46eb17821cf958cacbbd4_f449a63a-7e14-4844-ab97-5d8c36ae3a99.webp?v=1714911864"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/55a650a134fdd79027213674d5adc30b81c517f3_a5503341-e649-41c5-9879-3411133e8ab9.webp?v=1714911845","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79696396a3c7ae18f9c6e3dd3e04395e28fa6021_fc4d7d3c-18be-4d78-8653-094b85527194.webp?v=1714911847","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c9cd9f1b9e7a68f16d939ec9817612928a3d2f81_9a775d1d-39eb-4423-98ea-46e1f8a00eb8.webp?v=1714911850","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03f3ce892da81db891d2921d9234dd25a292289e_4d06515c-3a3b-4e17-acc4-398abee835d2.webp?v=1714911852","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b7aec016f8575a45da3438e6626d03b4bcf376b_e282af1e-f79b-420a-9981-377e94b4fe35.webp?v=1714911854","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8628ba32a7530d39a58f4efd0183704b7d044b81_091b1827-eae5-4aed-8526-73c6656a6992.webp?v=1714911857","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f694f8c0f145678442d901c0ef7a20b63f5b3c3_69fb2cfd-2cd6-4722-ba5e-b78675df3087.webp?v=1714911859","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3ffffa1b17afe7e176845ed8392dcbb1dae8f687_24aaed78-d05b-45ac-82f4-1d9055d3d7ee.webp?v=1714911861","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c196b0f1e21de20fce46eb17821cf958cacbbd4_f449a63a-7e14-4844-ab97-5d8c36ae3a99.webp?v=1714911864","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/016c1e59f2eb22bde77ffe89187198584fc6e98a_c43771c8-b1b9-4240-b11c-15223f4a4317.webp?v=1714911866","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e554a3cbcb8f30a9678d6e77a05a95c42ed91ce4_718ffcae-2003-442f-b13c-835b0b2c1937.webp?v=1714911869"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/55a650a134fdd79027213674d5adc30b81c517f3_a5503341-e649-41c5-9879-3411133e8ab9.webp?v=1714911845","options":["color"],"media":[{"alt":null,"id":23893520547939,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/55a650a134fdd79027213674d5adc30b81c517f3_a5503341-e649-41c5-9879-3411133e8ab9.webp?v=1714911845"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/55a650a134fdd79027213674d5adc30b81c517f3_a5503341-e649-41c5-9879-3411133e8ab9.webp?v=1714911845","width":2000},{"alt":null,"id":23893521072227,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79696396a3c7ae18f9c6e3dd3e04395e28fa6021_fc4d7d3c-18be-4d78-8653-094b85527194.webp?v=1714911847"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79696396a3c7ae18f9c6e3dd3e04395e28fa6021_fc4d7d3c-18be-4d78-8653-094b85527194.webp?v=1714911847","width":2000},{"alt":null,"id":23893521924195,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c9cd9f1b9e7a68f16d939ec9817612928a3d2f81_9a775d1d-39eb-4423-98ea-46e1f8a00eb8.webp?v=1714911850"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c9cd9f1b9e7a68f16d939ec9817612928a3d2f81_9a775d1d-39eb-4423-98ea-46e1f8a00eb8.webp?v=1714911850","width":2000},{"alt":null,"id":23893522415715,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03f3ce892da81db891d2921d9234dd25a292289e_4d06515c-3a3b-4e17-acc4-398abee835d2.webp?v=1714911852"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03f3ce892da81db891d2921d9234dd25a292289e_4d06515c-3a3b-4e17-acc4-398abee835d2.webp?v=1714911852","width":2000},{"alt":null,"id":23893522841699,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b7aec016f8575a45da3438e6626d03b4bcf376b_e282af1e-f79b-420a-9981-377e94b4fe35.webp?v=1714911854"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b7aec016f8575a45da3438e6626d03b4bcf376b_e282af1e-f79b-420a-9981-377e94b4fe35.webp?v=1714911854","width":2000},{"alt":null,"id":23893523333219,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8628ba32a7530d39a58f4efd0183704b7d044b81_091b1827-eae5-4aed-8526-73c6656a6992.webp?v=1714911857"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8628ba32a7530d39a58f4efd0183704b7d044b81_091b1827-eae5-4aed-8526-73c6656a6992.webp?v=1714911857","width":2000},{"alt":null,"id":23893523726435,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f694f8c0f145678442d901c0ef7a20b63f5b3c3_69fb2cfd-2cd6-4722-ba5e-b78675df3087.webp?v=1714911859"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f694f8c0f145678442d901c0ef7a20b63f5b3c3_69fb2cfd-2cd6-4722-ba5e-b78675df3087.webp?v=1714911859","width":2000},{"alt":null,"id":23893524283491,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3ffffa1b17afe7e176845ed8392dcbb1dae8f687_24aaed78-d05b-45ac-82f4-1d9055d3d7ee.webp?v=1714911861"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3ffffa1b17afe7e176845ed8392dcbb1dae8f687_24aaed78-d05b-45ac-82f4-1d9055d3d7ee.webp?v=1714911861","width":2000},{"alt":null,"id":23893524775011,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c196b0f1e21de20fce46eb17821cf958cacbbd4_f449a63a-7e14-4844-ab97-5d8c36ae3a99.webp?v=1714911864"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c196b0f1e21de20fce46eb17821cf958cacbbd4_f449a63a-7e14-4844-ab97-5d8c36ae3a99.webp?v=1714911864","width":2000},{"alt":null,"id":23893525561443,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/016c1e59f2eb22bde77ffe89187198584fc6e98a_c43771c8-b1b9-4240-b11c-15223f4a4317.webp?v=1714911866"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/016c1e59f2eb22bde77ffe89187198584fc6e98a_c43771c8-b1b9-4240-b11c-15223f4a4317.webp?v=1714911866","width":2000},{"alt":null,"id":23893526151267,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e554a3cbcb8f30a9678d6e77a05a95c42ed91ce4_718ffcae-2003-442f-b13c-835b0b2c1937.webp?v=1714911869"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e554a3cbcb8f30a9678d6e77a05a95c42ed91ce4_718ffcae-2003-442f-b13c-835b0b2c1937.webp?v=1714911869","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41911935598691,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB57","requires_shipping":true,"taxable":true,"featured_image":{"id":31488180158563,"product_id":7415106207843,"position":9,"created_at":"2024-05-05T20:24:24+08:00","updated_at":"2024-05-05T20:24:24+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c196b0f1e21de20fce46eb17821cf958cacbbd4_f449a63a-7e14-4844-ab97-5d8c36ae3a99.webp?v=1714911864","variant_ids":[41911935598691]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - R2D2-剪紙系列 - 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-PB57","featured_media":{"alt":null,"id":23893524775011,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c196b0f1e21de20fce46eb17821cf958cacbbd4_f449a63a-7e14-4844-ab97-5d8c36ae3a99.webp?v=1714911864"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41911935598691,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB57","requires_shipping":true,"taxable":true,"featured_image":{"id":31488180158563,"product_id":7415106207843,"position":9,"created_at":"2024-05-05T20:24:24+08:00","updated_at":"2024-05-05T20:24:24+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c196b0f1e21de20fce46eb17821cf958cacbbd4_f449a63a-7e14-4844-ab97-5d8c36ae3a99.webp?v=1714911864","variant_ids":[41911935598691]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - R2D2-剪紙系列 - 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-PB57","featured_media":{"alt":null,"id":23893524775011,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c196b0f1e21de20fce46eb17821cf958cacbbd4_f449a63a-7e14-4844-ab97-5d8c36ae3a99.webp?v=1714911864"}},"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: "停產"
}