$product = {"id":7415115284579,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 黑武士-Useless to Resist","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb96","description":null,"published_at":"2024-06-11T17:58:22+08:00","created_at":"2024-05-05T20:25:41+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":41912037900387,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB96","requires_shipping":true,"taxable":true,"featured_image":{"id":31488197754979,"product_id":7415115284579,"position":2,"created_at":"2024-05-05T20:25:45+08:00","updated_at":"2024-05-05T20:25:45+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6de7d5890c7e4e6ec6d517638a8ebf29a67b2515_2e30c36c-361f-4ce2-9e3f-d9294c36e6ec.webp?v=1714911945","variant_ids":[41912037900387]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 黑武士-Useless to Resist - 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-PB96","featured_media":{"alt":null,"id":23893542404195,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6de7d5890c7e4e6ec6d517638a8ebf29a67b2515_2e30c36c-361f-4ce2-9e3f-d9294c36e6ec.webp?v=1714911945"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aec623271043f076afdd519dc208e3d5627c05bc_941ee019-ad76-47aa-b12e-62514d10ff49.webp?v=1714911943","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6de7d5890c7e4e6ec6d517638a8ebf29a67b2515_2e30c36c-361f-4ce2-9e3f-d9294c36e6ec.webp?v=1714911945","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a8265ca66f7245e76c563425f7d26b16e407a5e_1dbf880b-2eed-4cca-90f5-0d4314e87403.webp?v=1714911948","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/305cda9a9f0c2d6845d035d7aa7e6999d641510c_f2193831-4d9e-4208-9e8e-2930d19d47e4.webp?v=1714911950","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b979b9967c6681fcb0453102714b48bef0b585af_456632e5-e419-4544-8e0f-084e8692766b.webp?v=1714911953","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a12c9b6e063500cdcb36eee386f6265c7dd0e275_733269c6-170a-48a9-9d41-b87e928d7eec.webp?v=1714911955","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a1ee97c32821357aee3e7a2fd9a57a6dee649e6_ae902d2b-1f0e-4845-9b7b-410d1171c16b.webp?v=1714911957","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c30b7ea51cde953ebecc5ad617dd98e272054e9d_461e60de-fa58-4004-85e8-7c7fcea1098a.webp?v=1714911960","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d0921b878cb06fa679a30a9eb12950fd3cb51cf_f77d33b8-d049-4096-8938-66bb99d6f8bf.webp?v=1714911962","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/956d7e11b7c70392373359cbf58ad5ea7c2da7e7_86947e02-e65f-4313-b7b8-25836048859e.webp?v=1714911965","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87d836891c6e48a78d58a8661c5e4d137e205359_afd422b2-876c-4490-b6a3-78bd1d3855bc.webp?v=1714911967"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aec623271043f076afdd519dc208e3d5627c05bc_941ee019-ad76-47aa-b12e-62514d10ff49.webp?v=1714911943","options":["color"],"media":[{"alt":null,"id":23893541978211,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aec623271043f076afdd519dc208e3d5627c05bc_941ee019-ad76-47aa-b12e-62514d10ff49.webp?v=1714911943"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aec623271043f076afdd519dc208e3d5627c05bc_941ee019-ad76-47aa-b12e-62514d10ff49.webp?v=1714911943","width":2000},{"alt":null,"id":23893542404195,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6de7d5890c7e4e6ec6d517638a8ebf29a67b2515_2e30c36c-361f-4ce2-9e3f-d9294c36e6ec.webp?v=1714911945"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6de7d5890c7e4e6ec6d517638a8ebf29a67b2515_2e30c36c-361f-4ce2-9e3f-d9294c36e6ec.webp?v=1714911945","width":2000},{"alt":null,"id":23893543223395,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a8265ca66f7245e76c563425f7d26b16e407a5e_1dbf880b-2eed-4cca-90f5-0d4314e87403.webp?v=1714911948"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a8265ca66f7245e76c563425f7d26b16e407a5e_1dbf880b-2eed-4cca-90f5-0d4314e87403.webp?v=1714911948","width":2000},{"alt":null,"id":23893543747683,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/305cda9a9f0c2d6845d035d7aa7e6999d641510c_f2193831-4d9e-4208-9e8e-2930d19d47e4.webp?v=1714911950"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/305cda9a9f0c2d6845d035d7aa7e6999d641510c_f2193831-4d9e-4208-9e8e-2930d19d47e4.webp?v=1714911950","width":2000},{"alt":null,"id":23893544206435,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b979b9967c6681fcb0453102714b48bef0b585af_456632e5-e419-4544-8e0f-084e8692766b.webp?v=1714911953"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b979b9967c6681fcb0453102714b48bef0b585af_456632e5-e419-4544-8e0f-084e8692766b.webp?v=1714911953","width":2000},{"alt":null,"id":23893544861795,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a12c9b6e063500cdcb36eee386f6265c7dd0e275_733269c6-170a-48a9-9d41-b87e928d7eec.webp?v=1714911955"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a12c9b6e063500cdcb36eee386f6265c7dd0e275_733269c6-170a-48a9-9d41-b87e928d7eec.webp?v=1714911955","width":2000},{"alt":null,"id":23893545287779,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a1ee97c32821357aee3e7a2fd9a57a6dee649e6_ae902d2b-1f0e-4845-9b7b-410d1171c16b.webp?v=1714911957"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a1ee97c32821357aee3e7a2fd9a57a6dee649e6_ae902d2b-1f0e-4845-9b7b-410d1171c16b.webp?v=1714911957","width":2000},{"alt":null,"id":23893545648227,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c30b7ea51cde953ebecc5ad617dd98e272054e9d_461e60de-fa58-4004-85e8-7c7fcea1098a.webp?v=1714911960"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c30b7ea51cde953ebecc5ad617dd98e272054e9d_461e60de-fa58-4004-85e8-7c7fcea1098a.webp?v=1714911960","width":2000},{"alt":null,"id":23893546041443,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d0921b878cb06fa679a30a9eb12950fd3cb51cf_f77d33b8-d049-4096-8938-66bb99d6f8bf.webp?v=1714911962"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d0921b878cb06fa679a30a9eb12950fd3cb51cf_f77d33b8-d049-4096-8938-66bb99d6f8bf.webp?v=1714911962","width":2000},{"alt":null,"id":23893546631267,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/956d7e11b7c70392373359cbf58ad5ea7c2da7e7_86947e02-e65f-4313-b7b8-25836048859e.webp?v=1714911965"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/956d7e11b7c70392373359cbf58ad5ea7c2da7e7_86947e02-e65f-4313-b7b8-25836048859e.webp?v=1714911965","width":2000},{"alt":null,"id":23893547417699,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87d836891c6e48a78d58a8661c5e4d137e205359_afd422b2-876c-4490-b6a3-78bd1d3855bc.webp?v=1714911967"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87d836891c6e48a78d58a8661c5e4d137e205359_afd422b2-876c-4490-b6a3-78bd1d3855bc.webp?v=1714911967","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41912037900387,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB96","requires_shipping":true,"taxable":true,"featured_image":{"id":31488197754979,"product_id":7415115284579,"position":2,"created_at":"2024-05-05T20:25:45+08:00","updated_at":"2024-05-05T20:25:45+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6de7d5890c7e4e6ec6d517638a8ebf29a67b2515_2e30c36c-361f-4ce2-9e3f-d9294c36e6ec.webp?v=1714911945","variant_ids":[41912037900387]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 黑武士-Useless to Resist - 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-PB96","featured_media":{"alt":null,"id":23893542404195,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6de7d5890c7e4e6ec6d517638a8ebf29a67b2515_2e30c36c-361f-4ce2-9e3f-d9294c36e6ec.webp?v=1714911945"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41912037900387,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB96","requires_shipping":true,"taxable":true,"featured_image":{"id":31488197754979,"product_id":7415115284579,"position":2,"created_at":"2024-05-05T20:25:45+08:00","updated_at":"2024-05-05T20:25:45+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6de7d5890c7e4e6ec6d517638a8ebf29a67b2515_2e30c36c-361f-4ce2-9e3f-d9294c36e6ec.webp?v=1714911945","variant_ids":[41912037900387]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 黑武士-Useless to Resist - 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-PB96","featured_media":{"alt":null,"id":23893542404195,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6de7d5890c7e4e6ec6d517638a8ebf29a67b2515_2e30c36c-361f-4ce2-9e3f-d9294c36e6ec.webp?v=1714911945"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}};
$device_handle = null;
$brand_handle = null;
$type = "";
var sellingStatus
// 只有設計款(SKU 含 '-')才需要合圖
if ($isMerge && $defaultVariant.sku.includes('-')) {
$(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: "停產"
}