$product = {"id":7415887855715,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具1-白","handle":"iphone-xs-max-mod-nx-printable-pb10","description":null,"published_at":"2024-06-11T16:47:06+08:00","created_at":"2024-05-06T12:18:43+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 XS 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":41915218690147,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB10","requires_shipping":true,"taxable":true,"featured_image":{"id":31490663579747,"product_id":7415887855715,"position":9,"created_at":"2024-05-06T12:19:05+08:00","updated_at":"2024-05-06T12:19:05+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/41ffed6156886c0ba77b7fc66e299d293e31915c_abd74e9f-d248-45dd-9c29-89b98679ebcd.webp?v=1714969145","variant_ids":[41915218690147]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具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":"NPB0108624-PB10","featured_media":{"alt":null,"id":23896070226019,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/41ffed6156886c0ba77b7fc66e299d293e31915c_abd74e9f-d248-45dd-9c29-89b98679ebcd.webp?v=1714969145"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3686fd4cb2bcfc4470afa773969241ed25a44d9f_0ee08c2e-ac9a-4191-a190-639186e1fbca.webp?v=1714969125","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e190a33c1d8db4602c1c65e8e25dbded71e0e920_86bb8abf-9b97-4cf6-b193-6b20e4b4e22c.webp?v=1714969128","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b21dd1cb59b0df2e2fc395414caded44ae6e875_4415b9a0-1656-402a-aaa5-11a51e8cbaa3.webp?v=1714969130","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3facc0c9bfc36c0bc01db0749d68b863316903e5_c7b2536f-cd3f-4d71-8e65-a2c0823be664.webp?v=1714969133","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17b8e8ef5c45618d51bc95f6a80a04e58cfc4c54_6953aa0e-527d-483d-91e6-5381a1387a68.webp?v=1714969136","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5387bcfe62eca4e03c61ebc9ebf1dd57c9236722_ad544bfe-1f9a-43a6-ba8b-320d6ed6e8b7.webp?v=1714969138","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/147adba81473c1c53ec9d57cbbb075f5726d0b17_2c885e12-b7e6-4ba5-89e1-5a230d694461.webp?v=1714969140","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/818b08b458e17d8bf1744c0288cfb3c1c8e5ae08_e051382b-14e5-4b1e-ab10-1978f6edcba4.webp?v=1714969143","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/41ffed6156886c0ba77b7fc66e299d293e31915c_abd74e9f-d248-45dd-9c29-89b98679ebcd.webp?v=1714969145","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c776ccb6f9156b05179d44f823386fdfbe6b841b_774bfe4d-d8dc-47c4-8318-9027a8305910.webp?v=1714969148"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3686fd4cb2bcfc4470afa773969241ed25a44d9f_0ee08c2e-ac9a-4191-a190-639186e1fbca.webp?v=1714969125","options":["color"],"media":[{"alt":null,"id":23896065146979,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3686fd4cb2bcfc4470afa773969241ed25a44d9f_0ee08c2e-ac9a-4191-a190-639186e1fbca.webp?v=1714969125"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3686fd4cb2bcfc4470afa773969241ed25a44d9f_0ee08c2e-ac9a-4191-a190-639186e1fbca.webp?v=1714969125","width":2000},{"alt":null,"id":23896065769571,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e190a33c1d8db4602c1c65e8e25dbded71e0e920_86bb8abf-9b97-4cf6-b193-6b20e4b4e22c.webp?v=1714969128"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e190a33c1d8db4602c1c65e8e25dbded71e0e920_86bb8abf-9b97-4cf6-b193-6b20e4b4e22c.webp?v=1714969128","width":2000},{"alt":null,"id":23896066359395,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b21dd1cb59b0df2e2fc395414caded44ae6e875_4415b9a0-1656-402a-aaa5-11a51e8cbaa3.webp?v=1714969130"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b21dd1cb59b0df2e2fc395414caded44ae6e875_4415b9a0-1656-402a-aaa5-11a51e8cbaa3.webp?v=1714969130","width":2000},{"alt":null,"id":23896067080291,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3facc0c9bfc36c0bc01db0749d68b863316903e5_c7b2536f-cd3f-4d71-8e65-a2c0823be664.webp?v=1714969133"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3facc0c9bfc36c0bc01db0749d68b863316903e5_c7b2536f-cd3f-4d71-8e65-a2c0823be664.webp?v=1714969133","width":2000},{"alt":null,"id":23896067670115,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17b8e8ef5c45618d51bc95f6a80a04e58cfc4c54_6953aa0e-527d-483d-91e6-5381a1387a68.webp?v=1714969136"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17b8e8ef5c45618d51bc95f6a80a04e58cfc4c54_6953aa0e-527d-483d-91e6-5381a1387a68.webp?v=1714969136","width":2000},{"alt":null,"id":23896068227171,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5387bcfe62eca4e03c61ebc9ebf1dd57c9236722_ad544bfe-1f9a-43a6-ba8b-320d6ed6e8b7.webp?v=1714969138"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5387bcfe62eca4e03c61ebc9ebf1dd57c9236722_ad544bfe-1f9a-43a6-ba8b-320d6ed6e8b7.webp?v=1714969138","width":2000},{"alt":null,"id":23896068751459,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/147adba81473c1c53ec9d57cbbb075f5726d0b17_2c885e12-b7e6-4ba5-89e1-5a230d694461.webp?v=1714969140"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/147adba81473c1c53ec9d57cbbb075f5726d0b17_2c885e12-b7e6-4ba5-89e1-5a230d694461.webp?v=1714969140","width":2000},{"alt":null,"id":23896069242979,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/818b08b458e17d8bf1744c0288cfb3c1c8e5ae08_e051382b-14e5-4b1e-ab10-1978f6edcba4.webp?v=1714969143"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/818b08b458e17d8bf1744c0288cfb3c1c8e5ae08_e051382b-14e5-4b1e-ab10-1978f6edcba4.webp?v=1714969143","width":2000},{"alt":null,"id":23896070226019,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/41ffed6156886c0ba77b7fc66e299d293e31915c_abd74e9f-d248-45dd-9c29-89b98679ebcd.webp?v=1714969145"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/41ffed6156886c0ba77b7fc66e299d293e31915c_abd74e9f-d248-45dd-9c29-89b98679ebcd.webp?v=1714969145","width":2000},{"alt":null,"id":23896070717539,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c776ccb6f9156b05179d44f823386fdfbe6b841b_774bfe4d-d8dc-47c4-8318-9027a8305910.webp?v=1714969148"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c776ccb6f9156b05179d44f823386fdfbe6b841b_774bfe4d-d8dc-47c4-8318-9027a8305910.webp?v=1714969148","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41915218690147,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB10","requires_shipping":true,"taxable":true,"featured_image":{"id":31490663579747,"product_id":7415887855715,"position":9,"created_at":"2024-05-06T12:19:05+08:00","updated_at":"2024-05-06T12:19:05+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/41ffed6156886c0ba77b7fc66e299d293e31915c_abd74e9f-d248-45dd-9c29-89b98679ebcd.webp?v=1714969145","variant_ids":[41915218690147]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具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":"NPB0108624-PB10","featured_media":{"alt":null,"id":23896070226019,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/41ffed6156886c0ba77b7fc66e299d293e31915c_abd74e9f-d248-45dd-9c29-89b98679ebcd.webp?v=1714969145"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41915218690147,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB10","requires_shipping":true,"taxable":true,"featured_image":{"id":31490663579747,"product_id":7415887855715,"position":9,"created_at":"2024-05-06T12:19:05+08:00","updated_at":"2024-05-06T12:19:05+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/41ffed6156886c0ba77b7fc66e299d293e31915c_abd74e9f-d248-45dd-9c29-89b98679ebcd.webp?v=1714969145","variant_ids":[41915218690147]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具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":"NPB0108624-PB10","featured_media":{"alt":null,"id":23896070226019,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/41ffed6156886c0ba77b7fc66e299d293e31915c_abd74e9f-d248-45dd-9c29-89b98679ebcd.webp?v=1714969145"}},"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: "停產"
}