$product = {"id":7415028482147,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - POP X戰機 X-WI","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb25","description":null,"published_at":"2024-06-11T17:56:02+08:00","created_at":"2024-05-05T20:09:22+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":41911107256419,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB25","requires_shipping":true,"taxable":true,"featured_image":{"id":31487971852387,"product_id":7415028482147,"position":11,"created_at":"2024-05-05T20:09:50+08:00","updated_at":"2024-05-05T20:09:50+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a2924312292a651089c7992fc805904d1592b27_c68732c9-7d0f-4a0d-8b3b-9d81598bbb41.webp?v=1714910990","variant_ids":[41911107256419]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - POP X戰機 X-WI - 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-PB25","featured_media":{"alt":null,"id":23893316108387,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a2924312292a651089c7992fc805904d1592b27_c68732c9-7d0f-4a0d-8b3b-9d81598bbb41.webp?v=1714910990"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e9e0512b1e38e7cc8a5a2aa304f18c3f60fa4d3_35bcc7a0-1aa8-403f-8794-2292117634f5.webp?v=1714910965","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3f238811f4c8a021d17cceb7c76d85c292154cf2_e32f8f92-ecf0-4a3a-9126-52663788d86e.webp?v=1714910968","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e4fa431d63ab457fb5e948b47226851c0bc0ffa_7459c015-5ac2-46db-9dbd-ee9e96dcad78.webp?v=1714910970","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b7a265e504493419a34ee0adf092030f67a42b70_fc35a583-da85-4a34-9b2e-92c7d6910724.webp?v=1714910972","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9e2337ff041ed01f0c24c197e8e4964d84d8d88_e464ef33-e344-4054-be47-bf3736fb742e.webp?v=1714910975","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4868f42f80423052b05901fe26d7e8d4b608a23_5211d595-7f1e-4306-ab3d-96c17d69aac2.webp?v=1714910978","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8bd7afedf05cd70c04ec59034667f0ce7967ca0c_1a363cfd-d23f-4b6a-81d9-99d7e91a16d7.webp?v=1714910980","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5dfa5627c99d149924ac3b4f7df7e0cf801d02ab_54a4c3af-2289-48d3-b0c4-d19fbf20f567.webp?v=1714910982","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9561444ac39e1f157aeed57ea10b23a05e3d0397_6acc7419-bfb6-49d0-b0cb-64f3bb18c49c.webp?v=1714910985","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9950970f74015dd3a27c9e61672c37b6e21b3ec8_8f2edb18-cfb7-42c1-ada7-f83d9bbdb4e3.webp?v=1714910987","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a2924312292a651089c7992fc805904d1592b27_c68732c9-7d0f-4a0d-8b3b-9d81598bbb41.webp?v=1714910990"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e9e0512b1e38e7cc8a5a2aa304f18c3f60fa4d3_35bcc7a0-1aa8-403f-8794-2292117634f5.webp?v=1714910965","options":["color"],"media":[{"alt":null,"id":23893310537827,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e9e0512b1e38e7cc8a5a2aa304f18c3f60fa4d3_35bcc7a0-1aa8-403f-8794-2292117634f5.webp?v=1714910965"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e9e0512b1e38e7cc8a5a2aa304f18c3f60fa4d3_35bcc7a0-1aa8-403f-8794-2292117634f5.webp?v=1714910965","width":2000},{"alt":null,"id":23893311225955,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3f238811f4c8a021d17cceb7c76d85c292154cf2_e32f8f92-ecf0-4a3a-9126-52663788d86e.webp?v=1714910968"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3f238811f4c8a021d17cceb7c76d85c292154cf2_e32f8f92-ecf0-4a3a-9126-52663788d86e.webp?v=1714910968","width":2000},{"alt":null,"id":23893311946851,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e4fa431d63ab457fb5e948b47226851c0bc0ffa_7459c015-5ac2-46db-9dbd-ee9e96dcad78.webp?v=1714910970"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e4fa431d63ab457fb5e948b47226851c0bc0ffa_7459c015-5ac2-46db-9dbd-ee9e96dcad78.webp?v=1714910970","width":2000},{"alt":null,"id":23893312307299,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b7a265e504493419a34ee0adf092030f67a42b70_fc35a583-da85-4a34-9b2e-92c7d6910724.webp?v=1714910972"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b7a265e504493419a34ee0adf092030f67a42b70_fc35a583-da85-4a34-9b2e-92c7d6910724.webp?v=1714910972","width":2000},{"alt":null,"id":23893313060963,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9e2337ff041ed01f0c24c197e8e4964d84d8d88_e464ef33-e344-4054-be47-bf3736fb742e.webp?v=1714910975"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9e2337ff041ed01f0c24c197e8e4964d84d8d88_e464ef33-e344-4054-be47-bf3736fb742e.webp?v=1714910975","width":2000},{"alt":null,"id":23893313355875,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4868f42f80423052b05901fe26d7e8d4b608a23_5211d595-7f1e-4306-ab3d-96c17d69aac2.webp?v=1714910978"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4868f42f80423052b05901fe26d7e8d4b608a23_5211d595-7f1e-4306-ab3d-96c17d69aac2.webp?v=1714910978","width":2000},{"alt":null,"id":23893313814627,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8bd7afedf05cd70c04ec59034667f0ce7967ca0c_1a363cfd-d23f-4b6a-81d9-99d7e91a16d7.webp?v=1714910980"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8bd7afedf05cd70c04ec59034667f0ce7967ca0c_1a363cfd-d23f-4b6a-81d9-99d7e91a16d7.webp?v=1714910980","width":2000},{"alt":null,"id":23893314142307,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5dfa5627c99d149924ac3b4f7df7e0cf801d02ab_54a4c3af-2289-48d3-b0c4-d19fbf20f567.webp?v=1714910982"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5dfa5627c99d149924ac3b4f7df7e0cf801d02ab_54a4c3af-2289-48d3-b0c4-d19fbf20f567.webp?v=1714910982","width":2000},{"alt":null,"id":23893315223651,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9561444ac39e1f157aeed57ea10b23a05e3d0397_6acc7419-bfb6-49d0-b0cb-64f3bb18c49c.webp?v=1714910985"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9561444ac39e1f157aeed57ea10b23a05e3d0397_6acc7419-bfb6-49d0-b0cb-64f3bb18c49c.webp?v=1714910985","width":2000},{"alt":null,"id":23893315682403,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9950970f74015dd3a27c9e61672c37b6e21b3ec8_8f2edb18-cfb7-42c1-ada7-f83d9bbdb4e3.webp?v=1714910987"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9950970f74015dd3a27c9e61672c37b6e21b3ec8_8f2edb18-cfb7-42c1-ada7-f83d9bbdb4e3.webp?v=1714910987","width":2000},{"alt":null,"id":23893316108387,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a2924312292a651089c7992fc805904d1592b27_c68732c9-7d0f-4a0d-8b3b-9d81598bbb41.webp?v=1714910990"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a2924312292a651089c7992fc805904d1592b27_c68732c9-7d0f-4a0d-8b3b-9d81598bbb41.webp?v=1714910990","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41911107256419,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB25","requires_shipping":true,"taxable":true,"featured_image":{"id":31487971852387,"product_id":7415028482147,"position":11,"created_at":"2024-05-05T20:09:50+08:00","updated_at":"2024-05-05T20:09:50+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a2924312292a651089c7992fc805904d1592b27_c68732c9-7d0f-4a0d-8b3b-9d81598bbb41.webp?v=1714910990","variant_ids":[41911107256419]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - POP X戰機 X-WI - 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-PB25","featured_media":{"alt":null,"id":23893316108387,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a2924312292a651089c7992fc805904d1592b27_c68732c9-7d0f-4a0d-8b3b-9d81598bbb41.webp?v=1714910990"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41911107256419,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB25","requires_shipping":true,"taxable":true,"featured_image":{"id":31487971852387,"product_id":7415028482147,"position":11,"created_at":"2024-05-05T20:09:50+08:00","updated_at":"2024-05-05T20:09:50+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a2924312292a651089c7992fc805904d1592b27_c68732c9-7d0f-4a0d-8b3b-9d81598bbb41.webp?v=1714910990","variant_ids":[41911107256419]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - POP X戰機 X-WI - 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-PB25","featured_media":{"alt":null,"id":23893316108387,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a2924312292a651089c7992fc805904d1592b27_c68732c9-7d0f-4a0d-8b3b-9d81598bbb41.webp?v=1714910990"}},"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: "停產"
}