$product = {"id":7407677145187,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - Twenty One Point Five - 21.5 - Mundane Everyday","handle":"iphone-14-plus-mod-nx-printable-rl01","description":null,"published_at":"2024-06-11T16:21:51+08:00","created_at":"2024-05-03T10:40:28+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-Twenty One Point Five - 21.5","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-twenty-one-point-five","device-iPhone 14 Plus","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-twenty-one-point-five","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":41877529002083,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-RL01","requires_shipping":true,"taxable":true,"featured_image":{"id":31470202224739,"product_id":7407677145187,"position":6,"created_at":"2024-05-03T10:40:44+08:00","updated_at":"2024-05-03T10:40:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71ddb4d0e505835047c19997c3b7a51a47f2d0be_1d1df998-5ab1-4ffe-bc4f-72111981260e.webp?v=1714704044","variant_ids":[41877529002083]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - Twenty One Point Five - 21.5 - Mundane Everyday - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0126124-RL01","featured_media":{"alt":null,"id":23875105194083,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71ddb4d0e505835047c19997c3b7a51a47f2d0be_1d1df998-5ab1-4ffe-bc4f-72111981260e.webp?v=1714704044"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35f1c53f36c8e8062d093748f936f0f44ebb5247_a9812528-0381-4234-9ac2-0fc506eed1c7.webp?v=1714704031","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b046b9d01392abb298383ef228fa3a6045ccb37a_987461ed-f843-42b0-90c1-0bc0f09b5972.webp?v=1714704033","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1a22c41a078061a983997f81ff047713c790609_94c585ba-668c-40e2-b644-951c0a57e144.webp?v=1714704036","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09404eb6d24361cc4d31c323cc04fe73f8cd34c4_9e223fb5-b269-49f4-92de-88262a4d1005.webp?v=1714704039","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98df53076f3ae833bd4dfa8da71deb1dad4c08fa_cd448a07-13cc-4110-9c8e-93c05c71504e.webp?v=1714704042","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71ddb4d0e505835047c19997c3b7a51a47f2d0be_1d1df998-5ab1-4ffe-bc4f-72111981260e.webp?v=1714704044","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7854fe1b66abc29cd1cc9a54cc60b155f7d0f51c_64973f5f-c7de-4d3d-bbd7-a18b817a93c5.webp?v=1714704047","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/46269625de8a70637728faef5205a93f11c1e245_2bd710a7-bb0f-4a16-8c53-33d99ee5d420.webp?v=1714704050","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e82d224913677a2de3a9e77432160166f58d5bc_8efece76-17ea-4d0b-a4ad-d244639e9547.webp?v=1714704053","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/492a581fa4480b80b351aad52266a55b4a7c5d61_c24d37ba-db9f-43a7-8e47-9047405377b7.webp?v=1714704056"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35f1c53f36c8e8062d093748f936f0f44ebb5247_a9812528-0381-4234-9ac2-0fc506eed1c7.webp?v=1714704031","options":["color"],"media":[{"alt":null,"id":23875101130851,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35f1c53f36c8e8062d093748f936f0f44ebb5247_a9812528-0381-4234-9ac2-0fc506eed1c7.webp?v=1714704031"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35f1c53f36c8e8062d093748f936f0f44ebb5247_a9812528-0381-4234-9ac2-0fc506eed1c7.webp?v=1714704031","width":2000},{"alt":null,"id":23875101622371,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b046b9d01392abb298383ef228fa3a6045ccb37a_987461ed-f843-42b0-90c1-0bc0f09b5972.webp?v=1714704033"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b046b9d01392abb298383ef228fa3a6045ccb37a_987461ed-f843-42b0-90c1-0bc0f09b5972.webp?v=1714704033","width":2000},{"alt":null,"id":23875102376035,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1a22c41a078061a983997f81ff047713c790609_94c585ba-668c-40e2-b644-951c0a57e144.webp?v=1714704036"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1a22c41a078061a983997f81ff047713c790609_94c585ba-668c-40e2-b644-951c0a57e144.webp?v=1714704036","width":2000},{"alt":null,"id":23875102965859,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09404eb6d24361cc4d31c323cc04fe73f8cd34c4_9e223fb5-b269-49f4-92de-88262a4d1005.webp?v=1714704039"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09404eb6d24361cc4d31c323cc04fe73f8cd34c4_9e223fb5-b269-49f4-92de-88262a4d1005.webp?v=1714704039","width":2000},{"alt":null,"id":23875104669795,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98df53076f3ae833bd4dfa8da71deb1dad4c08fa_cd448a07-13cc-4110-9c8e-93c05c71504e.webp?v=1714704042"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98df53076f3ae833bd4dfa8da71deb1dad4c08fa_cd448a07-13cc-4110-9c8e-93c05c71504e.webp?v=1714704042","width":2000},{"alt":null,"id":23875105194083,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71ddb4d0e505835047c19997c3b7a51a47f2d0be_1d1df998-5ab1-4ffe-bc4f-72111981260e.webp?v=1714704044"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71ddb4d0e505835047c19997c3b7a51a47f2d0be_1d1df998-5ab1-4ffe-bc4f-72111981260e.webp?v=1714704044","width":2000},{"alt":null,"id":23875105980515,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7854fe1b66abc29cd1cc9a54cc60b155f7d0f51c_64973f5f-c7de-4d3d-bbd7-a18b817a93c5.webp?v=1714704047"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7854fe1b66abc29cd1cc9a54cc60b155f7d0f51c_64973f5f-c7de-4d3d-bbd7-a18b817a93c5.webp?v=1714704047","width":2000},{"alt":null,"id":23875106734179,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/46269625de8a70637728faef5205a93f11c1e245_2bd710a7-bb0f-4a16-8c53-33d99ee5d420.webp?v=1714704050"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/46269625de8a70637728faef5205a93f11c1e245_2bd710a7-bb0f-4a16-8c53-33d99ee5d420.webp?v=1714704050","width":2000},{"alt":null,"id":23875107455075,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e82d224913677a2de3a9e77432160166f58d5bc_8efece76-17ea-4d0b-a4ad-d244639e9547.webp?v=1714704053"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e82d224913677a2de3a9e77432160166f58d5bc_8efece76-17ea-4d0b-a4ad-d244639e9547.webp?v=1714704053","width":2000},{"alt":null,"id":23875108372579,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/492a581fa4480b80b351aad52266a55b4a7c5d61_c24d37ba-db9f-43a7-8e47-9047405377b7.webp?v=1714704056"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/492a581fa4480b80b351aad52266a55b4a7c5d61_c24d37ba-db9f-43a7-8e47-9047405377b7.webp?v=1714704056","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41877529002083,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-RL01","requires_shipping":true,"taxable":true,"featured_image":{"id":31470202224739,"product_id":7407677145187,"position":6,"created_at":"2024-05-03T10:40:44+08:00","updated_at":"2024-05-03T10:40:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71ddb4d0e505835047c19997c3b7a51a47f2d0be_1d1df998-5ab1-4ffe-bc4f-72111981260e.webp?v=1714704044","variant_ids":[41877529002083]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - Twenty One Point Five - 21.5 - Mundane Everyday - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0126124-RL01","featured_media":{"alt":null,"id":23875105194083,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71ddb4d0e505835047c19997c3b7a51a47f2d0be_1d1df998-5ab1-4ffe-bc4f-72111981260e.webp?v=1714704044"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41877529002083,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-RL01","requires_shipping":true,"taxable":true,"featured_image":{"id":31470202224739,"product_id":7407677145187,"position":6,"created_at":"2024-05-03T10:40:44+08:00","updated_at":"2024-05-03T10:40:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71ddb4d0e505835047c19997c3b7a51a47f2d0be_1d1df998-5ab1-4ffe-bc4f-72111981260e.webp?v=1714704044","variant_ids":[41877529002083]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - Twenty One Point Five - 21.5 - Mundane Everyday - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0126124-RL01","featured_media":{"alt":null,"id":23875105194083,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71ddb4d0e505835047c19997c3b7a51a47f2d0be_1d1df998-5ab1-4ffe-bc4f-72111981260e.webp?v=1714704044"}},"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: "停產"
}