$product = {"id":7408463118435,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - Twenty One Point Five - 21.5 - Mundane Everyday","handle":"iphone-12-mini-mod-nx-printable-rl01","description":null,"published_at":"2024-06-11T16:37:55+08:00","created_at":"2024-05-03T15:31:36+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-Twenty One Point Five - 21.5","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-twenty-one-point-five","device-iPhone 12 mini","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-twenty-one-point-five","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":41885765795939,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-RL01","requires_shipping":true,"taxable":true,"featured_image":{"id":31472346234979,"product_id":7408463118435,"position":8,"created_at":"2024-05-03T15:31:55+08:00","updated_at":"2024-05-03T15:31:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2e69a2689353109282ad67b0b113992a319f162_4500cc9c-147c-48f6-bcae-e708fba25316.webp?v=1714721515","variant_ids":[41885765795939]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - Twenty One Point Five - 21.5 - Mundane Everyday - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-RL01","featured_media":{"alt":null,"id":23877262868579,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2e69a2689353109282ad67b0b113992a319f162_4500cc9c-147c-48f6-bcae-e708fba25316.webp?v=1714721515"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ced321619820754c4f4a07a756ddd007f292bc1f_7000cb2e-8e06-4477-926c-a7771c14797d.webp?v=1714721498","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/97c081354f838a6eac101897abea2087b49588c8_f92ffd8a-bab6-4f68-9b72-06d5b17eaaa0.webp?v=1714721501","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df6cb77c46332494c762eec1fe67ec3e60a2498f_f2f16159-0fe3-40b7-8eb9-60c05df9152f.webp?v=1714721503","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65482eb3314a13cb1e79f81343a6abece063b45e_83771ca2-4678-492d-854f-56208a107241.webp?v=1714721505","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9bd0ee295a401424257ad43bc920b176cf5ee403_cacc38a0-4180-43b4-95df-40612164dc95.webp?v=1714721508","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52416a09acf3a50df0f5905a171ce8e320de8719_374a8e35-d1fc-4ed4-8e39-4734710ba11d.webp?v=1714721510","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/149b566a629fc0756a1bc9b0bce94be6e522b62e_f76a3126-ae42-4fa6-b2f7-61361c7d9c4d.webp?v=1714721513","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2e69a2689353109282ad67b0b113992a319f162_4500cc9c-147c-48f6-bcae-e708fba25316.webp?v=1714721515","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c566de61b4794db44fbd118ef6cdf8c7f7e5369e_548e6df9-8b50-40d3-b916-f605dc7b8841.webp?v=1714721517","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d7c52d23349c3a20d22ee0b5ee58829c01ab923d_83e4adfc-f30c-4035-bcba-b0606250110b.webp?v=1714721520","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c80b6a85ee16e1cecd61a1ecfcb1d035260ddbbb_3659f180-6552-47af-8d67-fdb5e8eb4f26.webp?v=1714721522"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ced321619820754c4f4a07a756ddd007f292bc1f_7000cb2e-8e06-4477-926c-a7771c14797d.webp?v=1714721498","options":["color"],"media":[{"alt":null,"id":23877259001955,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ced321619820754c4f4a07a756ddd007f292bc1f_7000cb2e-8e06-4477-926c-a7771c14797d.webp?v=1714721498"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ced321619820754c4f4a07a756ddd007f292bc1f_7000cb2e-8e06-4477-926c-a7771c14797d.webp?v=1714721498","width":2000},{"alt":null,"id":23877259493475,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/97c081354f838a6eac101897abea2087b49588c8_f92ffd8a-bab6-4f68-9b72-06d5b17eaaa0.webp?v=1714721501"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/97c081354f838a6eac101897abea2087b49588c8_f92ffd8a-bab6-4f68-9b72-06d5b17eaaa0.webp?v=1714721501","width":2000},{"alt":null,"id":23877259952227,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df6cb77c46332494c762eec1fe67ec3e60a2498f_f2f16159-0fe3-40b7-8eb9-60c05df9152f.webp?v=1714721503"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df6cb77c46332494c762eec1fe67ec3e60a2498f_f2f16159-0fe3-40b7-8eb9-60c05df9152f.webp?v=1714721503","width":2000},{"alt":null,"id":23877260574819,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65482eb3314a13cb1e79f81343a6abece063b45e_83771ca2-4678-492d-854f-56208a107241.webp?v=1714721505"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65482eb3314a13cb1e79f81343a6abece063b45e_83771ca2-4678-492d-854f-56208a107241.webp?v=1714721505","width":2000},{"alt":null,"id":23877260968035,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9bd0ee295a401424257ad43bc920b176cf5ee403_cacc38a0-4180-43b4-95df-40612164dc95.webp?v=1714721508"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9bd0ee295a401424257ad43bc920b176cf5ee403_cacc38a0-4180-43b4-95df-40612164dc95.webp?v=1714721508","width":2000},{"alt":null,"id":23877261951075,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52416a09acf3a50df0f5905a171ce8e320de8719_374a8e35-d1fc-4ed4-8e39-4734710ba11d.webp?v=1714721510"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52416a09acf3a50df0f5905a171ce8e320de8719_374a8e35-d1fc-4ed4-8e39-4734710ba11d.webp?v=1714721510","width":2000},{"alt":null,"id":23877262344291,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/149b566a629fc0756a1bc9b0bce94be6e522b62e_f76a3126-ae42-4fa6-b2f7-61361c7d9c4d.webp?v=1714721513"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/149b566a629fc0756a1bc9b0bce94be6e522b62e_f76a3126-ae42-4fa6-b2f7-61361c7d9c4d.webp?v=1714721513","width":2000},{"alt":null,"id":23877262868579,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2e69a2689353109282ad67b0b113992a319f162_4500cc9c-147c-48f6-bcae-e708fba25316.webp?v=1714721515"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2e69a2689353109282ad67b0b113992a319f162_4500cc9c-147c-48f6-bcae-e708fba25316.webp?v=1714721515","width":2000},{"alt":null,"id":23877263229027,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c566de61b4794db44fbd118ef6cdf8c7f7e5369e_548e6df9-8b50-40d3-b916-f605dc7b8841.webp?v=1714721517"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c566de61b4794db44fbd118ef6cdf8c7f7e5369e_548e6df9-8b50-40d3-b916-f605dc7b8841.webp?v=1714721517","width":2000},{"alt":null,"id":23877263818851,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d7c52d23349c3a20d22ee0b5ee58829c01ab923d_83e4adfc-f30c-4035-bcba-b0606250110b.webp?v=1714721520"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d7c52d23349c3a20d22ee0b5ee58829c01ab923d_83e4adfc-f30c-4035-bcba-b0606250110b.webp?v=1714721520","width":2000},{"alt":null,"id":23877264244835,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c80b6a85ee16e1cecd61a1ecfcb1d035260ddbbb_3659f180-6552-47af-8d67-fdb5e8eb4f26.webp?v=1714721522"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c80b6a85ee16e1cecd61a1ecfcb1d035260ddbbb_3659f180-6552-47af-8d67-fdb5e8eb4f26.webp?v=1714721522","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41885765795939,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-RL01","requires_shipping":true,"taxable":true,"featured_image":{"id":31472346234979,"product_id":7408463118435,"position":8,"created_at":"2024-05-03T15:31:55+08:00","updated_at":"2024-05-03T15:31:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2e69a2689353109282ad67b0b113992a319f162_4500cc9c-147c-48f6-bcae-e708fba25316.webp?v=1714721515","variant_ids":[41885765795939]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - Twenty One Point Five - 21.5 - Mundane Everyday - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-RL01","featured_media":{"alt":null,"id":23877262868579,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2e69a2689353109282ad67b0b113992a319f162_4500cc9c-147c-48f6-bcae-e708fba25316.webp?v=1714721515"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41885765795939,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-RL01","requires_shipping":true,"taxable":true,"featured_image":{"id":31472346234979,"product_id":7408463118435,"position":8,"created_at":"2024-05-03T15:31:55+08:00","updated_at":"2024-05-03T15:31:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2e69a2689353109282ad67b0b113992a319f162_4500cc9c-147c-48f6-bcae-e708fba25316.webp?v=1714721515","variant_ids":[41885765795939]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - Twenty One Point Five - 21.5 - Mundane Everyday - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-RL01","featured_media":{"alt":null,"id":23877262868579,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2e69a2689353109282ad67b0b113992a319f162_4500cc9c-147c-48f6-bcae-e708fba25316.webp?v=1714721515"}},"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: "停產"
}