$product = {"id":7408393683043,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP X戰機 X-WI","handle":"iphone-12-mini-mod-nx-printable-pb25","description":null,"published_at":"2024-06-11T16:36:01+08:00","created_at":"2024-05-03T15:17:48+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":41884990603363,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB25","requires_shipping":true,"taxable":true,"featured_image":{"id":31472147628131,"product_id":7408393683043,"position":5,"created_at":"2024-05-03T15:18:01+08:00","updated_at":"2024-05-03T15:18:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/677175f6e01e7955c320e27925a13b99c5a7bc93_1d595719-3d65-473d-90bb-94b1dc304a77.webp?v=1714720681","variant_ids":[41884990603363]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP X戰機 X-WI - 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-PB25","featured_media":{"alt":null,"id":23877063180387,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/677175f6e01e7955c320e27925a13b99c5a7bc93_1d595719-3d65-473d-90bb-94b1dc304a77.webp?v=1714720681"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd99e57cc8243dbeb73e4fe32de75321faf24c3f_bdd53c61-31c5-4e56-bfac-001b0df1624a.webp?v=1714720671","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/31c1d80ee9430bf31ef42eabcabd8909764eb28a_1dd011b9-a94c-498e-ab61-f4b4bee7c5ff.webp?v=1714720674","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/634797536400e1595b262e3a8385c21b99b6eff4_15042740-28cd-451c-88b4-4c4ff1efe00a.webp?v=1714720676","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6519589b1f5cf40ffc4d239eb2918ceb6277d817_4f08e53c-a60f-43ca-9426-22cad204c321.webp?v=1714720679","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/677175f6e01e7955c320e27925a13b99c5a7bc93_1d595719-3d65-473d-90bb-94b1dc304a77.webp?v=1714720681","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/baa5d256884b118ee288c0e0f0709fec485a32dd_4e551d87-da58-4583-9c20-3d37360870a2.webp?v=1714720684","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29c05b5dcd520e6dcb52ccfba358e5c195211e9b_6ce7cf63-867a-4c77-b7de-0b88a286d36e.webp?v=1714720687","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e89bb726e572edec31a542dce6f3a334eb82ee15_8f077559-9e00-4573-8c11-726152618264.webp?v=1714720689","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/60584d1fea9c4ea658bd2c2224b93599e18e3db7_48596769-3d8e-4eff-a0d1-8f5c7d98a121.webp?v=1714720692","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f547b19d75807c30baed84b2702b6fa2486969be_e31229a0-ae5d-4645-b91f-fea403436de1.webp?v=1714720695","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/041c19ccbd91f49fadb8dcba05730f1bc7e3d2c5_dc63a008-7227-473a-b4d1-7a8051a1bc78.webp?v=1714720697"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd99e57cc8243dbeb73e4fe32de75321faf24c3f_bdd53c61-31c5-4e56-bfac-001b0df1624a.webp?v=1714720671","options":["color"],"media":[{"alt":null,"id":23877060919395,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd99e57cc8243dbeb73e4fe32de75321faf24c3f_bdd53c61-31c5-4e56-bfac-001b0df1624a.webp?v=1714720671"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd99e57cc8243dbeb73e4fe32de75321faf24c3f_bdd53c61-31c5-4e56-bfac-001b0df1624a.webp?v=1714720671","width":2000},{"alt":null,"id":23877061476451,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/31c1d80ee9430bf31ef42eabcabd8909764eb28a_1dd011b9-a94c-498e-ab61-f4b4bee7c5ff.webp?v=1714720674"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/31c1d80ee9430bf31ef42eabcabd8909764eb28a_1dd011b9-a94c-498e-ab61-f4b4bee7c5ff.webp?v=1714720674","width":2000},{"alt":null,"id":23877061836899,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/634797536400e1595b262e3a8385c21b99b6eff4_15042740-28cd-451c-88b4-4c4ff1efe00a.webp?v=1714720676"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/634797536400e1595b262e3a8385c21b99b6eff4_15042740-28cd-451c-88b4-4c4ff1efe00a.webp?v=1714720676","width":2000},{"alt":null,"id":23877062492259,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6519589b1f5cf40ffc4d239eb2918ceb6277d817_4f08e53c-a60f-43ca-9426-22cad204c321.webp?v=1714720679"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6519589b1f5cf40ffc4d239eb2918ceb6277d817_4f08e53c-a60f-43ca-9426-22cad204c321.webp?v=1714720679","width":2000},{"alt":null,"id":23877063180387,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/677175f6e01e7955c320e27925a13b99c5a7bc93_1d595719-3d65-473d-90bb-94b1dc304a77.webp?v=1714720681"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/677175f6e01e7955c320e27925a13b99c5a7bc93_1d595719-3d65-473d-90bb-94b1dc304a77.webp?v=1714720681","width":2000},{"alt":null,"id":23877063868515,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/baa5d256884b118ee288c0e0f0709fec485a32dd_4e551d87-da58-4583-9c20-3d37360870a2.webp?v=1714720684"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/baa5d256884b118ee288c0e0f0709fec485a32dd_4e551d87-da58-4583-9c20-3d37360870a2.webp?v=1714720684","width":2000},{"alt":null,"id":23877064261731,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29c05b5dcd520e6dcb52ccfba358e5c195211e9b_6ce7cf63-867a-4c77-b7de-0b88a286d36e.webp?v=1714720687"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29c05b5dcd520e6dcb52ccfba358e5c195211e9b_6ce7cf63-867a-4c77-b7de-0b88a286d36e.webp?v=1714720687","width":2000},{"alt":null,"id":23877065015395,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e89bb726e572edec31a542dce6f3a334eb82ee15_8f077559-9e00-4573-8c11-726152618264.webp?v=1714720689"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e89bb726e572edec31a542dce6f3a334eb82ee15_8f077559-9e00-4573-8c11-726152618264.webp?v=1714720689","width":2000},{"alt":null,"id":23877065539683,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/60584d1fea9c4ea658bd2c2224b93599e18e3db7_48596769-3d8e-4eff-a0d1-8f5c7d98a121.webp?v=1714720692"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/60584d1fea9c4ea658bd2c2224b93599e18e3db7_48596769-3d8e-4eff-a0d1-8f5c7d98a121.webp?v=1714720692","width":2000},{"alt":null,"id":23877066326115,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f547b19d75807c30baed84b2702b6fa2486969be_e31229a0-ae5d-4645-b91f-fea403436de1.webp?v=1714720695"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f547b19d75807c30baed84b2702b6fa2486969be_e31229a0-ae5d-4645-b91f-fea403436de1.webp?v=1714720695","width":2000},{"alt":null,"id":23877066883171,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/041c19ccbd91f49fadb8dcba05730f1bc7e3d2c5_dc63a008-7227-473a-b4d1-7a8051a1bc78.webp?v=1714720697"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/041c19ccbd91f49fadb8dcba05730f1bc7e3d2c5_dc63a008-7227-473a-b4d1-7a8051a1bc78.webp?v=1714720697","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41884990603363,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB25","requires_shipping":true,"taxable":true,"featured_image":{"id":31472147628131,"product_id":7408393683043,"position":5,"created_at":"2024-05-03T15:18:01+08:00","updated_at":"2024-05-03T15:18:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/677175f6e01e7955c320e27925a13b99c5a7bc93_1d595719-3d65-473d-90bb-94b1dc304a77.webp?v=1714720681","variant_ids":[41884990603363]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP X戰機 X-WI - 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-PB25","featured_media":{"alt":null,"id":23877063180387,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/677175f6e01e7955c320e27925a13b99c5a7bc93_1d595719-3d65-473d-90bb-94b1dc304a77.webp?v=1714720681"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41884990603363,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB25","requires_shipping":true,"taxable":true,"featured_image":{"id":31472147628131,"product_id":7408393683043,"position":5,"created_at":"2024-05-03T15:18:01+08:00","updated_at":"2024-05-03T15:18:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/677175f6e01e7955c320e27925a13b99c5a7bc93_1d595719-3d65-473d-90bb-94b1dc304a77.webp?v=1714720681","variant_ids":[41884990603363]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP X戰機 X-WI - 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-PB25","featured_media":{"alt":null,"id":23877063180387,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/677175f6e01e7955c320e27925a13b99c5a7bc93_1d595719-3d65-473d-90bb-94b1dc304a77.webp?v=1714720681"}},"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: "停產"
}