$product = {"id":7408428023907,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - X翼戰機-經典","handle":"iphone-12-pro-max-mod-nx-printable-pb80","description":null,"published_at":"2024-06-11T16:36:58+08:00","created_at":"2024-05-03T15:24:46+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":41885368057955,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB80","requires_shipping":true,"taxable":true,"featured_image":{"id":31472247865443,"product_id":7408428023907,"position":2,"created_at":"2024-05-03T15:24:50+08:00","updated_at":"2024-05-03T15:24:50+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc39394884ed5973a6c7b4a51ceb089fa29e04f1_9fb11510-ddad-435c-889d-c33880579440.webp?v=1714721090","variant_ids":[41885368057955]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - X翼戰機-經典 - 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-PB80","featured_media":{"alt":null,"id":23877164007523,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc39394884ed5973a6c7b4a51ceb089fa29e04f1_9fb11510-ddad-435c-889d-c33880579440.webp?v=1714721090"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98f86b1d5e81953f7982127d034e4b3a8443b81f_72a606e9-1d7d-40e4-a7bb-86d724054868.webp?v=1714721088","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc39394884ed5973a6c7b4a51ceb089fa29e04f1_9fb11510-ddad-435c-889d-c33880579440.webp?v=1714721090","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b9a7450707509ed07664752a15d1cd52205a354_b4e00ea5-4a80-406a-9a4c-aecd366dd323.webp?v=1714721093","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4dd093aeab45868d5454d16653e0b5522565b3a9_f3d37cdd-ce14-4342-85ed-deebc6ff628d.webp?v=1714721095","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72d71b216045cc489e0021191f539b77182f8ddd_4994d404-e07a-4617-bf03-032852680642.webp?v=1714721098","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/384620ad4055cade1f0c838c4afa066122a62af1_6e50298d-acca-42e1-814f-19a46d3da9d0.webp?v=1714721100","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2da395b18665583d5791d065363f64d6b43aef6a_6d292b9b-fc6c-4e77-b0b6-5f29873d2fb8.webp?v=1714721102","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1dbff4b6f6cb36aae8a4464a6690832c92184f86_da3e1d90-2ab9-43a4-9ec0-1d62a7712d5b.webp?v=1714721105","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f12369b4d223dce513b850e2a96b3ac8411d6d5_0478f6a7-50fb-494f-a177-c66e80e87595.webp?v=1714721107","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/231704484d73cfe9ec1d4efb2803effd6af80622_c00f2d1a-1557-4000-94e5-28754eb7e4b9.webp?v=1714721109"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98f86b1d5e81953f7982127d034e4b3a8443b81f_72a606e9-1d7d-40e4-a7bb-86d724054868.webp?v=1714721088","options":["color"],"media":[{"alt":null,"id":23877163745379,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98f86b1d5e81953f7982127d034e4b3a8443b81f_72a606e9-1d7d-40e4-a7bb-86d724054868.webp?v=1714721088"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98f86b1d5e81953f7982127d034e4b3a8443b81f_72a606e9-1d7d-40e4-a7bb-86d724054868.webp?v=1714721088","width":2000},{"alt":null,"id":23877164007523,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc39394884ed5973a6c7b4a51ceb089fa29e04f1_9fb11510-ddad-435c-889d-c33880579440.webp?v=1714721090"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc39394884ed5973a6c7b4a51ceb089fa29e04f1_9fb11510-ddad-435c-889d-c33880579440.webp?v=1714721090","width":2000},{"alt":null,"id":23877164957795,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b9a7450707509ed07664752a15d1cd52205a354_b4e00ea5-4a80-406a-9a4c-aecd366dd323.webp?v=1714721093"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b9a7450707509ed07664752a15d1cd52205a354_b4e00ea5-4a80-406a-9a4c-aecd366dd323.webp?v=1714721093","width":2000},{"alt":null,"id":23877165219939,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4dd093aeab45868d5454d16653e0b5522565b3a9_f3d37cdd-ce14-4342-85ed-deebc6ff628d.webp?v=1714721095"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4dd093aeab45868d5454d16653e0b5522565b3a9_f3d37cdd-ce14-4342-85ed-deebc6ff628d.webp?v=1714721095","width":2000},{"alt":null,"id":23877166039139,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72d71b216045cc489e0021191f539b77182f8ddd_4994d404-e07a-4617-bf03-032852680642.webp?v=1714721098"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72d71b216045cc489e0021191f539b77182f8ddd_4994d404-e07a-4617-bf03-032852680642.webp?v=1714721098","width":2000},{"alt":null,"id":23877167218787,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/384620ad4055cade1f0c838c4afa066122a62af1_6e50298d-acca-42e1-814f-19a46d3da9d0.webp?v=1714721100"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/384620ad4055cade1f0c838c4afa066122a62af1_6e50298d-acca-42e1-814f-19a46d3da9d0.webp?v=1714721100","width":2000},{"alt":null,"id":23877168627811,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2da395b18665583d5791d065363f64d6b43aef6a_6d292b9b-fc6c-4e77-b0b6-5f29873d2fb8.webp?v=1714721102"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2da395b18665583d5791d065363f64d6b43aef6a_6d292b9b-fc6c-4e77-b0b6-5f29873d2fb8.webp?v=1714721102","width":2000},{"alt":null,"id":23877169053795,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1dbff4b6f6cb36aae8a4464a6690832c92184f86_da3e1d90-2ab9-43a4-9ec0-1d62a7712d5b.webp?v=1714721105"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1dbff4b6f6cb36aae8a4464a6690832c92184f86_da3e1d90-2ab9-43a4-9ec0-1d62a7712d5b.webp?v=1714721105","width":2000},{"alt":null,"id":23877169807459,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f12369b4d223dce513b850e2a96b3ac8411d6d5_0478f6a7-50fb-494f-a177-c66e80e87595.webp?v=1714721107"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f12369b4d223dce513b850e2a96b3ac8411d6d5_0478f6a7-50fb-494f-a177-c66e80e87595.webp?v=1714721107","width":2000},{"alt":null,"id":23877170167907,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/231704484d73cfe9ec1d4efb2803effd6af80622_c00f2d1a-1557-4000-94e5-28754eb7e4b9.webp?v=1714721109"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/231704484d73cfe9ec1d4efb2803effd6af80622_c00f2d1a-1557-4000-94e5-28754eb7e4b9.webp?v=1714721109","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41885368057955,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB80","requires_shipping":true,"taxable":true,"featured_image":{"id":31472247865443,"product_id":7408428023907,"position":2,"created_at":"2024-05-03T15:24:50+08:00","updated_at":"2024-05-03T15:24:50+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc39394884ed5973a6c7b4a51ceb089fa29e04f1_9fb11510-ddad-435c-889d-c33880579440.webp?v=1714721090","variant_ids":[41885368057955]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - X翼戰機-經典 - 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-PB80","featured_media":{"alt":null,"id":23877164007523,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc39394884ed5973a6c7b4a51ceb089fa29e04f1_9fb11510-ddad-435c-889d-c33880579440.webp?v=1714721090"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41885368057955,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB80","requires_shipping":true,"taxable":true,"featured_image":{"id":31472247865443,"product_id":7408428023907,"position":2,"created_at":"2024-05-03T15:24:50+08:00","updated_at":"2024-05-03T15:24:50+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc39394884ed5973a6c7b4a51ceb089fa29e04f1_9fb11510-ddad-435c-889d-c33880579440.webp?v=1714721090","variant_ids":[41885368057955]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - X翼戰機-經典 - 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-PB80","featured_media":{"alt":null,"id":23877164007523,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc39394884ed5973a6c7b4a51ceb089fa29e04f1_9fb11510-ddad-435c-889d-c33880579440.webp?v=1714721090"}},"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: "停產"
}