$product = {"id":7414955081827,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 迪士尼-星際大戰 Star Wars - 千年鷹-線條白","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-pb14","description":null,"published_at":"2024-06-11T17:54:03+08:00","created_at":"2024-05-05T19:55:22+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 12 pro max","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-star-wars","Top50","type-Mod NX Printable MagSafe Printable"],"price":110000,"price_min":110000,"price_max":110000,"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":41910320300131,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-PB14","requires_shipping":true,"taxable":true,"featured_image":{"id":31487772557411,"product_id":7414955081827,"position":6,"created_at":"2024-05-05T19:55:37+08:00","updated_at":"2024-05-05T19:55:37+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2391a80662d1e396e31738dee1b1db855ea8e28_651a4749-67cf-4256-ab78-aa0a215844e8.webp?v=1714910137","variant_ids":[41910320300131]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 迪士尼-星際大戰 Star Wars - 千年鷹-線條白 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118724-PB14","featured_media":{"alt":null,"id":23893116420195,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2391a80662d1e396e31738dee1b1db855ea8e28_651a4749-67cf-4256-ab78-aa0a215844e8.webp?v=1714910137"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d9523669662d752f7667c002c4d4116f4e70b352_f7cb9a7c-9b33-43f3-98e9-aae37c1af8ae.webp?v=1714910124","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/33f0d262522bed1074f0ba22f33c6a2ee0096c9c_8a218017-8643-47b3-abfa-c5bb5b329f6c.webp?v=1714910127","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/542e109df17e03838d633aa6276f753dc72b40bf_5ccf6711-9249-494e-9ebe-1172ee7f9433.webp?v=1714910129","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c795371f2af2916abab557dfe35084bf1fbe2a3_6eb3f71e-f2d1-4ca0-8b48-5c5f4c9ed8bd.webp?v=1714910132","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63b650be66e508eee06622b50f72836a043db0b1_43edfba1-e7be-4593-b378-b25eb9feb602.webp?v=1714910134","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2391a80662d1e396e31738dee1b1db855ea8e28_651a4749-67cf-4256-ab78-aa0a215844e8.webp?v=1714910137","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/496ac3d483bb9d18f8586b5fd5e24c9d38b2b93a_d89e00f6-ed61-469d-8a35-c2671f423658.webp?v=1714910140","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd49eeedc84f6fc64c46e3a35e1f58f8063b2a9e_22409e9a-34c1-4dfd-9a07-0d17b6dfb818.webp?v=1714910143","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ece53669c041bd5552639af1147dae7955a44f6_cc8332fb-2437-4d04-86c9-53b991a36eab.webp?v=1714910145","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a7a97fa3622fe9c584b25fae058c9bfd3b86ada7_a8e5044b-759d-4daf-b1ff-1c5f977f55ab.webp?v=1714910148"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d9523669662d752f7667c002c4d4116f4e70b352_f7cb9a7c-9b33-43f3-98e9-aae37c1af8ae.webp?v=1714910124","options":["color"],"media":[{"alt":null,"id":23893113208931,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d9523669662d752f7667c002c4d4116f4e70b352_f7cb9a7c-9b33-43f3-98e9-aae37c1af8ae.webp?v=1714910124"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d9523669662d752f7667c002c4d4116f4e70b352_f7cb9a7c-9b33-43f3-98e9-aae37c1af8ae.webp?v=1714910124","width":2000},{"alt":null,"id":23893114159203,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/33f0d262522bed1074f0ba22f33c6a2ee0096c9c_8a218017-8643-47b3-abfa-c5bb5b329f6c.webp?v=1714910127"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/33f0d262522bed1074f0ba22f33c6a2ee0096c9c_8a218017-8643-47b3-abfa-c5bb5b329f6c.webp?v=1714910127","width":2000},{"alt":null,"id":23893114585187,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/542e109df17e03838d633aa6276f753dc72b40bf_5ccf6711-9249-494e-9ebe-1172ee7f9433.webp?v=1714910129"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/542e109df17e03838d633aa6276f753dc72b40bf_5ccf6711-9249-494e-9ebe-1172ee7f9433.webp?v=1714910129","width":2000},{"alt":null,"id":23893115207779,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c795371f2af2916abab557dfe35084bf1fbe2a3_6eb3f71e-f2d1-4ca0-8b48-5c5f4c9ed8bd.webp?v=1714910132"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c795371f2af2916abab557dfe35084bf1fbe2a3_6eb3f71e-f2d1-4ca0-8b48-5c5f4c9ed8bd.webp?v=1714910132","width":2000},{"alt":null,"id":23893115666531,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63b650be66e508eee06622b50f72836a043db0b1_43edfba1-e7be-4593-b378-b25eb9feb602.webp?v=1714910134"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63b650be66e508eee06622b50f72836a043db0b1_43edfba1-e7be-4593-b378-b25eb9feb602.webp?v=1714910134","width":2000},{"alt":null,"id":23893116420195,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2391a80662d1e396e31738dee1b1db855ea8e28_651a4749-67cf-4256-ab78-aa0a215844e8.webp?v=1714910137"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2391a80662d1e396e31738dee1b1db855ea8e28_651a4749-67cf-4256-ab78-aa0a215844e8.webp?v=1714910137","width":2000},{"alt":null,"id":23893117042787,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/496ac3d483bb9d18f8586b5fd5e24c9d38b2b93a_d89e00f6-ed61-469d-8a35-c2671f423658.webp?v=1714910140"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/496ac3d483bb9d18f8586b5fd5e24c9d38b2b93a_d89e00f6-ed61-469d-8a35-c2671f423658.webp?v=1714910140","width":2000},{"alt":null,"id":23893117829219,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd49eeedc84f6fc64c46e3a35e1f58f8063b2a9e_22409e9a-34c1-4dfd-9a07-0d17b6dfb818.webp?v=1714910143"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd49eeedc84f6fc64c46e3a35e1f58f8063b2a9e_22409e9a-34c1-4dfd-9a07-0d17b6dfb818.webp?v=1714910143","width":2000},{"alt":null,"id":23893118255203,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ece53669c041bd5552639af1147dae7955a44f6_cc8332fb-2437-4d04-86c9-53b991a36eab.webp?v=1714910145"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ece53669c041bd5552639af1147dae7955a44f6_cc8332fb-2437-4d04-86c9-53b991a36eab.webp?v=1714910145","width":2000},{"alt":null,"id":23893118943331,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a7a97fa3622fe9c584b25fae058c9bfd3b86ada7_a8e5044b-759d-4daf-b1ff-1c5f977f55ab.webp?v=1714910148"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a7a97fa3622fe9c584b25fae058c9bfd3b86ada7_a8e5044b-759d-4daf-b1ff-1c5f977f55ab.webp?v=1714910148","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41910320300131,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-PB14","requires_shipping":true,"taxable":true,"featured_image":{"id":31487772557411,"product_id":7414955081827,"position":6,"created_at":"2024-05-05T19:55:37+08:00","updated_at":"2024-05-05T19:55:37+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2391a80662d1e396e31738dee1b1db855ea8e28_651a4749-67cf-4256-ab78-aa0a215844e8.webp?v=1714910137","variant_ids":[41910320300131]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 迪士尼-星際大戰 Star Wars - 千年鷹-線條白 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118724-PB14","featured_media":{"alt":null,"id":23893116420195,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2391a80662d1e396e31738dee1b1db855ea8e28_651a4749-67cf-4256-ab78-aa0a215844e8.webp?v=1714910137"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41910320300131,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-PB14","requires_shipping":true,"taxable":true,"featured_image":{"id":31487772557411,"product_id":7414955081827,"position":6,"created_at":"2024-05-05T19:55:37+08:00","updated_at":"2024-05-05T19:55:37+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2391a80662d1e396e31738dee1b1db855ea8e28_651a4749-67cf-4256-ab78-aa0a215844e8.webp?v=1714910137","variant_ids":[41910320300131]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 迪士尼-星際大戰 Star Wars - 千年鷹-線條白 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118724-PB14","featured_media":{"alt":null,"id":23893116420195,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2391a80662d1e396e31738dee1b1db855ea8e28_651a4749-67cf-4256-ab78-aa0a215844e8.webp?v=1714910137"}},"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: "停產"
}