$product = {"id":7408400236643,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Care Bears - Cheer Bear","handle":"iphone-12-pro-max-mod-nx-printable-yb03","description":null,"published_at":"2024-06-11T16:36:12+08:00","created_at":"2024-05-03T15:19:14+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":41885062922339,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-YB03","requires_shipping":true,"taxable":true,"featured_image":{"id":31472166568035,"product_id":7408400236643,"position":4,"created_at":"2024-05-03T15:19:24+08:00","updated_at":"2024-05-03T15:19:24+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc13ae9f12d4eb0c2842f4b485e5b73bac590a71_a4abfafd-ca0e-48b4-8091-7be86cdb0526.webp?v=1714720764","variant_ids":[41885062922339]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Care Bears - Cheer Bear - 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-YB03","featured_media":{"alt":null,"id":23877082153059,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc13ae9f12d4eb0c2842f4b485e5b73bac590a71_a4abfafd-ca0e-48b4-8091-7be86cdb0526.webp?v=1714720764"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/421f5688cbf8054c5258b306effa0724ec2350ec_9f9ecf02-ed7c-49ac-b65e-4d607ae139c6.webp?v=1714720756","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3140da93d23607d2b049b03c79cecf4c1a79bbff_0bc34628-0256-47e1-af0c-e7ea9b9fd4ed.webp?v=1714720759","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8637779146daab48c42939b43c981fee2fe00402_9d3a9979-6a3d-4364-a8b1-acf86626d2c3.webp?v=1714720762","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc13ae9f12d4eb0c2842f4b485e5b73bac590a71_a4abfafd-ca0e-48b4-8091-7be86cdb0526.webp?v=1714720764","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dfa770bbb103b4a4dd6c98c911b1232decd15570_c193dc6c-4220-46ae-bae6-6ce68fb0901c.webp?v=1714720767","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00c21a28fff3180f3e5aea5e4755a6e7c20e88c5_b93d5e87-06c1-4c4d-bc1e-e0003ef15677.webp?v=1714720769","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/26a22c8fa48a363cb96a849587d8ea4b50f689be_07a785d3-809a-48f5-953e-e3ddb5371ebb.webp?v=1714720771","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/93f3d4ac64124c36cd3c0d02bb9e9d28d9e4e910_b4d8e577-dca5-4533-8ffb-6633f4d9930b.webp?v=1714720774","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/12587a203f41f5a889040c1e5f3f9bc7b0560a1b_8ce1b261-e1f0-4176-b35a-849004e8060d.webp?v=1714720776","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b6dcf7bf541e7ed3ddbafc9067efd4df408524d_b2eb59bb-a7b5-4138-ae59-1d6cf70bb5fd.webp?v=1714720778"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/421f5688cbf8054c5258b306effa0724ec2350ec_9f9ecf02-ed7c-49ac-b65e-4d607ae139c6.webp?v=1714720756","options":["color"],"media":[{"alt":null,"id":23877080744035,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/421f5688cbf8054c5258b306effa0724ec2350ec_9f9ecf02-ed7c-49ac-b65e-4d607ae139c6.webp?v=1714720756"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/421f5688cbf8054c5258b306effa0724ec2350ec_9f9ecf02-ed7c-49ac-b65e-4d607ae139c6.webp?v=1714720756","width":2000},{"alt":null,"id":23877081333859,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3140da93d23607d2b049b03c79cecf4c1a79bbff_0bc34628-0256-47e1-af0c-e7ea9b9fd4ed.webp?v=1714720759"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3140da93d23607d2b049b03c79cecf4c1a79bbff_0bc34628-0256-47e1-af0c-e7ea9b9fd4ed.webp?v=1714720759","width":2000},{"alt":null,"id":23877081792611,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8637779146daab48c42939b43c981fee2fe00402_9d3a9979-6a3d-4364-a8b1-acf86626d2c3.webp?v=1714720762"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8637779146daab48c42939b43c981fee2fe00402_9d3a9979-6a3d-4364-a8b1-acf86626d2c3.webp?v=1714720762","width":2000},{"alt":null,"id":23877082153059,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc13ae9f12d4eb0c2842f4b485e5b73bac590a71_a4abfafd-ca0e-48b4-8091-7be86cdb0526.webp?v=1714720764"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc13ae9f12d4eb0c2842f4b485e5b73bac590a71_a4abfafd-ca0e-48b4-8091-7be86cdb0526.webp?v=1714720764","width":2000},{"alt":null,"id":23877082677347,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dfa770bbb103b4a4dd6c98c911b1232decd15570_c193dc6c-4220-46ae-bae6-6ce68fb0901c.webp?v=1714720767"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dfa770bbb103b4a4dd6c98c911b1232decd15570_c193dc6c-4220-46ae-bae6-6ce68fb0901c.webp?v=1714720767","width":2000},{"alt":null,"id":23877083168867,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00c21a28fff3180f3e5aea5e4755a6e7c20e88c5_b93d5e87-06c1-4c4d-bc1e-e0003ef15677.webp?v=1714720769"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00c21a28fff3180f3e5aea5e4755a6e7c20e88c5_b93d5e87-06c1-4c4d-bc1e-e0003ef15677.webp?v=1714720769","width":2000},{"alt":null,"id":23877083627619,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/26a22c8fa48a363cb96a849587d8ea4b50f689be_07a785d3-809a-48f5-953e-e3ddb5371ebb.webp?v=1714720771"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/26a22c8fa48a363cb96a849587d8ea4b50f689be_07a785d3-809a-48f5-953e-e3ddb5371ebb.webp?v=1714720771","width":2000},{"alt":null,"id":23877084315747,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/93f3d4ac64124c36cd3c0d02bb9e9d28d9e4e910_b4d8e577-dca5-4533-8ffb-6633f4d9930b.webp?v=1714720774"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/93f3d4ac64124c36cd3c0d02bb9e9d28d9e4e910_b4d8e577-dca5-4533-8ffb-6633f4d9930b.webp?v=1714720774","width":2000},{"alt":null,"id":23877084774499,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/12587a203f41f5a889040c1e5f3f9bc7b0560a1b_8ce1b261-e1f0-4176-b35a-849004e8060d.webp?v=1714720776"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/12587a203f41f5a889040c1e5f3f9bc7b0560a1b_8ce1b261-e1f0-4176-b35a-849004e8060d.webp?v=1714720776","width":2000},{"alt":null,"id":23877085200483,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b6dcf7bf541e7ed3ddbafc9067efd4df408524d_b2eb59bb-a7b5-4138-ae59-1d6cf70bb5fd.webp?v=1714720778"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b6dcf7bf541e7ed3ddbafc9067efd4df408524d_b2eb59bb-a7b5-4138-ae59-1d6cf70bb5fd.webp?v=1714720778","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41885062922339,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-YB03","requires_shipping":true,"taxable":true,"featured_image":{"id":31472166568035,"product_id":7408400236643,"position":4,"created_at":"2024-05-03T15:19:24+08:00","updated_at":"2024-05-03T15:19:24+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc13ae9f12d4eb0c2842f4b485e5b73bac590a71_a4abfafd-ca0e-48b4-8091-7be86cdb0526.webp?v=1714720764","variant_ids":[41885062922339]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Care Bears - Cheer Bear - 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-YB03","featured_media":{"alt":null,"id":23877082153059,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc13ae9f12d4eb0c2842f4b485e5b73bac590a71_a4abfafd-ca0e-48b4-8091-7be86cdb0526.webp?v=1714720764"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41885062922339,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-YB03","requires_shipping":true,"taxable":true,"featured_image":{"id":31472166568035,"product_id":7408400236643,"position":4,"created_at":"2024-05-03T15:19:24+08:00","updated_at":"2024-05-03T15:19:24+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc13ae9f12d4eb0c2842f4b485e5b73bac590a71_a4abfafd-ca0e-48b4-8091-7be86cdb0526.webp?v=1714720764","variant_ids":[41885062922339]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Care Bears - Cheer Bear - 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-YB03","featured_media":{"alt":null,"id":23877082153059,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc13ae9f12d4eb0c2842f4b485e5b73bac590a71_a4abfafd-ca0e-48b4-8091-7be86cdb0526.webp?v=1714720764"}},"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: "停產"
}