$product = {"id":7415102537827,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Care Bears - Best Friend Bear","handle":"iphone-12-mini-mod-nx-magsafe-printable-yb02","description":null,"published_at":"2024-06-11T17:58:02+08:00","created_at":"2024-05-05T20:23:12+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 12 mini","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":41911886741603,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-YB02","requires_shipping":true,"taxable":true,"featured_image":{"id":31488169705571,"product_id":7415102537827,"position":10,"created_at":"2024-05-05T20:23:37+08:00","updated_at":"2024-05-05T20:23:37+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62b8246943a2f911644f1097590096e1834c0347_533f2794-1fad-462b-b7ce-7514d99bafd4.webp?v=1714911817","variant_ids":[41911886741603]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Care Bears - Best Friend 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":"MPB0118424-YB02","featured_media":{"alt":null,"id":23893514387555,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62b8246943a2f911644f1097590096e1834c0347_533f2794-1fad-462b-b7ce-7514d99bafd4.webp?v=1714911817"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8db25c6fadc70039a8cc46f71e486a2e15c4ecb_e1eb3c6d-c398-47ef-9419-d31820b53db7.webp?v=1714911795","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ef5c3bafa3999f8e7eb649406c8a4a4ea2c2e10_a438fbb2-a225-4ac3-b1c6-67812f403044.webp?v=1714911797","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/27933341e50e211bea744752aca6392809a7b1ff_b6867dc8-4ad6-40dc-80e5-05b40a2df20e.webp?v=1714911800","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb5d170578ae425b4e0d36c0e7a9f622333d9bd4_f9a12b62-e934-47de-b15d-49d3760ae900.webp?v=1714911802","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b7e666df452d3696a66a8c5f88eb969b5faf593d_2df402e5-f585-4a84-98e0-81b10bb7486e.webp?v=1714911805","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f04882f30ebe8871dafe09f353f7b37b26184de3_ef3fdf38-97a4-4bd9-a110-b8e7205e0af9.webp?v=1714911807","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb4479900e8d4a5a65110fc33267a271044e348b_f9253437-72ec-4484-a034-f10a46c8fca8.webp?v=1714911810","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d97c09f68ea62723737383654ffaf7dbbcc896a4_13bc0ba2-ed82-40cb-9f7b-0485615297cb.webp?v=1714911812","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3ae0edc6984b59085f90fa8a75880d2620e0bdfb_cae0b51f-1ffd-4af2-bc7d-50a1b7ff9ab3.webp?v=1714911814","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62b8246943a2f911644f1097590096e1834c0347_533f2794-1fad-462b-b7ce-7514d99bafd4.webp?v=1714911817","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b51e3c11fbdcbebb9ef0291fc42e8aa37d08849_f14e80d4-6afc-4155-be58-b4bb288c54bd.webp?v=1714911819"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8db25c6fadc70039a8cc46f71e486a2e15c4ecb_e1eb3c6d-c398-47ef-9419-d31820b53db7.webp?v=1714911795","options":["color"],"media":[{"alt":null,"id":23893509013603,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8db25c6fadc70039a8cc46f71e486a2e15c4ecb_e1eb3c6d-c398-47ef-9419-d31820b53db7.webp?v=1714911795"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8db25c6fadc70039a8cc46f71e486a2e15c4ecb_e1eb3c6d-c398-47ef-9419-d31820b53db7.webp?v=1714911795","width":2000},{"alt":null,"id":23893509472355,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ef5c3bafa3999f8e7eb649406c8a4a4ea2c2e10_a438fbb2-a225-4ac3-b1c6-67812f403044.webp?v=1714911797"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ef5c3bafa3999f8e7eb649406c8a4a4ea2c2e10_a438fbb2-a225-4ac3-b1c6-67812f403044.webp?v=1714911797","width":2000},{"alt":null,"id":23893510029411,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/27933341e50e211bea744752aca6392809a7b1ff_b6867dc8-4ad6-40dc-80e5-05b40a2df20e.webp?v=1714911800"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/27933341e50e211bea744752aca6392809a7b1ff_b6867dc8-4ad6-40dc-80e5-05b40a2df20e.webp?v=1714911800","width":2000},{"alt":null,"id":23893510455395,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb5d170578ae425b4e0d36c0e7a9f622333d9bd4_f9a12b62-e934-47de-b15d-49d3760ae900.webp?v=1714911802"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb5d170578ae425b4e0d36c0e7a9f622333d9bd4_f9a12b62-e934-47de-b15d-49d3760ae900.webp?v=1714911802","width":2000},{"alt":null,"id":23893511667811,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b7e666df452d3696a66a8c5f88eb969b5faf593d_2df402e5-f585-4a84-98e0-81b10bb7486e.webp?v=1714911805"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b7e666df452d3696a66a8c5f88eb969b5faf593d_2df402e5-f585-4a84-98e0-81b10bb7486e.webp?v=1714911805","width":2000},{"alt":null,"id":23893512159331,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f04882f30ebe8871dafe09f353f7b37b26184de3_ef3fdf38-97a4-4bd9-a110-b8e7205e0af9.webp?v=1714911807"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f04882f30ebe8871dafe09f353f7b37b26184de3_ef3fdf38-97a4-4bd9-a110-b8e7205e0af9.webp?v=1714911807","width":2000},{"alt":null,"id":23893513011299,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb4479900e8d4a5a65110fc33267a271044e348b_f9253437-72ec-4484-a034-f10a46c8fca8.webp?v=1714911810"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb4479900e8d4a5a65110fc33267a271044e348b_f9253437-72ec-4484-a034-f10a46c8fca8.webp?v=1714911810","width":2000},{"alt":null,"id":23893513732195,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d97c09f68ea62723737383654ffaf7dbbcc896a4_13bc0ba2-ed82-40cb-9f7b-0485615297cb.webp?v=1714911812"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d97c09f68ea62723737383654ffaf7dbbcc896a4_13bc0ba2-ed82-40cb-9f7b-0485615297cb.webp?v=1714911812","width":2000},{"alt":null,"id":23893514059875,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3ae0edc6984b59085f90fa8a75880d2620e0bdfb_cae0b51f-1ffd-4af2-bc7d-50a1b7ff9ab3.webp?v=1714911814"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3ae0edc6984b59085f90fa8a75880d2620e0bdfb_cae0b51f-1ffd-4af2-bc7d-50a1b7ff9ab3.webp?v=1714911814","width":2000},{"alt":null,"id":23893514387555,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62b8246943a2f911644f1097590096e1834c0347_533f2794-1fad-462b-b7ce-7514d99bafd4.webp?v=1714911817"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62b8246943a2f911644f1097590096e1834c0347_533f2794-1fad-462b-b7ce-7514d99bafd4.webp?v=1714911817","width":2000},{"alt":null,"id":23893514584163,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b51e3c11fbdcbebb9ef0291fc42e8aa37d08849_f14e80d4-6afc-4155-be58-b4bb288c54bd.webp?v=1714911819"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b51e3c11fbdcbebb9ef0291fc42e8aa37d08849_f14e80d4-6afc-4155-be58-b4bb288c54bd.webp?v=1714911819","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41911886741603,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-YB02","requires_shipping":true,"taxable":true,"featured_image":{"id":31488169705571,"product_id":7415102537827,"position":10,"created_at":"2024-05-05T20:23:37+08:00","updated_at":"2024-05-05T20:23:37+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62b8246943a2f911644f1097590096e1834c0347_533f2794-1fad-462b-b7ce-7514d99bafd4.webp?v=1714911817","variant_ids":[41911886741603]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Care Bears - Best Friend 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":"MPB0118424-YB02","featured_media":{"alt":null,"id":23893514387555,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62b8246943a2f911644f1097590096e1834c0347_533f2794-1fad-462b-b7ce-7514d99bafd4.webp?v=1714911817"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41911886741603,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-YB02","requires_shipping":true,"taxable":true,"featured_image":{"id":31488169705571,"product_id":7415102537827,"position":10,"created_at":"2024-05-05T20:23:37+08:00","updated_at":"2024-05-05T20:23:37+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62b8246943a2f911644f1097590096e1834c0347_533f2794-1fad-462b-b7ce-7514d99bafd4.webp?v=1714911817","variant_ids":[41911886741603]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Care Bears - Best Friend 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":"MPB0118424-YB02","featured_media":{"alt":null,"id":23893514387555,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62b8246943a2f911644f1097590096e1834c0347_533f2794-1fad-462b-b7ce-7514d99bafd4.webp?v=1714911817"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}};
$device_handle = null;
$type = "";
var sellingStatus
if ($isMerge) {
$(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: "停產"
}