$product = {"id":7416070996067,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Care Bears - We are together","handle":"iphone-xs-max-mod-nx-printable-yb14","description":null,"published_at":"2024-06-11T16:51:57+08:00","created_at":"2024-05-06T12:52:46+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 XS 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":41917137584227,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-YB14","requires_shipping":true,"taxable":true,"featured_image":{"id":31491147071587,"product_id":7416070996067,"position":9,"created_at":"2024-05-06T12:53:11+08:00","updated_at":"2024-05-06T12:53:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/501a5a3ad7133c97adc2aedb9cb74e02a050cd07_2808a850-6be1-424b-a236-b76f5ce6bacf.webp?v=1714971191","variant_ids":[41917137584227]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Care Bears - We are together - 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":"NPB0108624-YB14","featured_media":{"alt":null,"id":23896554504291,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/501a5a3ad7133c97adc2aedb9cb74e02a050cd07_2808a850-6be1-424b-a236-b76f5ce6bacf.webp?v=1714971191"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bea84a39eb76ea98d355b1d287578e37ff5ac55d_437cb7be-776d-4fd1-a847-e6459fd1aaba.webp?v=1714971169","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6406226eb6cbe32c61ccccbf18c1a525cd87121_398e1290-cf6e-4a69-86f8-83a265b6e1d1.webp?v=1714971171","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/270638b38504684dd9b7a99d31f9281f3fe3fc49_0908fc0e-5c59-41c0-ade9-23781130fe98.webp?v=1714971173","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a383626e20cc2c31378d075db06fe4053dcada2_d1e50102-27c7-46eb-8124-7bd1f8e5e8ad.webp?v=1714971176","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efdf01e2438e7f4977a9be543a89c9b13d8c40a0_cdf034db-e7cd-4cc1-820d-366c898ff4f1.webp?v=1714971179","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e642ad696ad6f172ab3db3e02925f985302e0db0_345a00fd-65f4-4d47-b105-541b4321550a.webp?v=1714971181","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38e1fff351a23ef9466a6e2ca2ad1f1726337587_ed8a7368-370d-477a-befe-6b60ec693edb.webp?v=1714971184","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e407eee936c3aba7bc60282240708bc9b4dc3c56_3dac8abb-7c51-4f7e-b8d8-0e1db3fbb51c.webp?v=1714971186","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/501a5a3ad7133c97adc2aedb9cb74e02a050cd07_2808a850-6be1-424b-a236-b76f5ce6bacf.webp?v=1714971191"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bea84a39eb76ea98d355b1d287578e37ff5ac55d_437cb7be-776d-4fd1-a847-e6459fd1aaba.webp?v=1714971169","options":["color"],"media":[{"alt":null,"id":23896548048995,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bea84a39eb76ea98d355b1d287578e37ff5ac55d_437cb7be-776d-4fd1-a847-e6459fd1aaba.webp?v=1714971169"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bea84a39eb76ea98d355b1d287578e37ff5ac55d_437cb7be-776d-4fd1-a847-e6459fd1aaba.webp?v=1714971169","width":2000},{"alt":null,"id":23896548737123,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6406226eb6cbe32c61ccccbf18c1a525cd87121_398e1290-cf6e-4a69-86f8-83a265b6e1d1.webp?v=1714971171"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6406226eb6cbe32c61ccccbf18c1a525cd87121_398e1290-cf6e-4a69-86f8-83a265b6e1d1.webp?v=1714971171","width":2000},{"alt":null,"id":23896549851235,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/270638b38504684dd9b7a99d31f9281f3fe3fc49_0908fc0e-5c59-41c0-ade9-23781130fe98.webp?v=1714971173"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/270638b38504684dd9b7a99d31f9281f3fe3fc49_0908fc0e-5c59-41c0-ade9-23781130fe98.webp?v=1714971173","width":2000},{"alt":null,"id":23896550408291,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a383626e20cc2c31378d075db06fe4053dcada2_d1e50102-27c7-46eb-8124-7bd1f8e5e8ad.webp?v=1714971176"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a383626e20cc2c31378d075db06fe4053dcada2_d1e50102-27c7-46eb-8124-7bd1f8e5e8ad.webp?v=1714971176","width":2000},{"alt":null,"id":23896551522403,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efdf01e2438e7f4977a9be543a89c9b13d8c40a0_cdf034db-e7cd-4cc1-820d-366c898ff4f1.webp?v=1714971179"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efdf01e2438e7f4977a9be543a89c9b13d8c40a0_cdf034db-e7cd-4cc1-820d-366c898ff4f1.webp?v=1714971179","width":2000},{"alt":null,"id":23896552046691,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e642ad696ad6f172ab3db3e02925f985302e0db0_345a00fd-65f4-4d47-b105-541b4321550a.webp?v=1714971181"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e642ad696ad6f172ab3db3e02925f985302e0db0_345a00fd-65f4-4d47-b105-541b4321550a.webp?v=1714971181","width":2000},{"alt":null,"id":23896552505443,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38e1fff351a23ef9466a6e2ca2ad1f1726337587_ed8a7368-370d-477a-befe-6b60ec693edb.webp?v=1714971184"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38e1fff351a23ef9466a6e2ca2ad1f1726337587_ed8a7368-370d-477a-befe-6b60ec693edb.webp?v=1714971184","width":2000},{"alt":null,"id":23896553193571,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e407eee936c3aba7bc60282240708bc9b4dc3c56_3dac8abb-7c51-4f7e-b8d8-0e1db3fbb51c.webp?v=1714971186"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e407eee936c3aba7bc60282240708bc9b4dc3c56_3dac8abb-7c51-4f7e-b8d8-0e1db3fbb51c.webp?v=1714971186","width":2000},{"alt":null,"id":23896554504291,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/501a5a3ad7133c97adc2aedb9cb74e02a050cd07_2808a850-6be1-424b-a236-b76f5ce6bacf.webp?v=1714971191"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/501a5a3ad7133c97adc2aedb9cb74e02a050cd07_2808a850-6be1-424b-a236-b76f5ce6bacf.webp?v=1714971191","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41917137584227,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-YB14","requires_shipping":true,"taxable":true,"featured_image":{"id":31491147071587,"product_id":7416070996067,"position":9,"created_at":"2024-05-06T12:53:11+08:00","updated_at":"2024-05-06T12:53:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/501a5a3ad7133c97adc2aedb9cb74e02a050cd07_2808a850-6be1-424b-a236-b76f5ce6bacf.webp?v=1714971191","variant_ids":[41917137584227]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Care Bears - We are together - 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":"NPB0108624-YB14","featured_media":{"alt":null,"id":23896554504291,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/501a5a3ad7133c97adc2aedb9cb74e02a050cd07_2808a850-6be1-424b-a236-b76f5ce6bacf.webp?v=1714971191"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41917137584227,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-YB14","requires_shipping":true,"taxable":true,"featured_image":{"id":31491147071587,"product_id":7416070996067,"position":9,"created_at":"2024-05-06T12:53:11+08:00","updated_at":"2024-05-06T12:53:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/501a5a3ad7133c97adc2aedb9cb74e02a050cd07_2808a850-6be1-424b-a236-b76f5ce6bacf.webp?v=1714971191","variant_ids":[41917137584227]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Care Bears - We are together - 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":"NPB0108624-YB14","featured_media":{"alt":null,"id":23896554504291,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/501a5a3ad7133c97adc2aedb9cb74e02a050cd07_2808a850-6be1-424b-a236-b76f5ce6bacf.webp?v=1714971191"}},"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: "停產"
}