$product = {"id":7413992063075,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 Pro Max - Care Bears - We are together","handle":"iphone-13-pro-max-mod-nx-magsafe-printable-yb14","description":null,"published_at":"2024-06-11T17:47:06+08:00","created_at":"2024-05-05T13:57:01+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區Care Bears","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-carebears","device-iPhone 13 Pro Max","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-carebears","Top50","type-Mod NX Printable MagSafe Printable"],"price":110000,"price_min":110000,"price_max":110000,"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":41903085715555,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0123224-YB14","requires_shipping":true,"taxable":true,"featured_image":{"id":31484409806947,"product_id":7413992063075,"position":3,"created_at":"2024-05-05T13:57:08+08:00","updated_at":"2024-05-05T13:57:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98c5dcd8a098dfc0fd2b220972d16d7fc0bb0920_dad51df9-371e-46a5-bafa-011d75403a23.webp?v=1714888628","variant_ids":[41903085715555]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 Pro Max - Care Bears - We are together - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0123224-YB14","featured_media":{"alt":null,"id":23889703796835,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98c5dcd8a098dfc0fd2b220972d16d7fc0bb0920_dad51df9-371e-46a5-bafa-011d75403a23.webp?v=1714888628"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41903086207075,"title":"Mod NX-海軍藍邊框","option1":"Mod NX-海軍藍邊框","option2":null,"option3":null,"sku":"MPB01232J5-YB14","requires_shipping":true,"taxable":true,"featured_image":{"id":31484411084899,"product_id":7413992063075,"position":6,"created_at":"2024-05-05T13:57:14+08:00","updated_at":"2024-05-05T13:57:14+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a3f7191d3cf18cf926ffd9e27e6b57a6bec9383_a2805534-7fa8-4d8e-bd18-d4463c94e091.webp?v=1714888634","variant_ids":[41903086207075]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 Pro Max - Care Bears - We are together - Mod NX-海軍藍邊框","public_title":"Mod NX-海軍藍邊框","options":["Mod NX-海軍藍邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB01232J5-YB14","featured_media":{"alt":null,"id":23889705042019,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a3f7191d3cf18cf926ffd9e27e6b57a6bec9383_a2805534-7fa8-4d8e-bd18-d4463c94e091.webp?v=1714888634"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3aa6c685fa913b17e2b7d2809074c88a09ed9dff_16a55d7f-18b9-4b84-bb96-1f0d78490313.webp?v=1714888623","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52888155aaf64dd68c2dcb5307a77e0201f1037d_e4157406-759a-4d32-a4e7-c0b09776fc31.webp?v=1714888626","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98c5dcd8a098dfc0fd2b220972d16d7fc0bb0920_dad51df9-371e-46a5-bafa-011d75403a23.webp?v=1714888628","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be3c097237fa841c0d654a6b02d6ad2956008639_8b517bbe-5b42-445b-a0e3-fb91b34faa80.webp?v=1714888630","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6e85c1f6fb62f14f4b1528b047261382cff040e_5583affb-a02b-4fad-8106-74f3b04b1bca.webp?v=1714888632","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a3f7191d3cf18cf926ffd9e27e6b57a6bec9383_a2805534-7fa8-4d8e-bd18-d4463c94e091.webp?v=1714888634","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10cf76d367f50d79d91817751b548e832facb8c6_db5772b8-d1ff-4628-a258-c7cd58340426.webp?v=1714888636","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b7fd81054808f84fc957c4cea7f615af57f49c6_5bb16090-1537-4b11-9c60-d1a39ab90b3c.webp?v=1714888638","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d39ed884f04e6508264088293fe4464d83d38bd2_ef3b4fe4-a71e-4f2a-84d9-319c37b8a3f9.webp?v=1714888641","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ea8b4165ef25d792873b8f617474469a9ad71dc_31f40200-67fd-4f60-8f87-33ca2b41899e.webp?v=1714888643","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a43709b6a09e0b3c5af295e7abda368d66b9a38_e74dddb0-1b31-4d2d-a599-70330a50eb97.webp?v=1714888646"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3aa6c685fa913b17e2b7d2809074c88a09ed9dff_16a55d7f-18b9-4b84-bb96-1f0d78490313.webp?v=1714888623","options":["color"],"media":[{"alt":null,"id":23889702748259,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3aa6c685fa913b17e2b7d2809074c88a09ed9dff_16a55d7f-18b9-4b84-bb96-1f0d78490313.webp?v=1714888623"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3aa6c685fa913b17e2b7d2809074c88a09ed9dff_16a55d7f-18b9-4b84-bb96-1f0d78490313.webp?v=1714888623","width":2000},{"alt":null,"id":23889703174243,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52888155aaf64dd68c2dcb5307a77e0201f1037d_e4157406-759a-4d32-a4e7-c0b09776fc31.webp?v=1714888626"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52888155aaf64dd68c2dcb5307a77e0201f1037d_e4157406-759a-4d32-a4e7-c0b09776fc31.webp?v=1714888626","width":2000},{"alt":null,"id":23889703796835,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98c5dcd8a098dfc0fd2b220972d16d7fc0bb0920_dad51df9-371e-46a5-bafa-011d75403a23.webp?v=1714888628"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98c5dcd8a098dfc0fd2b220972d16d7fc0bb0920_dad51df9-371e-46a5-bafa-011d75403a23.webp?v=1714888628","width":2000},{"alt":null,"id":23889704091747,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be3c097237fa841c0d654a6b02d6ad2956008639_8b517bbe-5b42-445b-a0e3-fb91b34faa80.webp?v=1714888630"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be3c097237fa841c0d654a6b02d6ad2956008639_8b517bbe-5b42-445b-a0e3-fb91b34faa80.webp?v=1714888630","width":2000},{"alt":null,"id":23889704616035,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6e85c1f6fb62f14f4b1528b047261382cff040e_5583affb-a02b-4fad-8106-74f3b04b1bca.webp?v=1714888632"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6e85c1f6fb62f14f4b1528b047261382cff040e_5583affb-a02b-4fad-8106-74f3b04b1bca.webp?v=1714888632","width":2000},{"alt":null,"id":23889705042019,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a3f7191d3cf18cf926ffd9e27e6b57a6bec9383_a2805534-7fa8-4d8e-bd18-d4463c94e091.webp?v=1714888634"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a3f7191d3cf18cf926ffd9e27e6b57a6bec9383_a2805534-7fa8-4d8e-bd18-d4463c94e091.webp?v=1714888634","width":2000},{"alt":null,"id":23889705500771,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10cf76d367f50d79d91817751b548e832facb8c6_db5772b8-d1ff-4628-a258-c7cd58340426.webp?v=1714888636"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10cf76d367f50d79d91817751b548e832facb8c6_db5772b8-d1ff-4628-a258-c7cd58340426.webp?v=1714888636","width":2000},{"alt":null,"id":23889705959523,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b7fd81054808f84fc957c4cea7f615af57f49c6_5bb16090-1537-4b11-9c60-d1a39ab90b3c.webp?v=1714888638"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b7fd81054808f84fc957c4cea7f615af57f49c6_5bb16090-1537-4b11-9c60-d1a39ab90b3c.webp?v=1714888638","width":2000},{"alt":null,"id":23889706451043,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d39ed884f04e6508264088293fe4464d83d38bd2_ef3b4fe4-a71e-4f2a-84d9-319c37b8a3f9.webp?v=1714888641"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d39ed884f04e6508264088293fe4464d83d38bd2_ef3b4fe4-a71e-4f2a-84d9-319c37b8a3f9.webp?v=1714888641","width":2000},{"alt":null,"id":23889706811491,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ea8b4165ef25d792873b8f617474469a9ad71dc_31f40200-67fd-4f60-8f87-33ca2b41899e.webp?v=1714888643"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ea8b4165ef25d792873b8f617474469a9ad71dc_31f40200-67fd-4f60-8f87-33ca2b41899e.webp?v=1714888643","width":2000},{"alt":null,"id":23889707303011,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a43709b6a09e0b3c5af295e7abda368d66b9a38_e74dddb0-1b31-4d2d-a599-70330a50eb97.webp?v=1714888646"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a43709b6a09e0b3c5af295e7abda368d66b9a38_e74dddb0-1b31-4d2d-a599-70330a50eb97.webp?v=1714888646","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41903085715555,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0123224-YB14","requires_shipping":true,"taxable":true,"featured_image":{"id":31484409806947,"product_id":7413992063075,"position":3,"created_at":"2024-05-05T13:57:08+08:00","updated_at":"2024-05-05T13:57:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98c5dcd8a098dfc0fd2b220972d16d7fc0bb0920_dad51df9-371e-46a5-bafa-011d75403a23.webp?v=1714888628","variant_ids":[41903085715555]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 Pro Max - Care Bears - We are together - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0123224-YB14","featured_media":{"alt":null,"id":23889703796835,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98c5dcd8a098dfc0fd2b220972d16d7fc0bb0920_dad51df9-371e-46a5-bafa-011d75403a23.webp?v=1714888628"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41903086207075,"title":"Mod NX-海軍藍邊框","option1":"Mod NX-海軍藍邊框","option2":null,"option3":null,"sku":"MPB01232J5-YB14","requires_shipping":true,"taxable":true,"featured_image":{"id":31484411084899,"product_id":7413992063075,"position":6,"created_at":"2024-05-05T13:57:14+08:00","updated_at":"2024-05-05T13:57:14+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a3f7191d3cf18cf926ffd9e27e6b57a6bec9383_a2805534-7fa8-4d8e-bd18-d4463c94e091.webp?v=1714888634","variant_ids":[41903086207075]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 Pro Max - Care Bears - We are together - Mod NX-海軍藍邊框","public_title":"Mod NX-海軍藍邊框","options":["Mod NX-海軍藍邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB01232J5-YB14","featured_media":{"alt":null,"id":23889705042019,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a3f7191d3cf18cf926ffd9e27e6b57a6bec9383_a2805534-7fa8-4d8e-bd18-d4463c94e091.webp?v=1714888634"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41903085715555,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0123224-YB14","requires_shipping":true,"taxable":true,"featured_image":{"id":31484409806947,"product_id":7413992063075,"position":3,"created_at":"2024-05-05T13:57:08+08:00","updated_at":"2024-05-05T13:57:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98c5dcd8a098dfc0fd2b220972d16d7fc0bb0920_dad51df9-371e-46a5-bafa-011d75403a23.webp?v=1714888628","variant_ids":[41903085715555]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 Pro Max - Care Bears - We are together - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0123224-YB14","featured_media":{"alt":null,"id":23889703796835,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98c5dcd8a098dfc0fd2b220972d16d7fc0bb0920_dad51df9-371e-46a5-bafa-011d75403a23.webp?v=1714888628"}},"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: "停產"
}