$product = {"id":7408421797987,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Care Bears - We are together","handle":"iphone-12-pro-max-mod-nx-printable-yb14","description":null,"published_at":"2024-06-11T16:36:47+08:00","created_at":"2024-05-03T15:23:25+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":41885294592099,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-YB14","requires_shipping":true,"taxable":true,"featured_image":{"id":31472228499555,"product_id":7408421797987,"position":1,"created_at":"2024-05-03T15:23:28+08:00","updated_at":"2024-05-03T15:23:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/695be42811fee3da50aa72b43e135facf965f7c0_46281c60-915c-4374-b054-12c11264d2f2.webp?v=1714721008","variant_ids":[41885294592099]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro 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":"NPB0118724-YB14","featured_media":{"alt":null,"id":23877144346723,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/695be42811fee3da50aa72b43e135facf965f7c0_46281c60-915c-4374-b054-12c11264d2f2.webp?v=1714721008"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/695be42811fee3da50aa72b43e135facf965f7c0_46281c60-915c-4374-b054-12c11264d2f2.webp?v=1714721008","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/045aa3ef873327e0fe44abfe0679f2ba6538a228_153c1f28-f780-4b86-a22e-f101bd8934f0.webp?v=1714721010","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a24543dc99788e3c10bb0d443f25832b4d6b9c56_4aaa1e9b-5090-4040-9585-91c19afd41b1.webp?v=1714721013","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/15d3a8ebab66a4170f66dad382d8e1a7d94c3379_91afb604-6003-433b-9391-cc5a111381bb.webp?v=1714721016","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0bdfa964a6c7715b2d83c747fc5f4b7adfb221dd_ad681a8d-8290-448b-a832-4575e73c8092.webp?v=1714721019","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34b1ddf9422f3f2bbbc99b6ae23b7c7e4876a187_13b671d8-680b-4f45-ad1e-21ea0aed818e.webp?v=1714721022","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/70b805a0df70a10cbb420557a656f2cff41e9fe0_30f16f2a-eaff-48f7-b5aa-2cf52b69df9c.webp?v=1714721025","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c8d8f632d9feae27aff39d8dcac9a818ddfe7ef_19e70081-d459-46ee-a4d5-96d405c2705c.webp?v=1714721028","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca5a29af6d51ab60dafdc7d275d63f84a86c48ab_c51ab873-6538-421a-9435-3fbcfd2bec97.webp?v=1714721030","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0b2bc80b7db9c878219e4cb594483e185f65eae_e97d8df2-c7f2-4982-b27b-c85565d7d31f.webp?v=1714721032"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/695be42811fee3da50aa72b43e135facf965f7c0_46281c60-915c-4374-b054-12c11264d2f2.webp?v=1714721008","options":["color"],"media":[{"alt":null,"id":23877144346723,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/695be42811fee3da50aa72b43e135facf965f7c0_46281c60-915c-4374-b054-12c11264d2f2.webp?v=1714721008"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/695be42811fee3da50aa72b43e135facf965f7c0_46281c60-915c-4374-b054-12c11264d2f2.webp?v=1714721008","width":2000},{"alt":null,"id":23877145264227,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/045aa3ef873327e0fe44abfe0679f2ba6538a228_153c1f28-f780-4b86-a22e-f101bd8934f0.webp?v=1714721010"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/045aa3ef873327e0fe44abfe0679f2ba6538a228_153c1f28-f780-4b86-a22e-f101bd8934f0.webp?v=1714721010","width":2000},{"alt":null,"id":23877146640483,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a24543dc99788e3c10bb0d443f25832b4d6b9c56_4aaa1e9b-5090-4040-9585-91c19afd41b1.webp?v=1714721013"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a24543dc99788e3c10bb0d443f25832b4d6b9c56_4aaa1e9b-5090-4040-9585-91c19afd41b1.webp?v=1714721013","width":2000},{"alt":null,"id":23877148016739,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/15d3a8ebab66a4170f66dad382d8e1a7d94c3379_91afb604-6003-433b-9391-cc5a111381bb.webp?v=1714721016"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/15d3a8ebab66a4170f66dad382d8e1a7d94c3379_91afb604-6003-433b-9391-cc5a111381bb.webp?v=1714721016","width":2000},{"alt":null,"id":23877148672099,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0bdfa964a6c7715b2d83c747fc5f4b7adfb221dd_ad681a8d-8290-448b-a832-4575e73c8092.webp?v=1714721019"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0bdfa964a6c7715b2d83c747fc5f4b7adfb221dd_ad681a8d-8290-448b-a832-4575e73c8092.webp?v=1714721019","width":2000},{"alt":null,"id":23877149327459,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34b1ddf9422f3f2bbbc99b6ae23b7c7e4876a187_13b671d8-680b-4f45-ad1e-21ea0aed818e.webp?v=1714721022"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34b1ddf9422f3f2bbbc99b6ae23b7c7e4876a187_13b671d8-680b-4f45-ad1e-21ea0aed818e.webp?v=1714721022","width":2000},{"alt":null,"id":23877149917283,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/70b805a0df70a10cbb420557a656f2cff41e9fe0_30f16f2a-eaff-48f7-b5aa-2cf52b69df9c.webp?v=1714721025"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/70b805a0df70a10cbb420557a656f2cff41e9fe0_30f16f2a-eaff-48f7-b5aa-2cf52b69df9c.webp?v=1714721025","width":2000},{"alt":null,"id":23877150408803,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c8d8f632d9feae27aff39d8dcac9a818ddfe7ef_19e70081-d459-46ee-a4d5-96d405c2705c.webp?v=1714721028"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c8d8f632d9feae27aff39d8dcac9a818ddfe7ef_19e70081-d459-46ee-a4d5-96d405c2705c.webp?v=1714721028","width":2000},{"alt":null,"id":23877151064163,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca5a29af6d51ab60dafdc7d275d63f84a86c48ab_c51ab873-6538-421a-9435-3fbcfd2bec97.webp?v=1714721030"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca5a29af6d51ab60dafdc7d275d63f84a86c48ab_c51ab873-6538-421a-9435-3fbcfd2bec97.webp?v=1714721030","width":2000},{"alt":null,"id":23877151555683,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0b2bc80b7db9c878219e4cb594483e185f65eae_e97d8df2-c7f2-4982-b27b-c85565d7d31f.webp?v=1714721032"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0b2bc80b7db9c878219e4cb594483e185f65eae_e97d8df2-c7f2-4982-b27b-c85565d7d31f.webp?v=1714721032","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41885294592099,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-YB14","requires_shipping":true,"taxable":true,"featured_image":{"id":31472228499555,"product_id":7408421797987,"position":1,"created_at":"2024-05-03T15:23:28+08:00","updated_at":"2024-05-03T15:23:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/695be42811fee3da50aa72b43e135facf965f7c0_46281c60-915c-4374-b054-12c11264d2f2.webp?v=1714721008","variant_ids":[41885294592099]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro 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":"NPB0118724-YB14","featured_media":{"alt":null,"id":23877144346723,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/695be42811fee3da50aa72b43e135facf965f7c0_46281c60-915c-4374-b054-12c11264d2f2.webp?v=1714721008"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41885294592099,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-YB14","requires_shipping":true,"taxable":true,"featured_image":{"id":31472228499555,"product_id":7408421797987,"position":1,"created_at":"2024-05-03T15:23:28+08:00","updated_at":"2024-05-03T15:23:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/695be42811fee3da50aa72b43e135facf965f7c0_46281c60-915c-4374-b054-12c11264d2f2.webp?v=1714721008","variant_ids":[41885294592099]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro 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":"NPB0118724-YB14","featured_media":{"alt":null,"id":23877144346723,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/695be42811fee3da50aa72b43e135facf965f7c0_46281c60-915c-4374-b054-12c11264d2f2.webp?v=1714721008"}},"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: "停產"
}