$product = {"id":7408495525987,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - The Adventures of R2-D2 \u0026 C-3PO","handle":"iphone-12-mini-mod-nx-printable-pb82","description":null,"published_at":"2024-06-11T16:38:51+08:00","created_at":"2024-05-03T15:37:56+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 12 mini","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-star-wars","Top50","type-Mod NX Printable"],"price":90000,"price_min":90000,"price_max":90000,"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":41886133387363,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB82","requires_shipping":true,"taxable":true,"featured_image":{"id":31472426647651,"product_id":7408495525987,"position":7,"created_at":"2024-05-03T15:38:13+08:00","updated_at":"2024-05-03T15:38:13+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a05506cdc3981fe89cdd54d7ebf505a43dafceaa_092b25c1-d112-4718-b437-fd7a532f9a54.webp?v=1714721893","variant_ids":[41886133387363]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - The Adventures of R2-D2 \u0026 C-3PO - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-PB82","featured_media":{"alt":null,"id":23877343576163,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a05506cdc3981fe89cdd54d7ebf505a43dafceaa_092b25c1-d112-4718-b437-fd7a532f9a54.webp?v=1714721893"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8b25dba113fff8d922013d28aa658048c680a8a_78dcb3b2-29d8-4d10-9c48-8fedc69222ee.webp?v=1714721878","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/465a8e14a2754847dcc1801460d3988ef155fbcb_42e94974-5b42-4d66-abe8-bb6087852758.webp?v=1714721881","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3da26edb40e86be253fbe0005e46264379f0ea3b_120cdf71-0f87-4a07-a1f9-a6f780783332.webp?v=1714721883","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de6913bfaf1aebbfe6c32e0abb2205a1b8e91fce_1f774d81-0da6-4797-8e36-30a6db949496.webp?v=1714721886","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e76a7cca85e0af2128de2bab600d2439f69cba75_351aa3bd-9dc2-4b2f-b53f-bb5efac6f2dd.webp?v=1714721888","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/61ea17107658cb9727b7009fd36e07eabf528e83_80e8a1e9-2c34-40dd-8b75-ea5248759885.webp?v=1714721890","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a05506cdc3981fe89cdd54d7ebf505a43dafceaa_092b25c1-d112-4718-b437-fd7a532f9a54.webp?v=1714721893","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2421547b52bd8151f550d719868660ef2d2bd9a_95df5f62-8b4b-41ab-a593-008c4281f3cd.webp?v=1714721895","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4840ba2ea89ebd2dd7fad3f1fcccc3ccdf53bdd6_249bbcd6-52c6-437c-80a6-8b68c0eb5f3f.webp?v=1714721897","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4aa5887209f40917a0ee9bb70d1248c21d05049f_3980fa5c-cc16-4107-aff3-a0a5b555ca42.webp?v=1714721900","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9cc2b13c2d3cfe2c28e9ed145e2e9c078873170c_0e32d76f-8ee8-4bb9-9899-a8caa9b9a3ce.webp?v=1714721902"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8b25dba113fff8d922013d28aa658048c680a8a_78dcb3b2-29d8-4d10-9c48-8fedc69222ee.webp?v=1714721878","options":["color"],"media":[{"alt":null,"id":23877340233827,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8b25dba113fff8d922013d28aa658048c680a8a_78dcb3b2-29d8-4d10-9c48-8fedc69222ee.webp?v=1714721878"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8b25dba113fff8d922013d28aa658048c680a8a_78dcb3b2-29d8-4d10-9c48-8fedc69222ee.webp?v=1714721878","width":2000},{"alt":null,"id":23877340823651,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/465a8e14a2754847dcc1801460d3988ef155fbcb_42e94974-5b42-4d66-abe8-bb6087852758.webp?v=1714721881"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/465a8e14a2754847dcc1801460d3988ef155fbcb_42e94974-5b42-4d66-abe8-bb6087852758.webp?v=1714721881","width":2000},{"alt":null,"id":23877341413475,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3da26edb40e86be253fbe0005e46264379f0ea3b_120cdf71-0f87-4a07-a1f9-a6f780783332.webp?v=1714721883"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3da26edb40e86be253fbe0005e46264379f0ea3b_120cdf71-0f87-4a07-a1f9-a6f780783332.webp?v=1714721883","width":2000},{"alt":null,"id":23877341904995,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de6913bfaf1aebbfe6c32e0abb2205a1b8e91fce_1f774d81-0da6-4797-8e36-30a6db949496.webp?v=1714721886"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de6913bfaf1aebbfe6c32e0abb2205a1b8e91fce_1f774d81-0da6-4797-8e36-30a6db949496.webp?v=1714721886","width":2000},{"alt":null,"id":23877342527587,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e76a7cca85e0af2128de2bab600d2439f69cba75_351aa3bd-9dc2-4b2f-b53f-bb5efac6f2dd.webp?v=1714721888"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e76a7cca85e0af2128de2bab600d2439f69cba75_351aa3bd-9dc2-4b2f-b53f-bb5efac6f2dd.webp?v=1714721888","width":2000},{"alt":null,"id":23877343051875,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/61ea17107658cb9727b7009fd36e07eabf528e83_80e8a1e9-2c34-40dd-8b75-ea5248759885.webp?v=1714721890"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/61ea17107658cb9727b7009fd36e07eabf528e83_80e8a1e9-2c34-40dd-8b75-ea5248759885.webp?v=1714721890","width":2000},{"alt":null,"id":23877343576163,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a05506cdc3981fe89cdd54d7ebf505a43dafceaa_092b25c1-d112-4718-b437-fd7a532f9a54.webp?v=1714721893"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a05506cdc3981fe89cdd54d7ebf505a43dafceaa_092b25c1-d112-4718-b437-fd7a532f9a54.webp?v=1714721893","width":2000},{"alt":null,"id":23877344165987,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2421547b52bd8151f550d719868660ef2d2bd9a_95df5f62-8b4b-41ab-a593-008c4281f3cd.webp?v=1714721895"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2421547b52bd8151f550d719868660ef2d2bd9a_95df5f62-8b4b-41ab-a593-008c4281f3cd.webp?v=1714721895","width":2000},{"alt":null,"id":23877344624739,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4840ba2ea89ebd2dd7fad3f1fcccc3ccdf53bdd6_249bbcd6-52c6-437c-80a6-8b68c0eb5f3f.webp?v=1714721897"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4840ba2ea89ebd2dd7fad3f1fcccc3ccdf53bdd6_249bbcd6-52c6-437c-80a6-8b68c0eb5f3f.webp?v=1714721897","width":2000},{"alt":null,"id":23877345214563,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4aa5887209f40917a0ee9bb70d1248c21d05049f_3980fa5c-cc16-4107-aff3-a0a5b555ca42.webp?v=1714721900"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4aa5887209f40917a0ee9bb70d1248c21d05049f_3980fa5c-cc16-4107-aff3-a0a5b555ca42.webp?v=1714721900","width":2000},{"alt":null,"id":23877345706083,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9cc2b13c2d3cfe2c28e9ed145e2e9c078873170c_0e32d76f-8ee8-4bb9-9899-a8caa9b9a3ce.webp?v=1714721902"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9cc2b13c2d3cfe2c28e9ed145e2e9c078873170c_0e32d76f-8ee8-4bb9-9899-a8caa9b9a3ce.webp?v=1714721902","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41886133387363,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB82","requires_shipping":true,"taxable":true,"featured_image":{"id":31472426647651,"product_id":7408495525987,"position":7,"created_at":"2024-05-03T15:38:13+08:00","updated_at":"2024-05-03T15:38:13+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a05506cdc3981fe89cdd54d7ebf505a43dafceaa_092b25c1-d112-4718-b437-fd7a532f9a54.webp?v=1714721893","variant_ids":[41886133387363]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - The Adventures of R2-D2 \u0026 C-3PO - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-PB82","featured_media":{"alt":null,"id":23877343576163,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a05506cdc3981fe89cdd54d7ebf505a43dafceaa_092b25c1-d112-4718-b437-fd7a532f9a54.webp?v=1714721893"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41886133387363,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB82","requires_shipping":true,"taxable":true,"featured_image":{"id":31472426647651,"product_id":7408495525987,"position":7,"created_at":"2024-05-03T15:38:13+08:00","updated_at":"2024-05-03T15:38:13+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a05506cdc3981fe89cdd54d7ebf505a43dafceaa_092b25c1-d112-4718-b437-fd7a532f9a54.webp?v=1714721893","variant_ids":[41886133387363]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - The Adventures of R2-D2 \u0026 C-3PO - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-PB82","featured_media":{"alt":null,"id":23877343576163,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a05506cdc3981fe89cdd54d7ebf505a43dafceaa_092b25c1-d112-4718-b437-fd7a532f9a54.webp?v=1714721893"}},"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: "停產"
}