$product = {"id":7408513286243,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士\u0026尤達-剪紙系列","handle":"iphone-12-pro-max-mod-nx-printable-pb54","description":null,"published_at":"2024-06-11T16:39:21+08:00","created_at":"2024-05-03T15:41:19+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":41886332190819,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB54","requires_shipping":true,"taxable":true,"featured_image":{"id":31472471605347,"product_id":7408513286243,"position":8,"created_at":"2024-05-03T15:41:38+08:00","updated_at":"2024-05-03T15:41:38+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbac67d5e21e0e26b1c32fdf0fdf59c3c6acda02_fe75fc00-fd18-4987-af7c-3a79bcfc1d40.webp?v=1714722098","variant_ids":[41886332190819]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士\u0026尤達-剪紙系列 - 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-PB54","featured_media":{"alt":null,"id":23877388828771,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbac67d5e21e0e26b1c32fdf0fdf59c3c6acda02_fe75fc00-fd18-4987-af7c-3a79bcfc1d40.webp?v=1714722098"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fe0c865bc8d72b2ef20bb7d0739d76b857f0463_3a592aee-205d-449b-92d3-6504a551bfbb.webp?v=1714722082","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5ecc5463ebe9251d4bc34e3f8389cbf67cab0247_ef15daa5-d882-4dad-a25e-6f7d3a4f6169.webp?v=1714722084","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08d41193a1fb486e7b2d00e108873a264838c589_b3663b94-089a-432c-8601-01940b71e621.webp?v=1714722087","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/377d38b94e7a8f5525b4eff28b08454653a20654_385d9105-a4a8-4019-af9e-19f2dded750e.webp?v=1714722089","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08efba0c3bb2b0a4ca903575ac2559230ffb73b9_91f887a3-7b23-4479-9445-25f49d85b8a3.webp?v=1714722091","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b8883a5b0333b02e5e4680e38386c20fc15913f_34c8de8a-3e8f-4881-860f-c97331b356fa.webp?v=1714722094","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a1d40ecb3847f2bbbbe8080bc39288010953523e_549954d9-4391-42d3-a2dc-03ed5325bc6c.webp?v=1714722096","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbac67d5e21e0e26b1c32fdf0fdf59c3c6acda02_fe75fc00-fd18-4987-af7c-3a79bcfc1d40.webp?v=1714722098","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f984f0ff3d7210fd1a4d8b51af7c625b5bc65fc_e87fa2f6-4d67-4f9f-9890-19871b996abc.webp?v=1714722101","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/70b68935dd4d2683203639311153905f8a39c7d7_060a897d-f92d-4f37-a9ea-72517abfda82.webp?v=1714722103"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fe0c865bc8d72b2ef20bb7d0739d76b857f0463_3a592aee-205d-449b-92d3-6504a551bfbb.webp?v=1714722082","options":["color"],"media":[{"alt":null,"id":23877384863843,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fe0c865bc8d72b2ef20bb7d0739d76b857f0463_3a592aee-205d-449b-92d3-6504a551bfbb.webp?v=1714722082"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fe0c865bc8d72b2ef20bb7d0739d76b857f0463_3a592aee-205d-449b-92d3-6504a551bfbb.webp?v=1714722082","width":2000},{"alt":null,"id":23877385453667,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5ecc5463ebe9251d4bc34e3f8389cbf67cab0247_ef15daa5-d882-4dad-a25e-6f7d3a4f6169.webp?v=1714722084"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5ecc5463ebe9251d4bc34e3f8389cbf67cab0247_ef15daa5-d882-4dad-a25e-6f7d3a4f6169.webp?v=1714722084","width":2000},{"alt":null,"id":23877386076259,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08d41193a1fb486e7b2d00e108873a264838c589_b3663b94-089a-432c-8601-01940b71e621.webp?v=1714722087"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08d41193a1fb486e7b2d00e108873a264838c589_b3663b94-089a-432c-8601-01940b71e621.webp?v=1714722087","width":2000},{"alt":null,"id":23877386698851,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/377d38b94e7a8f5525b4eff28b08454653a20654_385d9105-a4a8-4019-af9e-19f2dded750e.webp?v=1714722089"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/377d38b94e7a8f5525b4eff28b08454653a20654_385d9105-a4a8-4019-af9e-19f2dded750e.webp?v=1714722089","width":2000},{"alt":null,"id":23877387223139,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08efba0c3bb2b0a4ca903575ac2559230ffb73b9_91f887a3-7b23-4479-9445-25f49d85b8a3.webp?v=1714722091"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08efba0c3bb2b0a4ca903575ac2559230ffb73b9_91f887a3-7b23-4479-9445-25f49d85b8a3.webp?v=1714722091","width":2000},{"alt":null,"id":23877387714659,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b8883a5b0333b02e5e4680e38386c20fc15913f_34c8de8a-3e8f-4881-860f-c97331b356fa.webp?v=1714722094"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b8883a5b0333b02e5e4680e38386c20fc15913f_34c8de8a-3e8f-4881-860f-c97331b356fa.webp?v=1714722094","width":2000},{"alt":null,"id":23877388370019,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a1d40ecb3847f2bbbbe8080bc39288010953523e_549954d9-4391-42d3-a2dc-03ed5325bc6c.webp?v=1714722096"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a1d40ecb3847f2bbbbe8080bc39288010953523e_549954d9-4391-42d3-a2dc-03ed5325bc6c.webp?v=1714722096","width":2000},{"alt":null,"id":23877388828771,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbac67d5e21e0e26b1c32fdf0fdf59c3c6acda02_fe75fc00-fd18-4987-af7c-3a79bcfc1d40.webp?v=1714722098"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbac67d5e21e0e26b1c32fdf0fdf59c3c6acda02_fe75fc00-fd18-4987-af7c-3a79bcfc1d40.webp?v=1714722098","width":2000},{"alt":null,"id":23877389451363,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f984f0ff3d7210fd1a4d8b51af7c625b5bc65fc_e87fa2f6-4d67-4f9f-9890-19871b996abc.webp?v=1714722101"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f984f0ff3d7210fd1a4d8b51af7c625b5bc65fc_e87fa2f6-4d67-4f9f-9890-19871b996abc.webp?v=1714722101","width":2000},{"alt":null,"id":23877389942883,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/70b68935dd4d2683203639311153905f8a39c7d7_060a897d-f92d-4f37-a9ea-72517abfda82.webp?v=1714722103"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/70b68935dd4d2683203639311153905f8a39c7d7_060a897d-f92d-4f37-a9ea-72517abfda82.webp?v=1714722103","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41886332190819,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB54","requires_shipping":true,"taxable":true,"featured_image":{"id":31472471605347,"product_id":7408513286243,"position":8,"created_at":"2024-05-03T15:41:38+08:00","updated_at":"2024-05-03T15:41:38+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbac67d5e21e0e26b1c32fdf0fdf59c3c6acda02_fe75fc00-fd18-4987-af7c-3a79bcfc1d40.webp?v=1714722098","variant_ids":[41886332190819]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士\u0026尤達-剪紙系列 - 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-PB54","featured_media":{"alt":null,"id":23877388828771,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbac67d5e21e0e26b1c32fdf0fdf59c3c6acda02_fe75fc00-fd18-4987-af7c-3a79bcfc1d40.webp?v=1714722098"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41886332190819,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB54","requires_shipping":true,"taxable":true,"featured_image":{"id":31472471605347,"product_id":7408513286243,"position":8,"created_at":"2024-05-03T15:41:38+08:00","updated_at":"2024-05-03T15:41:38+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbac67d5e21e0e26b1c32fdf0fdf59c3c6acda02_fe75fc00-fd18-4987-af7c-3a79bcfc1d40.webp?v=1714722098","variant_ids":[41886332190819]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士\u0026尤達-剪紙系列 - 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-PB54","featured_media":{"alt":null,"id":23877388828771,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbac67d5e21e0e26b1c32fdf0fdf59c3c6acda02_fe75fc00-fd18-4987-af7c-3a79bcfc1d40.webp?v=1714722098"}},"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: "停產"
}