$product = {"id":7407926018147,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - JEDI ORDER 原力-潮流系列","handle":"iphone-14-plus-mod-nx-printable-pb48","description":null,"published_at":"2024-06-11T16:26:43+08:00","created_at":"2024-05-03T11:17:14+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 14 Plus","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":41880615420003,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB48","requires_shipping":true,"taxable":true,"featured_image":{"id":31470718681187,"product_id":7407926018147,"position":6,"created_at":"2024-05-03T11:17:29+08:00","updated_at":"2024-05-03T11:17:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd69749e39d8c4adf018b24db185e513e80b233c_01ae0a3a-6fc0-4d15-9b43-cc285667b6e2.webp?v=1714706249","variant_ids":[41880615420003]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0126124-PB48","featured_media":{"alt":null,"id":23875622731875,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd69749e39d8c4adf018b24db185e513e80b233c_01ae0a3a-6fc0-4d15-9b43-cc285667b6e2.webp?v=1714706249"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/04e7e478725509225a874b2b8d3dbb3b57221d2e_ac6b7b52-0749-4ee0-bc3b-4aa930582acb.webp?v=1714706237","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4779baa9f78b04be125c045a606e83f3e8910aa0_3dee4c5b-c922-4820-9687-89b80fa6fd46.webp?v=1714706239","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a04955a4f44bde95c710c587cad6b0a2c54a34fd_d087925a-b435-45a2-b019-4ac85f6dfea3.webp?v=1714706241","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6d6e1959e477e695a7f489625a0d2f0ceaf21cc7_1568a913-c09d-42da-b00a-eadfb80b2006.webp?v=1714706244","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42a3e4e27ac38e75b6958c129e8fa3acc79c8c40_6ce1843d-835b-4c1e-bee8-5d06b61e50c1.webp?v=1714706247","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd69749e39d8c4adf018b24db185e513e80b233c_01ae0a3a-6fc0-4d15-9b43-cc285667b6e2.webp?v=1714706249","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/602a5a37928be211fa2d0230c7d050196723780d_feaa9400-a1bd-406b-8142-0bf96e35c4c8.webp?v=1714706252","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d458020ec3b1076d2038f3cd1306e432113bf92d_18f962ce-3ff1-4991-8dfa-cf65066e9d1c.webp?v=1714706254","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c298397e73261d14c392852b4072dd7ad0fda842_45d48755-d269-41a4-a764-32efd8c73a5a.webp?v=1714706257","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ddd38cadca60223d1ca0fd64e1b91cf645b4779_2fa8068d-a9ec-4ba2-9697-51be40ae02f3.webp?v=1714706259"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/04e7e478725509225a874b2b8d3dbb3b57221d2e_ac6b7b52-0749-4ee0-bc3b-4aa930582acb.webp?v=1714706237","options":["color"],"media":[{"alt":null,"id":23875620339811,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/04e7e478725509225a874b2b8d3dbb3b57221d2e_ac6b7b52-0749-4ee0-bc3b-4aa930582acb.webp?v=1714706237"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/04e7e478725509225a874b2b8d3dbb3b57221d2e_ac6b7b52-0749-4ee0-bc3b-4aa930582acb.webp?v=1714706237","width":2000},{"alt":null,"id":23875620896867,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4779baa9f78b04be125c045a606e83f3e8910aa0_3dee4c5b-c922-4820-9687-89b80fa6fd46.webp?v=1714706239"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4779baa9f78b04be125c045a606e83f3e8910aa0_3dee4c5b-c922-4820-9687-89b80fa6fd46.webp?v=1714706239","width":2000},{"alt":null,"id":23875621355619,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a04955a4f44bde95c710c587cad6b0a2c54a34fd_d087925a-b435-45a2-b019-4ac85f6dfea3.webp?v=1714706241"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a04955a4f44bde95c710c587cad6b0a2c54a34fd_d087925a-b435-45a2-b019-4ac85f6dfea3.webp?v=1714706241","width":2000},{"alt":null,"id":23875621847139,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6d6e1959e477e695a7f489625a0d2f0ceaf21cc7_1568a913-c09d-42da-b00a-eadfb80b2006.webp?v=1714706244"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6d6e1959e477e695a7f489625a0d2f0ceaf21cc7_1568a913-c09d-42da-b00a-eadfb80b2006.webp?v=1714706244","width":2000},{"alt":null,"id":23875622305891,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42a3e4e27ac38e75b6958c129e8fa3acc79c8c40_6ce1843d-835b-4c1e-bee8-5d06b61e50c1.webp?v=1714706247"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42a3e4e27ac38e75b6958c129e8fa3acc79c8c40_6ce1843d-835b-4c1e-bee8-5d06b61e50c1.webp?v=1714706247","width":2000},{"alt":null,"id":23875622731875,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd69749e39d8c4adf018b24db185e513e80b233c_01ae0a3a-6fc0-4d15-9b43-cc285667b6e2.webp?v=1714706249"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd69749e39d8c4adf018b24db185e513e80b233c_01ae0a3a-6fc0-4d15-9b43-cc285667b6e2.webp?v=1714706249","width":2000},{"alt":null,"id":23875623485539,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/602a5a37928be211fa2d0230c7d050196723780d_feaa9400-a1bd-406b-8142-0bf96e35c4c8.webp?v=1714706252"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/602a5a37928be211fa2d0230c7d050196723780d_feaa9400-a1bd-406b-8142-0bf96e35c4c8.webp?v=1714706252","width":2000},{"alt":null,"id":23875624173667,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d458020ec3b1076d2038f3cd1306e432113bf92d_18f962ce-3ff1-4991-8dfa-cf65066e9d1c.webp?v=1714706254"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d458020ec3b1076d2038f3cd1306e432113bf92d_18f962ce-3ff1-4991-8dfa-cf65066e9d1c.webp?v=1714706254","width":2000},{"alt":null,"id":23875624599651,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c298397e73261d14c392852b4072dd7ad0fda842_45d48755-d269-41a4-a764-32efd8c73a5a.webp?v=1714706257"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c298397e73261d14c392852b4072dd7ad0fda842_45d48755-d269-41a4-a764-32efd8c73a5a.webp?v=1714706257","width":2000},{"alt":null,"id":23875625091171,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ddd38cadca60223d1ca0fd64e1b91cf645b4779_2fa8068d-a9ec-4ba2-9697-51be40ae02f3.webp?v=1714706259"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ddd38cadca60223d1ca0fd64e1b91cf645b4779_2fa8068d-a9ec-4ba2-9697-51be40ae02f3.webp?v=1714706259","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41880615420003,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB48","requires_shipping":true,"taxable":true,"featured_image":{"id":31470718681187,"product_id":7407926018147,"position":6,"created_at":"2024-05-03T11:17:29+08:00","updated_at":"2024-05-03T11:17:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd69749e39d8c4adf018b24db185e513e80b233c_01ae0a3a-6fc0-4d15-9b43-cc285667b6e2.webp?v=1714706249","variant_ids":[41880615420003]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0126124-PB48","featured_media":{"alt":null,"id":23875622731875,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd69749e39d8c4adf018b24db185e513e80b233c_01ae0a3a-6fc0-4d15-9b43-cc285667b6e2.webp?v=1714706249"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41880615420003,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB48","requires_shipping":true,"taxable":true,"featured_image":{"id":31470718681187,"product_id":7407926018147,"position":6,"created_at":"2024-05-03T11:17:29+08:00","updated_at":"2024-05-03T11:17:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd69749e39d8c4adf018b24db185e513e80b233c_01ae0a3a-6fc0-4d15-9b43-cc285667b6e2.webp?v=1714706249","variant_ids":[41880615420003]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0126124-PB48","featured_media":{"alt":null,"id":23875622731875,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd69749e39d8c4adf018b24db185e513e80b233c_01ae0a3a-6fc0-4d15-9b43-cc285667b6e2.webp?v=1714706249"}},"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: "停產"
}