$product = {"id":7408224927843,"title":"犀牛盾Mod NX手機殼 - iPhone 13 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - K2SO 1-俠盜一號","handle":"iphone-13-pro-max-mod-nx-printable-pb68","description":null,"published_at":"2024-06-11T16:34:43+08:00","created_at":"2024-05-03T12:24:12+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 13 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":41884051112035,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0123224-PB68","requires_shipping":true,"taxable":true,"featured_image":{"id":31471519268963,"product_id":7408224927843,"position":8,"created_at":"2024-05-03T12:24:31+08:00","updated_at":"2024-05-03T12:24:31+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2e6b08f8af7fda60343c802d25eea29234f1ec1_d8bd9c7d-b253-4ae4-a72b-1a45105ad406.webp?v=1714710271","variant_ids":[41884051112035]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 13 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - K2SO 1-俠盜一號 - 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":"NPB0123224-PB68","featured_media":{"alt":null,"id":23876425810019,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2e6b08f8af7fda60343c802d25eea29234f1ec1_d8bd9c7d-b253-4ae4-a72b-1a45105ad406.webp?v=1714710271"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41884051406947,"title":"Mod NX-海軍藍邊框","option1":"Mod NX-海軍藍邊框","option2":null,"option3":null,"sku":"NPB01232J5-PB68","requires_shipping":true,"taxable":true,"featured_image":{"id":31471517073507,"product_id":7408224927843,"position":4,"created_at":"2024-05-03T12:24:21+08:00","updated_at":"2024-05-03T12:24:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7fab1e11cd9f4610018cd3a7092bceae6845f9c9_bce6e8e2-052f-4667-965e-204edc28f7d9.webp?v=1714710261","variant_ids":[41884051406947]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 13 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - K2SO 1-俠盜一號 - 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":"NPB01232J5-PB68","featured_media":{"alt":null,"id":23876423614563,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7fab1e11cd9f4610018cd3a7092bceae6845f9c9_bce6e8e2-052f-4667-965e-204edc28f7d9.webp?v=1714710261"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a9ea24e32354ddc11cbcd20764b0a71d7bf88ef4_c8e9f9d5-07aa-4c25-a121-0e7a26c51ad3.webp?v=1714710254","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b5f45c5ffd12f8ae3d77ab352e0d1f983cefe142_a3098a36-6c3d-49a0-a746-458cdcddb8de.webp?v=1714710256","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b183d987f1e243e313f3c98c5b512b8c5bc5004_de392cdf-e857-4a3e-aa4a-db5d135d25b4.webp?v=1714710259","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7fab1e11cd9f4610018cd3a7092bceae6845f9c9_bce6e8e2-052f-4667-965e-204edc28f7d9.webp?v=1714710261","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/665d521ada7342951406a707fff3f94162f6d50f_a1f9aa99-e912-49c6-bd53-887eb4322487.webp?v=1714710263","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0461d33b7cf4533fda8063192e4fcd6f0227b9f3_ce3b6bd4-c30b-4885-a67b-a1884de9801a.webp?v=1714710266","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32dcf186a6e8df4fdabf78ecc28efd4ec0a234a4_3e4a16b2-3f4e-4969-ba66-0ad6ccbc7cbb.webp?v=1714710269","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2e6b08f8af7fda60343c802d25eea29234f1ec1_d8bd9c7d-b253-4ae4-a72b-1a45105ad406.webp?v=1714710271","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/267bacacab6889995e8d23f2469232756a7406b4_e7beced9-a379-4cca-9af2-809355f96e8c.webp?v=1714710274","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/200a8f685c4829d674c400ad4834f8cc2ad91786_bb7c0187-3502-48a3-9ec1-da32e8900085.webp?v=1714710276"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a9ea24e32354ddc11cbcd20764b0a71d7bf88ef4_c8e9f9d5-07aa-4c25-a121-0e7a26c51ad3.webp?v=1714710254","options":["color"],"media":[{"alt":null,"id":23876421746787,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a9ea24e32354ddc11cbcd20764b0a71d7bf88ef4_c8e9f9d5-07aa-4c25-a121-0e7a26c51ad3.webp?v=1714710254"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a9ea24e32354ddc11cbcd20764b0a71d7bf88ef4_c8e9f9d5-07aa-4c25-a121-0e7a26c51ad3.webp?v=1714710254","width":2000},{"alt":null,"id":23876422336611,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b5f45c5ffd12f8ae3d77ab352e0d1f983cefe142_a3098a36-6c3d-49a0-a746-458cdcddb8de.webp?v=1714710256"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b5f45c5ffd12f8ae3d77ab352e0d1f983cefe142_a3098a36-6c3d-49a0-a746-458cdcddb8de.webp?v=1714710256","width":2000},{"alt":null,"id":23876423123043,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b183d987f1e243e313f3c98c5b512b8c5bc5004_de392cdf-e857-4a3e-aa4a-db5d135d25b4.webp?v=1714710259"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b183d987f1e243e313f3c98c5b512b8c5bc5004_de392cdf-e857-4a3e-aa4a-db5d135d25b4.webp?v=1714710259","width":2000},{"alt":null,"id":23876423614563,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7fab1e11cd9f4610018cd3a7092bceae6845f9c9_bce6e8e2-052f-4667-965e-204edc28f7d9.webp?v=1714710261"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7fab1e11cd9f4610018cd3a7092bceae6845f9c9_bce6e8e2-052f-4667-965e-204edc28f7d9.webp?v=1714710261","width":2000},{"alt":null,"id":23876424040547,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/665d521ada7342951406a707fff3f94162f6d50f_a1f9aa99-e912-49c6-bd53-887eb4322487.webp?v=1714710263"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/665d521ada7342951406a707fff3f94162f6d50f_a1f9aa99-e912-49c6-bd53-887eb4322487.webp?v=1714710263","width":2000},{"alt":null,"id":23876424597603,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0461d33b7cf4533fda8063192e4fcd6f0227b9f3_ce3b6bd4-c30b-4885-a67b-a1884de9801a.webp?v=1714710266"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0461d33b7cf4533fda8063192e4fcd6f0227b9f3_ce3b6bd4-c30b-4885-a67b-a1884de9801a.webp?v=1714710266","width":2000},{"alt":null,"id":23876425089123,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32dcf186a6e8df4fdabf78ecc28efd4ec0a234a4_3e4a16b2-3f4e-4969-ba66-0ad6ccbc7cbb.webp?v=1714710269"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32dcf186a6e8df4fdabf78ecc28efd4ec0a234a4_3e4a16b2-3f4e-4969-ba66-0ad6ccbc7cbb.webp?v=1714710269","width":2000},{"alt":null,"id":23876425810019,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2e6b08f8af7fda60343c802d25eea29234f1ec1_d8bd9c7d-b253-4ae4-a72b-1a45105ad406.webp?v=1714710271"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2e6b08f8af7fda60343c802d25eea29234f1ec1_d8bd9c7d-b253-4ae4-a72b-1a45105ad406.webp?v=1714710271","width":2000},{"alt":null,"id":23876426334307,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/267bacacab6889995e8d23f2469232756a7406b4_e7beced9-a379-4cca-9af2-809355f96e8c.webp?v=1714710274"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/267bacacab6889995e8d23f2469232756a7406b4_e7beced9-a379-4cca-9af2-809355f96e8c.webp?v=1714710274","width":2000},{"alt":null,"id":23876426825827,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/200a8f685c4829d674c400ad4834f8cc2ad91786_bb7c0187-3502-48a3-9ec1-da32e8900085.webp?v=1714710276"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/200a8f685c4829d674c400ad4834f8cc2ad91786_bb7c0187-3502-48a3-9ec1-da32e8900085.webp?v=1714710276","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$bumper = null;
$variants = [{"id":41884051112035,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0123224-PB68","requires_shipping":true,"taxable":true,"featured_image":{"id":31471519268963,"product_id":7408224927843,"position":8,"created_at":"2024-05-03T12:24:31+08:00","updated_at":"2024-05-03T12:24:31+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2e6b08f8af7fda60343c802d25eea29234f1ec1_d8bd9c7d-b253-4ae4-a72b-1a45105ad406.webp?v=1714710271","variant_ids":[41884051112035]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 13 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - K2SO 1-俠盜一號 - 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":"NPB0123224-PB68","featured_media":{"alt":null,"id":23876425810019,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2e6b08f8af7fda60343c802d25eea29234f1ec1_d8bd9c7d-b253-4ae4-a72b-1a45105ad406.webp?v=1714710271"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41884051406947,"title":"Mod NX-海軍藍邊框","option1":"Mod NX-海軍藍邊框","option2":null,"option3":null,"sku":"NPB01232J5-PB68","requires_shipping":true,"taxable":true,"featured_image":{"id":31471517073507,"product_id":7408224927843,"position":4,"created_at":"2024-05-03T12:24:21+08:00","updated_at":"2024-05-03T12:24:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7fab1e11cd9f4610018cd3a7092bceae6845f9c9_bce6e8e2-052f-4667-965e-204edc28f7d9.webp?v=1714710261","variant_ids":[41884051406947]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 13 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - K2SO 1-俠盜一號 - 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":"NPB01232J5-PB68","featured_media":{"alt":null,"id":23876423614563,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7fab1e11cd9f4610018cd3a7092bceae6845f9c9_bce6e8e2-052f-4667-965e-204edc28f7d9.webp?v=1714710261"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41884051112035,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0123224-PB68","requires_shipping":true,"taxable":true,"featured_image":{"id":31471519268963,"product_id":7408224927843,"position":8,"created_at":"2024-05-03T12:24:31+08:00","updated_at":"2024-05-03T12:24:31+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2e6b08f8af7fda60343c802d25eea29234f1ec1_d8bd9c7d-b253-4ae4-a72b-1a45105ad406.webp?v=1714710271","variant_ids":[41884051112035]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 13 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - K2SO 1-俠盜一號 - 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":"NPB0123224-PB68","featured_media":{"alt":null,"id":23876425810019,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2e6b08f8af7fda60343c802d25eea29234f1ec1_d8bd9c7d-b253-4ae4-a72b-1a45105ad406.webp?v=1714710271"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}};
$device_handle = null
var sellingStatus
if ($bumper) {
$(document).ready(function() {
var productImg = $product.images[0]
var bumperVariants = $bumper.variants;
var bumperColors = new Object();
var currentVariant = '';
var productType = '';
bumperVariants.forEach(variant => {
bumperColors[`${variant.title.split(' (')[0].toLowerCase()}`] = variant.featured_image.src;
});
if (productType === 'mod-nx-backplate' || productType === 'mod-backplate') {
mergeImages(
[productImg, bumperColors[currentVariant]],
{ crossOrigin: 'anonymous' }
).then(mergedImg => {
$('.merged-img').attr('src', mergedImg);
});
} else {
mergeImages(
[bumperColors[currentVariant], productImg],
{ crossOrigin: 'anonymous' }
).then(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: "停產"
}