$product = {"id":7408522887267,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Sticker-藍","handle":"iphone-12-pro-max-mod-nx-printable-pb32","description":null,"published_at":"2024-06-11T16:39:37+08:00","created_at":"2024-05-03T15:43:13+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 pro max","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":41886447763555,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB32","requires_shipping":true,"taxable":true,"featured_image":{"id":31472496377955,"product_id":7408522887267,"position":8,"created_at":"2024-05-03T15:43:33+08:00","updated_at":"2024-05-03T15:43:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b1270b0ecca4b54d6b2f6dcff4a421cbec6007d_674269d2-cf6c-4eb4-b60e-09d751d38322.webp?v=1714722213","variant_ids":[41886447763555]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Sticker-藍 - 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":"NPB0118724-PB32","featured_media":{"alt":null,"id":23877413699683,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b1270b0ecca4b54d6b2f6dcff4a421cbec6007d_674269d2-cf6c-4eb4-b60e-09d751d38322.webp?v=1714722213"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e384a5001f28a51bb5cc0b9f4a8718ba6454a8e0_fba5b903-ffbe-4450-862f-4bfc2ca0f8c8.webp?v=1714722196","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e722887d4615c34780a556fa12d6a5673a3d78a_e5b4c14f-cee7-46be-a73b-20dd268c28c4.webp?v=1714722198","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/93f89c5fa1e28ac88b283f85b618f4dbd65c09dc_c6ef79a7-7b2c-4ebe-af60-34768879309d.webp?v=1714722201","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17b910e6c8f96883a7a2e9663596b94f8e8c97aa_42a2a402-7ab6-44b5-91ad-87173eb26182.webp?v=1714722203","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c40c2ca21fd386426710c2502bd6ca3e4f468333_a5859937-ab40-414d-9702-5ac5cb46324e.webp?v=1714722206","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72694c15e8495b0ea9cc5f88418bf9f1c1a54dcb_19e8d366-6008-4af8-9dc8-76402256d16c.webp?v=1714722208","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5cad046c82e9263e27b08b00817a6153952d26d_fa333c34-29ef-403f-8f64-9b922724ebfd.webp?v=1714722211","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b1270b0ecca4b54d6b2f6dcff4a421cbec6007d_674269d2-cf6c-4eb4-b60e-09d751d38322.webp?v=1714722213","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f93b77c0fb5c031d3fe8dcdbb8d079f9b122e911_818a38de-dfd7-4ef7-8e02-a3781b60675b.webp?v=1714722216","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a9f598864c4df272d2a7511265db8531a590f885_b9cd89e2-4a77-45dc-b096-b87e6713ad98.webp?v=1714722218"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e384a5001f28a51bb5cc0b9f4a8718ba6454a8e0_fba5b903-ffbe-4450-862f-4bfc2ca0f8c8.webp?v=1714722196","options":["color"],"media":[{"alt":null,"id":23877410062435,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e384a5001f28a51bb5cc0b9f4a8718ba6454a8e0_fba5b903-ffbe-4450-862f-4bfc2ca0f8c8.webp?v=1714722196"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e384a5001f28a51bb5cc0b9f4a8718ba6454a8e0_fba5b903-ffbe-4450-862f-4bfc2ca0f8c8.webp?v=1714722196","width":2000},{"alt":null,"id":23877410553955,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e722887d4615c34780a556fa12d6a5673a3d78a_e5b4c14f-cee7-46be-a73b-20dd268c28c4.webp?v=1714722198"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e722887d4615c34780a556fa12d6a5673a3d78a_e5b4c14f-cee7-46be-a73b-20dd268c28c4.webp?v=1714722198","width":2000},{"alt":null,"id":23877411143779,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/93f89c5fa1e28ac88b283f85b618f4dbd65c09dc_c6ef79a7-7b2c-4ebe-af60-34768879309d.webp?v=1714722201"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/93f89c5fa1e28ac88b283f85b618f4dbd65c09dc_c6ef79a7-7b2c-4ebe-af60-34768879309d.webp?v=1714722201","width":2000},{"alt":null,"id":23877411668067,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17b910e6c8f96883a7a2e9663596b94f8e8c97aa_42a2a402-7ab6-44b5-91ad-87173eb26182.webp?v=1714722203"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17b910e6c8f96883a7a2e9663596b94f8e8c97aa_42a2a402-7ab6-44b5-91ad-87173eb26182.webp?v=1714722203","width":2000},{"alt":null,"id":23877412094051,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c40c2ca21fd386426710c2502bd6ca3e4f468333_a5859937-ab40-414d-9702-5ac5cb46324e.webp?v=1714722206"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c40c2ca21fd386426710c2502bd6ca3e4f468333_a5859937-ab40-414d-9702-5ac5cb46324e.webp?v=1714722206","width":2000},{"alt":null,"id":23877412716643,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72694c15e8495b0ea9cc5f88418bf9f1c1a54dcb_19e8d366-6008-4af8-9dc8-76402256d16c.webp?v=1714722208"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72694c15e8495b0ea9cc5f88418bf9f1c1a54dcb_19e8d366-6008-4af8-9dc8-76402256d16c.webp?v=1714722208","width":2000},{"alt":null,"id":23877413109859,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5cad046c82e9263e27b08b00817a6153952d26d_fa333c34-29ef-403f-8f64-9b922724ebfd.webp?v=1714722211"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5cad046c82e9263e27b08b00817a6153952d26d_fa333c34-29ef-403f-8f64-9b922724ebfd.webp?v=1714722211","width":2000},{"alt":null,"id":23877413699683,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b1270b0ecca4b54d6b2f6dcff4a421cbec6007d_674269d2-cf6c-4eb4-b60e-09d751d38322.webp?v=1714722213"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b1270b0ecca4b54d6b2f6dcff4a421cbec6007d_674269d2-cf6c-4eb4-b60e-09d751d38322.webp?v=1714722213","width":2000},{"alt":null,"id":23877414158435,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f93b77c0fb5c031d3fe8dcdbb8d079f9b122e911_818a38de-dfd7-4ef7-8e02-a3781b60675b.webp?v=1714722216"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f93b77c0fb5c031d3fe8dcdbb8d079f9b122e911_818a38de-dfd7-4ef7-8e02-a3781b60675b.webp?v=1714722216","width":2000},{"alt":null,"id":23877414748259,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a9f598864c4df272d2a7511265db8531a590f885_b9cd89e2-4a77-45dc-b096-b87e6713ad98.webp?v=1714722218"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a9f598864c4df272d2a7511265db8531a590f885_b9cd89e2-4a77-45dc-b096-b87e6713ad98.webp?v=1714722218","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41886447763555,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB32","requires_shipping":true,"taxable":true,"featured_image":{"id":31472496377955,"product_id":7408522887267,"position":8,"created_at":"2024-05-03T15:43:33+08:00","updated_at":"2024-05-03T15:43:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b1270b0ecca4b54d6b2f6dcff4a421cbec6007d_674269d2-cf6c-4eb4-b60e-09d751d38322.webp?v=1714722213","variant_ids":[41886447763555]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Sticker-藍 - 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":"NPB0118724-PB32","featured_media":{"alt":null,"id":23877413699683,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b1270b0ecca4b54d6b2f6dcff4a421cbec6007d_674269d2-cf6c-4eb4-b60e-09d751d38322.webp?v=1714722213"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41886447763555,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB32","requires_shipping":true,"taxable":true,"featured_image":{"id":31472496377955,"product_id":7408522887267,"position":8,"created_at":"2024-05-03T15:43:33+08:00","updated_at":"2024-05-03T15:43:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b1270b0ecca4b54d6b2f6dcff4a421cbec6007d_674269d2-cf6c-4eb4-b60e-09d751d38322.webp?v=1714722213","variant_ids":[41886447763555]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Sticker-藍 - 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":"NPB0118724-PB32","featured_media":{"alt":null,"id":23877413699683,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b1270b0ecca4b54d6b2f6dcff4a421cbec6007d_674269d2-cf6c-4eb4-b60e-09d751d38322.webp?v=1714722213"}},"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: "停產"
}