$product = {"id":7408387457123,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具2-白","handle":"iphone-12-pro-max-mod-nx-printable-pb12","description":null,"published_at":"2024-06-11T16:35:51+08:00","created_at":"2024-05-03T15:16:27+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":41884915990627,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB12","requires_shipping":true,"taxable":true,"featured_image":{"id":31472133111907,"product_id":7408387457123,"position":9,"created_at":"2024-05-03T15:16:54+08:00","updated_at":"2024-05-03T15:16:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c52df1a824eb9ffb8fadb10f1e57174a589ae3a_f2cdcbe4-f062-4f01-8257-6869e462709b.webp?v=1714720614","variant_ids":[41884915990627]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具2-白 - 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-PB12","featured_media":{"alt":null,"id":23877048664163,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c52df1a824eb9ffb8fadb10f1e57174a589ae3a_f2cdcbe4-f062-4f01-8257-6869e462709b.webp?v=1714720614"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e83a98b5ea7b7a6d1910f22cdbcb01853ee077ef_221e743b-322b-40eb-9509-64ee60338bb7.webp?v=1714720590","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eece8f1cc4b8bb7f9427f271fcb35d1d4c49d7b2_71384b72-214d-4edc-87b0-6016c56c9d70.webp?v=1714720592","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c7def828fd5f7ef6fc7fe916a25d1837b6c8d54c_cff25c5a-3811-48d7-ab27-a45b5e32386c.webp?v=1714720595","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f445207856a64d59b9bafbc046cdc0eea4b4d8a6_3f778cd7-420b-4f2e-b90a-5f3cd8dbd161.webp?v=1714720600","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/446a688338c6e6e448772b5c1ba3406ca5ca60ad_aef3ccdc-e00b-49c4-924a-12354ff05c76.webp?v=1714720604","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/536b8120e8ffd0880b2add70dd7f4deea3ead504_8ae10132-0adf-47df-9ac5-4beb855a9ded.webp?v=1714720607","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/909ef14e07e44fd1d254c71ac3d706371cc739f8_f4cf0757-82f0-4cea-9df1-96c6e37dde6c.webp?v=1714720609","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc6c542980faacca29e0a1105aa2b1767574b609_836300ba-d2b0-44bd-a9a0-4848198bbb22.webp?v=1714720611","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c52df1a824eb9ffb8fadb10f1e57174a589ae3a_f2cdcbe4-f062-4f01-8257-6869e462709b.webp?v=1714720614","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd43f742f60408ca4f215cbbe77755588e3a1770_1602d091-d909-4dda-94c1-021475b74143.webp?v=1714720617"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e83a98b5ea7b7a6d1910f22cdbcb01853ee077ef_221e743b-322b-40eb-9509-64ee60338bb7.webp?v=1714720590","options":["color"],"media":[{"alt":null,"id":23877043650659,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e83a98b5ea7b7a6d1910f22cdbcb01853ee077ef_221e743b-322b-40eb-9509-64ee60338bb7.webp?v=1714720590"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e83a98b5ea7b7a6d1910f22cdbcb01853ee077ef_221e743b-322b-40eb-9509-64ee60338bb7.webp?v=1714720590","width":2000},{"alt":null,"id":23877044207715,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eece8f1cc4b8bb7f9427f271fcb35d1d4c49d7b2_71384b72-214d-4edc-87b0-6016c56c9d70.webp?v=1714720592"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eece8f1cc4b8bb7f9427f271fcb35d1d4c49d7b2_71384b72-214d-4edc-87b0-6016c56c9d70.webp?v=1714720592","width":2000},{"alt":null,"id":23877044732003,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c7def828fd5f7ef6fc7fe916a25d1837b6c8d54c_cff25c5a-3811-48d7-ab27-a45b5e32386c.webp?v=1714720595"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c7def828fd5f7ef6fc7fe916a25d1837b6c8d54c_cff25c5a-3811-48d7-ab27-a45b5e32386c.webp?v=1714720595","width":2000},{"alt":null,"id":23877045223523,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f445207856a64d59b9bafbc046cdc0eea4b4d8a6_3f778cd7-420b-4f2e-b90a-5f3cd8dbd161.webp?v=1714720600"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f445207856a64d59b9bafbc046cdc0eea4b4d8a6_3f778cd7-420b-4f2e-b90a-5f3cd8dbd161.webp?v=1714720600","width":2000},{"alt":null,"id":23877046042723,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/446a688338c6e6e448772b5c1ba3406ca5ca60ad_aef3ccdc-e00b-49c4-924a-12354ff05c76.webp?v=1714720604"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/446a688338c6e6e448772b5c1ba3406ca5ca60ad_aef3ccdc-e00b-49c4-924a-12354ff05c76.webp?v=1714720604","width":2000},{"alt":null,"id":23877046534243,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/536b8120e8ffd0880b2add70dd7f4deea3ead504_8ae10132-0adf-47df-9ac5-4beb855a9ded.webp?v=1714720607"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/536b8120e8ffd0880b2add70dd7f4deea3ead504_8ae10132-0adf-47df-9ac5-4beb855a9ded.webp?v=1714720607","width":2000},{"alt":null,"id":23877047189603,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/909ef14e07e44fd1d254c71ac3d706371cc739f8_f4cf0757-82f0-4cea-9df1-96c6e37dde6c.webp?v=1714720609"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/909ef14e07e44fd1d254c71ac3d706371cc739f8_f4cf0757-82f0-4cea-9df1-96c6e37dde6c.webp?v=1714720609","width":2000},{"alt":null,"id":23877047615587,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc6c542980faacca29e0a1105aa2b1767574b609_836300ba-d2b0-44bd-a9a0-4848198bbb22.webp?v=1714720611"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc6c542980faacca29e0a1105aa2b1767574b609_836300ba-d2b0-44bd-a9a0-4848198bbb22.webp?v=1714720611","width":2000},{"alt":null,"id":23877048664163,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c52df1a824eb9ffb8fadb10f1e57174a589ae3a_f2cdcbe4-f062-4f01-8257-6869e462709b.webp?v=1714720614"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c52df1a824eb9ffb8fadb10f1e57174a589ae3a_f2cdcbe4-f062-4f01-8257-6869e462709b.webp?v=1714720614","width":2000},{"alt":null,"id":23877049221219,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd43f742f60408ca4f215cbbe77755588e3a1770_1602d091-d909-4dda-94c1-021475b74143.webp?v=1714720617"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd43f742f60408ca4f215cbbe77755588e3a1770_1602d091-d909-4dda-94c1-021475b74143.webp?v=1714720617","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41884915990627,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB12","requires_shipping":true,"taxable":true,"featured_image":{"id":31472133111907,"product_id":7408387457123,"position":9,"created_at":"2024-05-03T15:16:54+08:00","updated_at":"2024-05-03T15:16:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c52df1a824eb9ffb8fadb10f1e57174a589ae3a_f2cdcbe4-f062-4f01-8257-6869e462709b.webp?v=1714720614","variant_ids":[41884915990627]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具2-白 - 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-PB12","featured_media":{"alt":null,"id":23877048664163,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c52df1a824eb9ffb8fadb10f1e57174a589ae3a_f2cdcbe4-f062-4f01-8257-6869e462709b.webp?v=1714720614"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41884915990627,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB12","requires_shipping":true,"taxable":true,"featured_image":{"id":31472133111907,"product_id":7408387457123,"position":9,"created_at":"2024-05-03T15:16:54+08:00","updated_at":"2024-05-03T15:16:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c52df1a824eb9ffb8fadb10f1e57174a589ae3a_f2cdcbe4-f062-4f01-8257-6869e462709b.webp?v=1714720614","variant_ids":[41884915990627]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具2-白 - 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-PB12","featured_media":{"alt":null,"id":23877048664163,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c52df1a824eb9ffb8fadb10f1e57174a589ae3a_f2cdcbe4-f062-4f01-8257-6869e462709b.webp?v=1714720614"}},"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: "停產"
}