$product = {"id":7408415440995,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Care Bears - 夜空星語","handle":"iphone-12-pro-max-mod-nx-printable-yb12","description":null,"published_at":"2024-06-11T16:36:36+08:00","created_at":"2024-05-03T15:22:09+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-Care Bears","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-carebears","device-iPhone 12 pro max","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-carebears","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":41885226106979,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-YB12","requires_shipping":true,"taxable":true,"featured_image":{"id":31472214081635,"product_id":7408415440995,"position":7,"created_at":"2024-05-03T15:22:25+08:00","updated_at":"2024-05-03T15:22:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc266394a6000d802e50b205cb1de2b875162d6d_503971f9-fda2-468d-b637-408f69423d2e.webp?v=1714720945","variant_ids":[41885226106979]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Care Bears - 夜空星語 - 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":"NPB0118724-YB12","featured_media":{"alt":null,"id":23877129863267,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc266394a6000d802e50b205cb1de2b875162d6d_503971f9-fda2-468d-b637-408f69423d2e.webp?v=1714720945"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/13e6a41b5bcec4836d54b80ef383c7b7c559270f_1b3b8720-d243-433b-9a8a-77375d166ee6.webp?v=1714720931","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8cf99156cae2a559b0954ae9478f80737d32463a_23fcb044-9f49-456e-a535-e552e5d4da38.webp?v=1714720934","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18ce69547930e96317428e8db20dd7ba63393d31_9919bfd9-c48d-4b38-876c-df1585f6ce26.webp?v=1714720936","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fab2a321dd60947ad7a4bf8b1722ffe2de0132d5_7f16cfcd-c56e-446f-9729-02a82dfc95d8.webp?v=1714720938","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fcd444a9890c75fd9613de73ad60c766e58dad20_63b06bf4-62f4-46c5-b7a4-39372a403907.webp?v=1714720941","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a12d6d32968a4b36298615f2fc3839974aea6bc9_7a19904b-1a76-42fe-a434-8a0460b20d39.webp?v=1714720943","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc266394a6000d802e50b205cb1de2b875162d6d_503971f9-fda2-468d-b637-408f69423d2e.webp?v=1714720945","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e210660a6d1bbeec95f8290656db539ace5c71da_f69cd23e-2449-43ba-9d12-486f478601ae.webp?v=1714720948","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/935693947bba8ea2f43b458fc21b0abd13e49644_a8800c22-f96a-4455-8633-70f6ded42273.webp?v=1714720950","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e747d2585fe3cd7853cb1d0113a0655c5dee29f_44ee75ae-60dd-4066-a3cc-f7e1f5b48038.webp?v=1714720953"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/13e6a41b5bcec4836d54b80ef383c7b7c559270f_1b3b8720-d243-433b-9a8a-77375d166ee6.webp?v=1714720931","options":["color"],"media":[{"alt":null,"id":23877127274595,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/13e6a41b5bcec4836d54b80ef383c7b7c559270f_1b3b8720-d243-433b-9a8a-77375d166ee6.webp?v=1714720931"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/13e6a41b5bcec4836d54b80ef383c7b7c559270f_1b3b8720-d243-433b-9a8a-77375d166ee6.webp?v=1714720931","width":2000},{"alt":null,"id":23877127766115,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8cf99156cae2a559b0954ae9478f80737d32463a_23fcb044-9f49-456e-a535-e552e5d4da38.webp?v=1714720934"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8cf99156cae2a559b0954ae9478f80737d32463a_23fcb044-9f49-456e-a535-e552e5d4da38.webp?v=1714720934","width":2000},{"alt":null,"id":23877128192099,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18ce69547930e96317428e8db20dd7ba63393d31_9919bfd9-c48d-4b38-876c-df1585f6ce26.webp?v=1714720936"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18ce69547930e96317428e8db20dd7ba63393d31_9919bfd9-c48d-4b38-876c-df1585f6ce26.webp?v=1714720936","width":2000},{"alt":null,"id":23877128552547,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fab2a321dd60947ad7a4bf8b1722ffe2de0132d5_7f16cfcd-c56e-446f-9729-02a82dfc95d8.webp?v=1714720938"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fab2a321dd60947ad7a4bf8b1722ffe2de0132d5_7f16cfcd-c56e-446f-9729-02a82dfc95d8.webp?v=1714720938","width":2000},{"alt":null,"id":23877128978531,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fcd444a9890c75fd9613de73ad60c766e58dad20_63b06bf4-62f4-46c5-b7a4-39372a403907.webp?v=1714720941"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fcd444a9890c75fd9613de73ad60c766e58dad20_63b06bf4-62f4-46c5-b7a4-39372a403907.webp?v=1714720941","width":2000},{"alt":null,"id":23877129437283,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a12d6d32968a4b36298615f2fc3839974aea6bc9_7a19904b-1a76-42fe-a434-8a0460b20d39.webp?v=1714720943"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a12d6d32968a4b36298615f2fc3839974aea6bc9_7a19904b-1a76-42fe-a434-8a0460b20d39.webp?v=1714720943","width":2000},{"alt":null,"id":23877129863267,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc266394a6000d802e50b205cb1de2b875162d6d_503971f9-fda2-468d-b637-408f69423d2e.webp?v=1714720945"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc266394a6000d802e50b205cb1de2b875162d6d_503971f9-fda2-468d-b637-408f69423d2e.webp?v=1714720945","width":2000},{"alt":null,"id":23877130387555,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e210660a6d1bbeec95f8290656db539ace5c71da_f69cd23e-2449-43ba-9d12-486f478601ae.webp?v=1714720948"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e210660a6d1bbeec95f8290656db539ace5c71da_f69cd23e-2449-43ba-9d12-486f478601ae.webp?v=1714720948","width":2000},{"alt":null,"id":23877130977379,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/935693947bba8ea2f43b458fc21b0abd13e49644_a8800c22-f96a-4455-8633-70f6ded42273.webp?v=1714720950"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/935693947bba8ea2f43b458fc21b0abd13e49644_a8800c22-f96a-4455-8633-70f6ded42273.webp?v=1714720950","width":2000},{"alt":null,"id":23877131567203,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e747d2585fe3cd7853cb1d0113a0655c5dee29f_44ee75ae-60dd-4066-a3cc-f7e1f5b48038.webp?v=1714720953"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e747d2585fe3cd7853cb1d0113a0655c5dee29f_44ee75ae-60dd-4066-a3cc-f7e1f5b48038.webp?v=1714720953","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41885226106979,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-YB12","requires_shipping":true,"taxable":true,"featured_image":{"id":31472214081635,"product_id":7408415440995,"position":7,"created_at":"2024-05-03T15:22:25+08:00","updated_at":"2024-05-03T15:22:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc266394a6000d802e50b205cb1de2b875162d6d_503971f9-fda2-468d-b637-408f69423d2e.webp?v=1714720945","variant_ids":[41885226106979]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Care Bears - 夜空星語 - 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":"NPB0118724-YB12","featured_media":{"alt":null,"id":23877129863267,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc266394a6000d802e50b205cb1de2b875162d6d_503971f9-fda2-468d-b637-408f69423d2e.webp?v=1714720945"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41885226106979,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-YB12","requires_shipping":true,"taxable":true,"featured_image":{"id":31472214081635,"product_id":7408415440995,"position":7,"created_at":"2024-05-03T15:22:25+08:00","updated_at":"2024-05-03T15:22:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc266394a6000d802e50b205cb1de2b875162d6d_503971f9-fda2-468d-b637-408f69423d2e.webp?v=1714720945","variant_ids":[41885226106979]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Care Bears - 夜空星語 - 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":"NPB0118724-YB12","featured_media":{"alt":null,"id":23877129863267,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc266394a6000d802e50b205cb1de2b875162d6d_503971f9-fda2-468d-b637-408f69423d2e.webp?v=1714720945"}},"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: "停產"
}