$product = {"id":7414931816547,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 風暴兵-線稿風格","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb53","description":null,"published_at":"2024-06-11T17:53:25+08:00","created_at":"2024-05-05T19:51:13+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":41910065987683,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB53","requires_shipping":true,"taxable":true,"featured_image":{"id":31487714721891,"product_id":7414931816547,"position":7,"created_at":"2024-05-05T19:51:29+08:00","updated_at":"2024-05-05T19:51:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/11e43cb106dd89731760e50efe80a4297b3fbb81_7303b73d-f327-4ad7-ac7e-7d359fc9fe6d.webp?v=1714909889","variant_ids":[41910065987683]},"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-PB53","featured_media":{"alt":null,"id":23893058617443,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/11e43cb106dd89731760e50efe80a4297b3fbb81_7303b73d-f327-4ad7-ac7e-7d359fc9fe6d.webp?v=1714909889"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b286f3ee9a63f8e5fcc0f91e82c083662ecc2bb_fe099944-1373-4ab7-8266-627a42cd155c.webp?v=1714909875","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/714325e0cfe84251ff44aebe0d13229f08ce15ca_5b9becef-aef7-45dd-8690-b32980f8aafd.webp?v=1714909877","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/446144823e861e5a35e393fbbc40709445181a69_59462df9-55d3-44e1-9db2-625089706245.webp?v=1714909879","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d53c6335cc8cb4e749adbd776a738aac0c2e47fb_6049841e-a37c-4494-8c5f-900da8468ad6.webp?v=1714909882","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76ee017d336f45b03528ef5b1bef140058e22587_6bddf4e9-7ca8-4d6e-8685-ba1df5382abf.webp?v=1714909884","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bba54b51b0b43e2d3b6604d14c8c6b8225d5425e_0155b2b4-97d2-4223-86ba-38839e927db8.webp?v=1714909886","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/11e43cb106dd89731760e50efe80a4297b3fbb81_7303b73d-f327-4ad7-ac7e-7d359fc9fe6d.webp?v=1714909889","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3ee262dca7255bc241f6fa0804b8fa48c096d573_c4a625df-22e7-48df-aa06-129e6ab84da0.webp?v=1714909891","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef1ceec05c78e56f554b1ef3e46ebc3b4a55f333_76f6fbfc-709c-4b30-8c74-b51b7c5c46e4.webp?v=1714909893","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/982bc9f8537abdf91018342e55f7451bac9b59a1_b2787959-df09-43a5-955e-51c0e8df486f.webp?v=1714909896","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a3d1e112b247ab55c1edd1dacc38eca9544bd8c_c2604db0-4875-465f-82ed-38428de874fc.webp?v=1714909898"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b286f3ee9a63f8e5fcc0f91e82c083662ecc2bb_fe099944-1373-4ab7-8266-627a42cd155c.webp?v=1714909875","options":["color"],"media":[{"alt":null,"id":23893055078499,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b286f3ee9a63f8e5fcc0f91e82c083662ecc2bb_fe099944-1373-4ab7-8266-627a42cd155c.webp?v=1714909875"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b286f3ee9a63f8e5fcc0f91e82c083662ecc2bb_fe099944-1373-4ab7-8266-627a42cd155c.webp?v=1714909875","width":2000},{"alt":null,"id":23893055471715,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/714325e0cfe84251ff44aebe0d13229f08ce15ca_5b9becef-aef7-45dd-8690-b32980f8aafd.webp?v=1714909877"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/714325e0cfe84251ff44aebe0d13229f08ce15ca_5b9becef-aef7-45dd-8690-b32980f8aafd.webp?v=1714909877","width":2000},{"alt":null,"id":23893056585827,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/446144823e861e5a35e393fbbc40709445181a69_59462df9-55d3-44e1-9db2-625089706245.webp?v=1714909879"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/446144823e861e5a35e393fbbc40709445181a69_59462df9-55d3-44e1-9db2-625089706245.webp?v=1714909879","width":2000},{"alt":null,"id":23893056979043,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d53c6335cc8cb4e749adbd776a738aac0c2e47fb_6049841e-a37c-4494-8c5f-900da8468ad6.webp?v=1714909882"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d53c6335cc8cb4e749adbd776a738aac0c2e47fb_6049841e-a37c-4494-8c5f-900da8468ad6.webp?v=1714909882","width":2000},{"alt":null,"id":23893057437795,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76ee017d336f45b03528ef5b1bef140058e22587_6bddf4e9-7ca8-4d6e-8685-ba1df5382abf.webp?v=1714909884"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76ee017d336f45b03528ef5b1bef140058e22587_6bddf4e9-7ca8-4d6e-8685-ba1df5382abf.webp?v=1714909884","width":2000},{"alt":null,"id":23893057765475,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bba54b51b0b43e2d3b6604d14c8c6b8225d5425e_0155b2b4-97d2-4223-86ba-38839e927db8.webp?v=1714909886"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bba54b51b0b43e2d3b6604d14c8c6b8225d5425e_0155b2b4-97d2-4223-86ba-38839e927db8.webp?v=1714909886","width":2000},{"alt":null,"id":23893058617443,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/11e43cb106dd89731760e50efe80a4297b3fbb81_7303b73d-f327-4ad7-ac7e-7d359fc9fe6d.webp?v=1714909889"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/11e43cb106dd89731760e50efe80a4297b3fbb81_7303b73d-f327-4ad7-ac7e-7d359fc9fe6d.webp?v=1714909889","width":2000},{"alt":null,"id":23893058977891,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3ee262dca7255bc241f6fa0804b8fa48c096d573_c4a625df-22e7-48df-aa06-129e6ab84da0.webp?v=1714909891"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3ee262dca7255bc241f6fa0804b8fa48c096d573_c4a625df-22e7-48df-aa06-129e6ab84da0.webp?v=1714909891","width":2000},{"alt":null,"id":23893059502179,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef1ceec05c78e56f554b1ef3e46ebc3b4a55f333_76f6fbfc-709c-4b30-8c74-b51b7c5c46e4.webp?v=1714909893"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef1ceec05c78e56f554b1ef3e46ebc3b4a55f333_76f6fbfc-709c-4b30-8c74-b51b7c5c46e4.webp?v=1714909893","width":2000},{"alt":null,"id":23893059895395,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/982bc9f8537abdf91018342e55f7451bac9b59a1_b2787959-df09-43a5-955e-51c0e8df486f.webp?v=1714909896"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/982bc9f8537abdf91018342e55f7451bac9b59a1_b2787959-df09-43a5-955e-51c0e8df486f.webp?v=1714909896","width":2000},{"alt":null,"id":23893061140579,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a3d1e112b247ab55c1edd1dacc38eca9544bd8c_c2604db0-4875-465f-82ed-38428de874fc.webp?v=1714909898"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a3d1e112b247ab55c1edd1dacc38eca9544bd8c_c2604db0-4875-465f-82ed-38428de874fc.webp?v=1714909898","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41910065987683,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB53","requires_shipping":true,"taxable":true,"featured_image":{"id":31487714721891,"product_id":7414931816547,"position":7,"created_at":"2024-05-05T19:51:29+08:00","updated_at":"2024-05-05T19:51:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/11e43cb106dd89731760e50efe80a4297b3fbb81_7303b73d-f327-4ad7-ac7e-7d359fc9fe6d.webp?v=1714909889","variant_ids":[41910065987683]},"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-PB53","featured_media":{"alt":null,"id":23893058617443,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/11e43cb106dd89731760e50efe80a4297b3fbb81_7303b73d-f327-4ad7-ac7e-7d359fc9fe6d.webp?v=1714909889"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41910065987683,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB53","requires_shipping":true,"taxable":true,"featured_image":{"id":31487714721891,"product_id":7414931816547,"position":7,"created_at":"2024-05-05T19:51:29+08:00","updated_at":"2024-05-05T19:51:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/11e43cb106dd89731760e50efe80a4297b3fbb81_7303b73d-f327-4ad7-ac7e-7d359fc9fe6d.webp?v=1714909889","variant_ids":[41910065987683]},"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-PB53","featured_media":{"alt":null,"id":23893058617443,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/11e43cb106dd89731760e50efe80a4297b3fbb81_7303b73d-f327-4ad7-ac7e-7d359fc9fe6d.webp?v=1714909889"}},"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: "停產"
}