$product = {"id":7411432161379,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Care Bears - Good Luck Bear","handle":"iphone-14-plus-mod-nx-magsafe-printable-yb05","description":null,"published_at":"2024-06-11T17:44:51+08:00","created_at":"2024-05-05T00:28:43+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 14 Plus","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":41898818011235,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-YB05","requires_shipping":true,"taxable":true,"featured_image":{"id":31480410407011,"product_id":7411432161379,"position":3,"created_at":"2024-05-05T00:28:50+08:00","updated_at":"2024-05-05T00:28:50+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c31826bffe0f493ed1d7302682094f5d903a9b52_f3429912-2627-4394-ae55-a1bacbaeff20.webp?v=1714840130","variant_ids":[41898818011235]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Care Bears - Good Luck Bear - 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":"MPB0126124-YB05","featured_media":{"alt":null,"id":23885662060643,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c31826bffe0f493ed1d7302682094f5d903a9b52_f3429912-2627-4394-ae55-a1bacbaeff20.webp?v=1714840130"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df576398c5ace8e3ce5d65e7b55d00d57282ed96_2d78c819-04ce-4305-9c60-26aa09734c34.webp?v=1714840126","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b0a76be56e0f76996fed11ee33201f199c05c145_729434ae-12d1-42b7-8c1d-4344f5a08ed9.webp?v=1714840128","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c31826bffe0f493ed1d7302682094f5d903a9b52_f3429912-2627-4394-ae55-a1bacbaeff20.webp?v=1714840130","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c506bdcc4f1555ceb2fd2798e9927e8bd2ddbf5f_62d34fc8-7b3e-424f-a3a9-e4fa70922fcb.webp?v=1714840133","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bce6943e23c7e5c7e664843d6e2fd6652c3e2284_dd7afe99-a5dc-4788-a9a9-03f10e992326.webp?v=1714840135","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d4da84c9ffb6c13b2517fb27bec379305359ae8_ac8f7245-ebca-4cd6-9eb9-0970f08ba80d.webp?v=1714840137","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0456c941d3e1007d7486f121ebcfe27e9342b47_3ddd9cd2-fc87-47a5-96a3-15c468a5e276.webp?v=1714840140","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43401a8a47009f8637155cce3f030df5a2c9b75d_2b2e041a-1e73-48cc-9485-0de894866618.webp?v=1714840142","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89243408917d62b1d47db7b014b22439c0a1feb8_c0244255-3eaa-4507-9cdf-0f2a201c08a2.webp?v=1714840144","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58c7d2a96a71d0798e30edb34acbb806ef1edf9c_14c4848b-2caa-480f-8f4c-9c5f9107ff75.webp?v=1714840146"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df576398c5ace8e3ce5d65e7b55d00d57282ed96_2d78c819-04ce-4305-9c60-26aa09734c34.webp?v=1714840126","options":["color"],"media":[{"alt":null,"id":23885661077603,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df576398c5ace8e3ce5d65e7b55d00d57282ed96_2d78c819-04ce-4305-9c60-26aa09734c34.webp?v=1714840126"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df576398c5ace8e3ce5d65e7b55d00d57282ed96_2d78c819-04ce-4305-9c60-26aa09734c34.webp?v=1714840126","width":2000},{"alt":null,"id":23885661601891,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b0a76be56e0f76996fed11ee33201f199c05c145_729434ae-12d1-42b7-8c1d-4344f5a08ed9.webp?v=1714840128"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b0a76be56e0f76996fed11ee33201f199c05c145_729434ae-12d1-42b7-8c1d-4344f5a08ed9.webp?v=1714840128","width":2000},{"alt":null,"id":23885662060643,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c31826bffe0f493ed1d7302682094f5d903a9b52_f3429912-2627-4394-ae55-a1bacbaeff20.webp?v=1714840130"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c31826bffe0f493ed1d7302682094f5d903a9b52_f3429912-2627-4394-ae55-a1bacbaeff20.webp?v=1714840130","width":2000},{"alt":null,"id":23885662552163,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c506bdcc4f1555ceb2fd2798e9927e8bd2ddbf5f_62d34fc8-7b3e-424f-a3a9-e4fa70922fcb.webp?v=1714840133"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c506bdcc4f1555ceb2fd2798e9927e8bd2ddbf5f_62d34fc8-7b3e-424f-a3a9-e4fa70922fcb.webp?v=1714840133","width":2000},{"alt":null,"id":23885663240291,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bce6943e23c7e5c7e664843d6e2fd6652c3e2284_dd7afe99-a5dc-4788-a9a9-03f10e992326.webp?v=1714840135"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bce6943e23c7e5c7e664843d6e2fd6652c3e2284_dd7afe99-a5dc-4788-a9a9-03f10e992326.webp?v=1714840135","width":2000},{"alt":null,"id":23885663666275,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d4da84c9ffb6c13b2517fb27bec379305359ae8_ac8f7245-ebca-4cd6-9eb9-0970f08ba80d.webp?v=1714840137"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d4da84c9ffb6c13b2517fb27bec379305359ae8_ac8f7245-ebca-4cd6-9eb9-0970f08ba80d.webp?v=1714840137","width":2000},{"alt":null,"id":23885664256099,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0456c941d3e1007d7486f121ebcfe27e9342b47_3ddd9cd2-fc87-47a5-96a3-15c468a5e276.webp?v=1714840140"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0456c941d3e1007d7486f121ebcfe27e9342b47_3ddd9cd2-fc87-47a5-96a3-15c468a5e276.webp?v=1714840140","width":2000},{"alt":null,"id":23885664583779,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43401a8a47009f8637155cce3f030df5a2c9b75d_2b2e041a-1e73-48cc-9485-0de894866618.webp?v=1714840142"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43401a8a47009f8637155cce3f030df5a2c9b75d_2b2e041a-1e73-48cc-9485-0de894866618.webp?v=1714840142","width":2000},{"alt":null,"id":23885665009763,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89243408917d62b1d47db7b014b22439c0a1feb8_c0244255-3eaa-4507-9cdf-0f2a201c08a2.webp?v=1714840144"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89243408917d62b1d47db7b014b22439c0a1feb8_c0244255-3eaa-4507-9cdf-0f2a201c08a2.webp?v=1714840144","width":2000},{"alt":null,"id":23885665697891,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58c7d2a96a71d0798e30edb34acbb806ef1edf9c_14c4848b-2caa-480f-8f4c-9c5f9107ff75.webp?v=1714840146"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58c7d2a96a71d0798e30edb34acbb806ef1edf9c_14c4848b-2caa-480f-8f4c-9c5f9107ff75.webp?v=1714840146","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41898818011235,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-YB05","requires_shipping":true,"taxable":true,"featured_image":{"id":31480410407011,"product_id":7411432161379,"position":3,"created_at":"2024-05-05T00:28:50+08:00","updated_at":"2024-05-05T00:28:50+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c31826bffe0f493ed1d7302682094f5d903a9b52_f3429912-2627-4394-ae55-a1bacbaeff20.webp?v=1714840130","variant_ids":[41898818011235]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Care Bears - Good Luck Bear - 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":"MPB0126124-YB05","featured_media":{"alt":null,"id":23885662060643,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c31826bffe0f493ed1d7302682094f5d903a9b52_f3429912-2627-4394-ae55-a1bacbaeff20.webp?v=1714840130"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41898818011235,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-YB05","requires_shipping":true,"taxable":true,"featured_image":{"id":31480410407011,"product_id":7411432161379,"position":3,"created_at":"2024-05-05T00:28:50+08:00","updated_at":"2024-05-05T00:28:50+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c31826bffe0f493ed1d7302682094f5d903a9b52_f3429912-2627-4394-ae55-a1bacbaeff20.webp?v=1714840130","variant_ids":[41898818011235]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Care Bears - Good Luck Bear - 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":"MPB0126124-YB05","featured_media":{"alt":null,"id":23885662060643,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c31826bffe0f493ed1d7302682094f5d903a9b52_f3429912-2627-4394-ae55-a1bacbaeff20.webp?v=1714840130"}},"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: "停產"
}