$product = {"id":7414925295715,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 千年鷹-美式復古","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb99","description":null,"published_at":"2024-06-11T17:53:14+08:00","created_at":"2024-05-05T19:50: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":41909991669859,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB99","requires_shipping":true,"taxable":true,"featured_image":{"id":31487698042979,"product_id":7414925295715,"position":6,"created_at":"2024-05-05T19:50:17+08:00","updated_at":"2024-05-05T19:50:17+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef177d28ce31813f4a938923405574e07adb96a0_ac55691b-3ea5-4f8f-8b0a-bfbfd45d62c9.webp?v=1714909817","variant_ids":[41909991669859]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 千年鷹-美式復古 - 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-PB99","featured_media":{"alt":null,"id":23893041872995,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef177d28ce31813f4a938923405574e07adb96a0_ac55691b-3ea5-4f8f-8b0a-bfbfd45d62c9.webp?v=1714909817"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7daecf6f16abe678856364e23c79fd4613ec1947_41b0175e-9a5b-493c-a24b-e259a0f72045.webp?v=1714909805","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e34c21de9bd317082ab85864f30d60424b3b02d4_a964cac7-1e84-4bad-951c-6055640d7115.webp?v=1714909808","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59e256cca85c7f477ac8d783520e817c5d068ae6_ba81c60e-0154-4a7d-9bf5-1a327245501c.webp?v=1714909810","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e19f8ec157a4823dc7a8d860d07d98151cecc4d3_d464853f-8698-482b-b75c-aa53c4daa9a7.webp?v=1714909813","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8c93608d6fe0d14c9d7366a9b9840ba6c18140d_b4110348-6dcb-4ce3-9756-bd16638c78de.webp?v=1714909815","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef177d28ce31813f4a938923405574e07adb96a0_ac55691b-3ea5-4f8f-8b0a-bfbfd45d62c9.webp?v=1714909817","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0cd25ef7dff54a10c7feb56da184a86f88515f67_c74b101c-5f90-46b8-b0fa-eb900f2ad5ec.webp?v=1714909820","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/24f3847fff9026ac112a900038899aebeda077ab_781d9690-592f-40f9-a05c-bfb9c395c920.webp?v=1714909822","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e01319f6acb9e58d73fa149d50395acc6b961fde_31701325-b3ce-4dee-b37c-77bac3a8d312.webp?v=1714909824","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22c285f3af9948d297741e5eb354df10a9a96f05_8a476e8c-1b98-4829-bb99-2db956c9dd1d.webp?v=1714909827","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd666ef74f43687cc42c0c4e6a74ffdadaef78b0_98275729-d06a-43ec-90fc-d9a728d5e971.webp?v=1714909829"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7daecf6f16abe678856364e23c79fd4613ec1947_41b0175e-9a5b-493c-a24b-e259a0f72045.webp?v=1714909805","options":["color"],"media":[{"alt":null,"id":23893039284323,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7daecf6f16abe678856364e23c79fd4613ec1947_41b0175e-9a5b-493c-a24b-e259a0f72045.webp?v=1714909805"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7daecf6f16abe678856364e23c79fd4613ec1947_41b0175e-9a5b-493c-a24b-e259a0f72045.webp?v=1714909805","width":2000},{"alt":null,"id":23893039710307,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e34c21de9bd317082ab85864f30d60424b3b02d4_a964cac7-1e84-4bad-951c-6055640d7115.webp?v=1714909808"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e34c21de9bd317082ab85864f30d60424b3b02d4_a964cac7-1e84-4bad-951c-6055640d7115.webp?v=1714909808","width":2000},{"alt":null,"id":23893040496739,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59e256cca85c7f477ac8d783520e817c5d068ae6_ba81c60e-0154-4a7d-9bf5-1a327245501c.webp?v=1714909810"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59e256cca85c7f477ac8d783520e817c5d068ae6_ba81c60e-0154-4a7d-9bf5-1a327245501c.webp?v=1714909810","width":2000},{"alt":null,"id":23893040889955,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e19f8ec157a4823dc7a8d860d07d98151cecc4d3_d464853f-8698-482b-b75c-aa53c4daa9a7.webp?v=1714909813"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e19f8ec157a4823dc7a8d860d07d98151cecc4d3_d464853f-8698-482b-b75c-aa53c4daa9a7.webp?v=1714909813","width":2000},{"alt":null,"id":23893041447011,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8c93608d6fe0d14c9d7366a9b9840ba6c18140d_b4110348-6dcb-4ce3-9756-bd16638c78de.webp?v=1714909815"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8c93608d6fe0d14c9d7366a9b9840ba6c18140d_b4110348-6dcb-4ce3-9756-bd16638c78de.webp?v=1714909815","width":2000},{"alt":null,"id":23893041872995,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef177d28ce31813f4a938923405574e07adb96a0_ac55691b-3ea5-4f8f-8b0a-bfbfd45d62c9.webp?v=1714909817"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef177d28ce31813f4a938923405574e07adb96a0_ac55691b-3ea5-4f8f-8b0a-bfbfd45d62c9.webp?v=1714909817","width":2000},{"alt":null,"id":23893042397283,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0cd25ef7dff54a10c7feb56da184a86f88515f67_c74b101c-5f90-46b8-b0fa-eb900f2ad5ec.webp?v=1714909820"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0cd25ef7dff54a10c7feb56da184a86f88515f67_c74b101c-5f90-46b8-b0fa-eb900f2ad5ec.webp?v=1714909820","width":2000},{"alt":null,"id":23893042954339,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/24f3847fff9026ac112a900038899aebeda077ab_781d9690-592f-40f9-a05c-bfb9c395c920.webp?v=1714909822"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/24f3847fff9026ac112a900038899aebeda077ab_781d9690-592f-40f9-a05c-bfb9c395c920.webp?v=1714909822","width":2000},{"alt":null,"id":23893043478627,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e01319f6acb9e58d73fa149d50395acc6b961fde_31701325-b3ce-4dee-b37c-77bac3a8d312.webp?v=1714909824"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e01319f6acb9e58d73fa149d50395acc6b961fde_31701325-b3ce-4dee-b37c-77bac3a8d312.webp?v=1714909824","width":2000},{"alt":null,"id":23893044297827,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22c285f3af9948d297741e5eb354df10a9a96f05_8a476e8c-1b98-4829-bb99-2db956c9dd1d.webp?v=1714909827"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22c285f3af9948d297741e5eb354df10a9a96f05_8a476e8c-1b98-4829-bb99-2db956c9dd1d.webp?v=1714909827","width":2000},{"alt":null,"id":23893044789347,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd666ef74f43687cc42c0c4e6a74ffdadaef78b0_98275729-d06a-43ec-90fc-d9a728d5e971.webp?v=1714909829"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd666ef74f43687cc42c0c4e6a74ffdadaef78b0_98275729-d06a-43ec-90fc-d9a728d5e971.webp?v=1714909829","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41909991669859,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB99","requires_shipping":true,"taxable":true,"featured_image":{"id":31487698042979,"product_id":7414925295715,"position":6,"created_at":"2024-05-05T19:50:17+08:00","updated_at":"2024-05-05T19:50:17+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef177d28ce31813f4a938923405574e07adb96a0_ac55691b-3ea5-4f8f-8b0a-bfbfd45d62c9.webp?v=1714909817","variant_ids":[41909991669859]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 千年鷹-美式復古 - 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-PB99","featured_media":{"alt":null,"id":23893041872995,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef177d28ce31813f4a938923405574e07adb96a0_ac55691b-3ea5-4f8f-8b0a-bfbfd45d62c9.webp?v=1714909817"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41909991669859,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB99","requires_shipping":true,"taxable":true,"featured_image":{"id":31487698042979,"product_id":7414925295715,"position":6,"created_at":"2024-05-05T19:50:17+08:00","updated_at":"2024-05-05T19:50:17+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef177d28ce31813f4a938923405574e07adb96a0_ac55691b-3ea5-4f8f-8b0a-bfbfd45d62c9.webp?v=1714909817","variant_ids":[41909991669859]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 千年鷹-美式復古 - 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-PB99","featured_media":{"alt":null,"id":23893041872995,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef177d28ce31813f4a938923405574e07adb96a0_ac55691b-3ea5-4f8f-8b0a-bfbfd45d62c9.webp?v=1714909817"}},"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: "停產"
}