$product = {"id":7408552312931,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - JEDI ORDER 原力-潮流系列","handle":"iphone-12-pro-max-mod-nx-printable-pb48","description":null,"published_at":"2024-06-11T16:40:29+08:00","created_at":"2024-05-03T15:49:10+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":41886784421987,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB48","requires_shipping":true,"taxable":true,"featured_image":{"id":31472572268643,"product_id":7408552312931,"position":6,"created_at":"2024-05-03T15:49:25+08:00","updated_at":"2024-05-03T15:49:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43f99f3f9bfb5a71e709d0973d44e41bcf2aad97_1e6497da-8268-4bb7-9979-001f3f2518ad.webp?v=1714722565","variant_ids":[41886784421987]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - JEDI ORDER 原力-潮流系列 - 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-PB48","featured_media":{"alt":null,"id":23877489688675,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43f99f3f9bfb5a71e709d0973d44e41bcf2aad97_1e6497da-8268-4bb7-9979-001f3f2518ad.webp?v=1714722565"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/75ea55c6153f287ef88ecfb266e20f8151a60f65_3656f36c-7fb8-49b4-a4f3-8e87944dd141.webp?v=1714722553","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab146e8247822fbc0b012eaa35ab560f2f89dfce_d182d312-27ae-40bd-86f5-37bc6d48e7db.webp?v=1714722555","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0037f4a6c6c11dbf08aed753466ca71af0a99fe_71eb800e-590a-4a86-8885-e1820faf79eb.webp?v=1714722558","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/24f542f88ce670355df20a70b22237e5f3dd7984_2980b8a4-b4c1-4380-ba73-5d00cd0d923d.webp?v=1714722560","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b7540de3de255ce759cf602629e5049341506cbe_5c920182-6733-4bd0-a442-4ba5faa6345c.webp?v=1714722563","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43f99f3f9bfb5a71e709d0973d44e41bcf2aad97_1e6497da-8268-4bb7-9979-001f3f2518ad.webp?v=1714722565","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf249c748eea38948aad1da52f2c1376b93f92ae_4539e065-898e-47ea-b401-498518412e86.webp?v=1714722568","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/854969f533706148ce4c96c3ff3406ce8f33d74d_38c5e571-82c6-4f6e-8a87-7ec023e57a8b.webp?v=1714722570","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84440aa9b3fa0714a2d268c224e372f2bfd9fd26_9b5d90ee-ae81-4b74-aad3-5da5531036ac.webp?v=1714722572","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/31bc57721fddb1c0db89bb305a7c9ea2cf6cf908_e610bfdb-7e9f-4870-a38e-92156d7023cc.webp?v=1714722575"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/75ea55c6153f287ef88ecfb266e20f8151a60f65_3656f36c-7fb8-49b4-a4f3-8e87944dd141.webp?v=1714722553","options":["color"],"media":[{"alt":null,"id":23877487165539,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/75ea55c6153f287ef88ecfb266e20f8151a60f65_3656f36c-7fb8-49b4-a4f3-8e87944dd141.webp?v=1714722553"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/75ea55c6153f287ef88ecfb266e20f8151a60f65_3656f36c-7fb8-49b4-a4f3-8e87944dd141.webp?v=1714722553","width":2000},{"alt":null,"id":23877487689827,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab146e8247822fbc0b012eaa35ab560f2f89dfce_d182d312-27ae-40bd-86f5-37bc6d48e7db.webp?v=1714722555"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab146e8247822fbc0b012eaa35ab560f2f89dfce_d182d312-27ae-40bd-86f5-37bc6d48e7db.webp?v=1714722555","width":2000},{"alt":null,"id":23877488181347,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0037f4a6c6c11dbf08aed753466ca71af0a99fe_71eb800e-590a-4a86-8885-e1820faf79eb.webp?v=1714722558"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0037f4a6c6c11dbf08aed753466ca71af0a99fe_71eb800e-590a-4a86-8885-e1820faf79eb.webp?v=1714722558","width":2000},{"alt":null,"id":23877488672867,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/24f542f88ce670355df20a70b22237e5f3dd7984_2980b8a4-b4c1-4380-ba73-5d00cd0d923d.webp?v=1714722560"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/24f542f88ce670355df20a70b22237e5f3dd7984_2980b8a4-b4c1-4380-ba73-5d00cd0d923d.webp?v=1714722560","width":2000},{"alt":null,"id":23877489197155,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b7540de3de255ce759cf602629e5049341506cbe_5c920182-6733-4bd0-a442-4ba5faa6345c.webp?v=1714722563"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b7540de3de255ce759cf602629e5049341506cbe_5c920182-6733-4bd0-a442-4ba5faa6345c.webp?v=1714722563","width":2000},{"alt":null,"id":23877489688675,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43f99f3f9bfb5a71e709d0973d44e41bcf2aad97_1e6497da-8268-4bb7-9979-001f3f2518ad.webp?v=1714722565"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43f99f3f9bfb5a71e709d0973d44e41bcf2aad97_1e6497da-8268-4bb7-9979-001f3f2518ad.webp?v=1714722565","width":2000},{"alt":null,"id":23877490081891,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf249c748eea38948aad1da52f2c1376b93f92ae_4539e065-898e-47ea-b401-498518412e86.webp?v=1714722568"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf249c748eea38948aad1da52f2c1376b93f92ae_4539e065-898e-47ea-b401-498518412e86.webp?v=1714722568","width":2000},{"alt":null,"id":23877490802787,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/854969f533706148ce4c96c3ff3406ce8f33d74d_38c5e571-82c6-4f6e-8a87-7ec023e57a8b.webp?v=1714722570"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/854969f533706148ce4c96c3ff3406ce8f33d74d_38c5e571-82c6-4f6e-8a87-7ec023e57a8b.webp?v=1714722570","width":2000},{"alt":null,"id":23877491392611,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84440aa9b3fa0714a2d268c224e372f2bfd9fd26_9b5d90ee-ae81-4b74-aad3-5da5531036ac.webp?v=1714722572"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84440aa9b3fa0714a2d268c224e372f2bfd9fd26_9b5d90ee-ae81-4b74-aad3-5da5531036ac.webp?v=1714722572","width":2000},{"alt":null,"id":23877491982435,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/31bc57721fddb1c0db89bb305a7c9ea2cf6cf908_e610bfdb-7e9f-4870-a38e-92156d7023cc.webp?v=1714722575"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/31bc57721fddb1c0db89bb305a7c9ea2cf6cf908_e610bfdb-7e9f-4870-a38e-92156d7023cc.webp?v=1714722575","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41886784421987,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB48","requires_shipping":true,"taxable":true,"featured_image":{"id":31472572268643,"product_id":7408552312931,"position":6,"created_at":"2024-05-03T15:49:25+08:00","updated_at":"2024-05-03T15:49:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43f99f3f9bfb5a71e709d0973d44e41bcf2aad97_1e6497da-8268-4bb7-9979-001f3f2518ad.webp?v=1714722565","variant_ids":[41886784421987]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - JEDI ORDER 原力-潮流系列 - 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-PB48","featured_media":{"alt":null,"id":23877489688675,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43f99f3f9bfb5a71e709d0973d44e41bcf2aad97_1e6497da-8268-4bb7-9979-001f3f2518ad.webp?v=1714722565"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41886784421987,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB48","requires_shipping":true,"taxable":true,"featured_image":{"id":31472572268643,"product_id":7408552312931,"position":6,"created_at":"2024-05-03T15:49:25+08:00","updated_at":"2024-05-03T15:49:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43f99f3f9bfb5a71e709d0973d44e41bcf2aad97_1e6497da-8268-4bb7-9979-001f3f2518ad.webp?v=1714722565","variant_ids":[41886784421987]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - JEDI ORDER 原力-潮流系列 - 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-PB48","featured_media":{"alt":null,"id":23877489688675,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43f99f3f9bfb5a71e709d0973d44e41bcf2aad97_1e6497da-8268-4bb7-9979-001f3f2518ad.webp?v=1714722565"}},"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: "停產"
}