$product = {"id":7408385753187,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 小圖款-芮","handle":"iphone-12-pro-max-mod-nx-printable-pc05","description":null,"published_at":"2024-06-11T16:35:48+08:00","created_at":"2024-05-03T15:16:09+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":41884897050723,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PC05","requires_shipping":true,"taxable":true,"featured_image":{"id":31472128262243,"product_id":7408385753187,"position":9,"created_at":"2024-05-03T15:16:30+08:00","updated_at":"2024-05-03T15:16:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7054b10236a43cebcee4a135e9e039ee6948acca_71c840b2-8df8-4782-b897-080ffafee4f9.webp?v=1714720590","variant_ids":[41884897050723]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 小圖款-芮 - 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-PC05","featured_media":{"alt":null,"id":23877043748963,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7054b10236a43cebcee4a135e9e039ee6948acca_71c840b2-8df8-4782-b897-080ffafee4f9.webp?v=1714720590"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2ad322054d90b8355799d5af71be891fe1658b8_b7a3cfef-1cb3-4393-bfef-44f66356ac93.webp?v=1714720572","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/82356e5bd6ac8d8c96e44c499aec9aa142be4f09_afc68d1f-8945-4bf3-afd3-cd4064346e21.webp?v=1714720574","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/276b1dc34c489acdce175392bd1c9077a528141b_73eb596f-9438-4bd0-ae64-ce97e4a00fa2.webp?v=1714720576","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d255fec694a6cc8ae02812801216cf722c629722_13df0167-c992-48bf-a1f3-17deb4e25ea5.webp?v=1714720578","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57549603ac2ff2d3f1c8a7db941c1006d44843fd_4b2fd0d9-edc8-439a-a79d-3784ed6d41c8.webp?v=1714720581","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/002a07ece6d7ca4f81008406e6125d21eb7b837e_1ba9d116-5132-4ed3-8064-9242db9ad7d3.webp?v=1714720583","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76461d8634dd5d931bd99f8fa77ad402c6b02324_a263a7b0-edf9-4dc5-ab40-58656bc80d21.webp?v=1714720585","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4ac55bd8ca6f1f76f15583b406b6f0db16c23c16_8897fc32-d174-4ebe-b4ba-51f27084888a.webp?v=1714720588","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7054b10236a43cebcee4a135e9e039ee6948acca_71c840b2-8df8-4782-b897-080ffafee4f9.webp?v=1714720590","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a082f8de057dfe8e20bd28fded999e303b0a0f88_d2a7fcbe-bc67-41fd-8ddd-6f58b056b339.webp?v=1714720592"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2ad322054d90b8355799d5af71be891fe1658b8_b7a3cfef-1cb3-4393-bfef-44f66356ac93.webp?v=1714720572","options":["color"],"media":[{"alt":null,"id":23877039849571,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2ad322054d90b8355799d5af71be891fe1658b8_b7a3cfef-1cb3-4393-bfef-44f66356ac93.webp?v=1714720572"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2ad322054d90b8355799d5af71be891fe1658b8_b7a3cfef-1cb3-4393-bfef-44f66356ac93.webp?v=1714720572","width":2000},{"alt":null,"id":23877040341091,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/82356e5bd6ac8d8c96e44c499aec9aa142be4f09_afc68d1f-8945-4bf3-afd3-cd4064346e21.webp?v=1714720574"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/82356e5bd6ac8d8c96e44c499aec9aa142be4f09_afc68d1f-8945-4bf3-afd3-cd4064346e21.webp?v=1714720574","width":2000},{"alt":null,"id":23877040734307,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/276b1dc34c489acdce175392bd1c9077a528141b_73eb596f-9438-4bd0-ae64-ce97e4a00fa2.webp?v=1714720576"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/276b1dc34c489acdce175392bd1c9077a528141b_73eb596f-9438-4bd0-ae64-ce97e4a00fa2.webp?v=1714720576","width":2000},{"alt":null,"id":23877041258595,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d255fec694a6cc8ae02812801216cf722c629722_13df0167-c992-48bf-a1f3-17deb4e25ea5.webp?v=1714720578"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d255fec694a6cc8ae02812801216cf722c629722_13df0167-c992-48bf-a1f3-17deb4e25ea5.webp?v=1714720578","width":2000},{"alt":null,"id":23877041750115,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57549603ac2ff2d3f1c8a7db941c1006d44843fd_4b2fd0d9-edc8-439a-a79d-3784ed6d41c8.webp?v=1714720581"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57549603ac2ff2d3f1c8a7db941c1006d44843fd_4b2fd0d9-edc8-439a-a79d-3784ed6d41c8.webp?v=1714720581","width":2000},{"alt":null,"id":23877042372707,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/002a07ece6d7ca4f81008406e6125d21eb7b837e_1ba9d116-5132-4ed3-8064-9242db9ad7d3.webp?v=1714720583"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/002a07ece6d7ca4f81008406e6125d21eb7b837e_1ba9d116-5132-4ed3-8064-9242db9ad7d3.webp?v=1714720583","width":2000},{"alt":null,"id":23877042962531,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76461d8634dd5d931bd99f8fa77ad402c6b02324_a263a7b0-edf9-4dc5-ab40-58656bc80d21.webp?v=1714720585"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76461d8634dd5d931bd99f8fa77ad402c6b02324_a263a7b0-edf9-4dc5-ab40-58656bc80d21.webp?v=1714720585","width":2000},{"alt":null,"id":23877043290211,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4ac55bd8ca6f1f76f15583b406b6f0db16c23c16_8897fc32-d174-4ebe-b4ba-51f27084888a.webp?v=1714720588"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4ac55bd8ca6f1f76f15583b406b6f0db16c23c16_8897fc32-d174-4ebe-b4ba-51f27084888a.webp?v=1714720588","width":2000},{"alt":null,"id":23877043748963,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7054b10236a43cebcee4a135e9e039ee6948acca_71c840b2-8df8-4782-b897-080ffafee4f9.webp?v=1714720590"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7054b10236a43cebcee4a135e9e039ee6948acca_71c840b2-8df8-4782-b897-080ffafee4f9.webp?v=1714720590","width":2000},{"alt":null,"id":23877044306019,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a082f8de057dfe8e20bd28fded999e303b0a0f88_d2a7fcbe-bc67-41fd-8ddd-6f58b056b339.webp?v=1714720592"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a082f8de057dfe8e20bd28fded999e303b0a0f88_d2a7fcbe-bc67-41fd-8ddd-6f58b056b339.webp?v=1714720592","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41884897050723,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PC05","requires_shipping":true,"taxable":true,"featured_image":{"id":31472128262243,"product_id":7408385753187,"position":9,"created_at":"2024-05-03T15:16:30+08:00","updated_at":"2024-05-03T15:16:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7054b10236a43cebcee4a135e9e039ee6948acca_71c840b2-8df8-4782-b897-080ffafee4f9.webp?v=1714720590","variant_ids":[41884897050723]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 小圖款-芮 - 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-PC05","featured_media":{"alt":null,"id":23877043748963,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7054b10236a43cebcee4a135e9e039ee6948acca_71c840b2-8df8-4782-b897-080ffafee4f9.webp?v=1714720590"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41884897050723,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PC05","requires_shipping":true,"taxable":true,"featured_image":{"id":31472128262243,"product_id":7408385753187,"position":9,"created_at":"2024-05-03T15:16:30+08:00","updated_at":"2024-05-03T15:16:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7054b10236a43cebcee4a135e9e039ee6948acca_71c840b2-8df8-4782-b897-080ffafee4f9.webp?v=1714720590","variant_ids":[41884897050723]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 小圖款-芮 - 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-PC05","featured_media":{"alt":null,"id":23877043748963,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7054b10236a43cebcee4a135e9e039ee6948acca_71c840b2-8df8-4782-b897-080ffafee4f9.webp?v=1714720590"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}};
$device_handle = null;
$type = "";
var sellingStatus
if ($isMerge) {
$(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: "停產"
}