$product = {"id":7408426156131,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Care Bears - 愛心滿天","handle":"iphone-12-pro-max-mod-nx-printable-yb07","description":null,"published_at":"2024-06-11T16:36:55+08:00","created_at":"2024-05-03T15:24:27+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":41885348724835,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-YB07","requires_shipping":true,"taxable":true,"featured_image":{"id":31472244686947,"product_id":7408426156131,"position":3,"created_at":"2024-05-03T15:24:34+08:00","updated_at":"2024-05-03T15:24:34+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/310195810cffb4ac0b99f1aeb9a5047c58ca3c28_8785698a-37d5-4313-9e43-01f5b1982b4c.webp?v=1714721074","variant_ids":[41885348724835]},"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-YB07","featured_media":{"alt":null,"id":23877160829027,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/310195810cffb4ac0b99f1aeb9a5047c58ca3c28_8785698a-37d5-4313-9e43-01f5b1982b4c.webp?v=1714721074"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7884f4581ea0c8793eb4a2a15662acae9abd72ac_7be35e07-1957-43f3-9da5-7879e973c312.webp?v=1714721069","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f4f6da8732b6ca48d6b00f438e989f97c65e253_e404a167-6094-4b25-9e17-9f0ad60656fb.webp?v=1714721072","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/310195810cffb4ac0b99f1aeb9a5047c58ca3c28_8785698a-37d5-4313-9e43-01f5b1982b4c.webp?v=1714721074","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/46c6dc832aca6e83fa23428e4edda5570739eee2_50d61391-6494-41a4-8e6b-ed35695be593.webp?v=1714721076","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68c8a443abd6378b94c15049461c7e16b2cdff48_80f2bf2f-6346-4a3d-b4ee-caded7795225.webp?v=1714721078","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f4fccad847f2edd2d926003e1479320733aa284_1dbcefe8-6b17-4ee7-88b0-3fca03859748.webp?v=1714721081","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a5e93fb49b8d2719a9d94b9eb2c1a3a3039b91d_835400df-6069-4d4d-a4ca-bcc0b9f3db27.webp?v=1714721083","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/343463c58fb587ddb796d188b4ff8d7587d74a86_9909117d-c136-4c85-8ade-205b5b55fc59.webp?v=1714721085","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d1cfa679b729a2e4086489124472c57d9395031_f1148fa0-6b8f-47a4-97bf-0dd0c6b1c692.webp?v=1714721088","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/856c17f87b2d81fbd58454d8b80842b4c40ec455_558e6906-44e8-451c-96ef-659dd15bc19a.webp?v=1714721090"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7884f4581ea0c8793eb4a2a15662acae9abd72ac_7be35e07-1957-43f3-9da5-7879e973c312.webp?v=1714721069","options":["color"],"media":[{"alt":null,"id":23877159813219,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7884f4581ea0c8793eb4a2a15662acae9abd72ac_7be35e07-1957-43f3-9da5-7879e973c312.webp?v=1714721069"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7884f4581ea0c8793eb4a2a15662acae9abd72ac_7be35e07-1957-43f3-9da5-7879e973c312.webp?v=1714721069","width":2000},{"alt":null,"id":23877160403043,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f4f6da8732b6ca48d6b00f438e989f97c65e253_e404a167-6094-4b25-9e17-9f0ad60656fb.webp?v=1714721072"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f4f6da8732b6ca48d6b00f438e989f97c65e253_e404a167-6094-4b25-9e17-9f0ad60656fb.webp?v=1714721072","width":2000},{"alt":null,"id":23877160829027,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/310195810cffb4ac0b99f1aeb9a5047c58ca3c28_8785698a-37d5-4313-9e43-01f5b1982b4c.webp?v=1714721074"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/310195810cffb4ac0b99f1aeb9a5047c58ca3c28_8785698a-37d5-4313-9e43-01f5b1982b4c.webp?v=1714721074","width":2000},{"alt":null,"id":23877161156707,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/46c6dc832aca6e83fa23428e4edda5570739eee2_50d61391-6494-41a4-8e6b-ed35695be593.webp?v=1714721076"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/46c6dc832aca6e83fa23428e4edda5570739eee2_50d61391-6494-41a4-8e6b-ed35695be593.webp?v=1714721076","width":2000},{"alt":null,"id":23877161680995,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68c8a443abd6378b94c15049461c7e16b2cdff48_80f2bf2f-6346-4a3d-b4ee-caded7795225.webp?v=1714721078"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68c8a443abd6378b94c15049461c7e16b2cdff48_80f2bf2f-6346-4a3d-b4ee-caded7795225.webp?v=1714721078","width":2000},{"alt":null,"id":23877162041443,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f4fccad847f2edd2d926003e1479320733aa284_1dbcefe8-6b17-4ee7-88b0-3fca03859748.webp?v=1714721081"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f4fccad847f2edd2d926003e1479320733aa284_1dbcefe8-6b17-4ee7-88b0-3fca03859748.webp?v=1714721081","width":2000},{"alt":null,"id":23877162598499,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a5e93fb49b8d2719a9d94b9eb2c1a3a3039b91d_835400df-6069-4d4d-a4ca-bcc0b9f3db27.webp?v=1714721083"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a5e93fb49b8d2719a9d94b9eb2c1a3a3039b91d_835400df-6069-4d4d-a4ca-bcc0b9f3db27.webp?v=1714721083","width":2000},{"alt":null,"id":23877163090019,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/343463c58fb587ddb796d188b4ff8d7587d74a86_9909117d-c136-4c85-8ade-205b5b55fc59.webp?v=1714721085"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/343463c58fb587ddb796d188b4ff8d7587d74a86_9909117d-c136-4c85-8ade-205b5b55fc59.webp?v=1714721085","width":2000},{"alt":null,"id":23877163614307,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d1cfa679b729a2e4086489124472c57d9395031_f1148fa0-6b8f-47a4-97bf-0dd0c6b1c692.webp?v=1714721088"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d1cfa679b729a2e4086489124472c57d9395031_f1148fa0-6b8f-47a4-97bf-0dd0c6b1c692.webp?v=1714721088","width":2000},{"alt":null,"id":23877163909219,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/856c17f87b2d81fbd58454d8b80842b4c40ec455_558e6906-44e8-451c-96ef-659dd15bc19a.webp?v=1714721090"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/856c17f87b2d81fbd58454d8b80842b4c40ec455_558e6906-44e8-451c-96ef-659dd15bc19a.webp?v=1714721090","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41885348724835,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-YB07","requires_shipping":true,"taxable":true,"featured_image":{"id":31472244686947,"product_id":7408426156131,"position":3,"created_at":"2024-05-03T15:24:34+08:00","updated_at":"2024-05-03T15:24:34+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/310195810cffb4ac0b99f1aeb9a5047c58ca3c28_8785698a-37d5-4313-9e43-01f5b1982b4c.webp?v=1714721074","variant_ids":[41885348724835]},"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-YB07","featured_media":{"alt":null,"id":23877160829027,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/310195810cffb4ac0b99f1aeb9a5047c58ca3c28_8785698a-37d5-4313-9e43-01f5b1982b4c.webp?v=1714721074"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41885348724835,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-YB07","requires_shipping":true,"taxable":true,"featured_image":{"id":31472244686947,"product_id":7408426156131,"position":3,"created_at":"2024-05-03T15:24:34+08:00","updated_at":"2024-05-03T15:24:34+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/310195810cffb4ac0b99f1aeb9a5047c58ca3c28_8785698a-37d5-4313-9e43-01f5b1982b4c.webp?v=1714721074","variant_ids":[41885348724835]},"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-YB07","featured_media":{"alt":null,"id":23877160829027,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/310195810cffb4ac0b99f1aeb9a5047c58ca3c28_8785698a-37d5-4313-9e43-01f5b1982b4c.webp?v=1714721074"}},"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: "停產"
}