$product = {"id":7415053254755,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Care Bears - 熊滿星空","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-yb09","description":null,"published_at":"2024-06-11T17:56:43+08:00","created_at":"2024-05-05T20:13:57+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 pro max","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":41911374708835,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-YB09","requires_shipping":true,"taxable":true,"featured_image":{"id":31488030670947,"product_id":7415053254755,"position":4,"created_at":"2024-05-05T20:14:06+08:00","updated_at":"2024-05-05T20:14:06+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f0e4016a29a223b2505a9ac08c322eda31ffbc4_e8b475ad-f6f6-42bc-a9da-c3c17b25e913.webp?v=1714911246","variant_ids":[41911374708835]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Care Bears - 熊滿星空 - 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":"MPB0118724-YB09","featured_media":{"alt":null,"id":23893374992483,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f0e4016a29a223b2505a9ac08c322eda31ffbc4_e8b475ad-f6f6-42bc-a9da-c3c17b25e913.webp?v=1714911246"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/21c16aba2c7684497064853ff3fdce686176365b_c92da271-d86b-479d-8e44-874b2861a687.webp?v=1714911239","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e294ca3784dab0efd58354db4c8c5ccf14721c0b_3e1c055a-3f28-4778-b8a0-272a445c2c7a.webp?v=1714911242","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b20b2c8504f1f73b68c09f9542e3ed4fffb0d057_c3eaf0b7-90e3-4248-a610-014e2aba6231.webp?v=1714911244","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f0e4016a29a223b2505a9ac08c322eda31ffbc4_e8b475ad-f6f6-42bc-a9da-c3c17b25e913.webp?v=1714911246","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2509842ec88b7223408471aab9f454daf877219e_3283ecba-dfde-4cd3-9389-5ba3896c6dc0.webp?v=1714911248","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d71e694b353d1457d12a4c9fcc2c2643e177c8b1_ee09264a-47d6-40d1-b672-b321e284dbdf.webp?v=1714911251","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/424adf1e38d8eedc2c7ede047f515e0e6a66394e_18c02f6f-e431-4417-82c6-15126c47c44f.webp?v=1714911253","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c688f807f4e2e14a2c6809ccba59822406b28076_e5d66963-881c-42c2-a07c-eed423e5311c.webp?v=1714911256","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fcbe1f7eb93f68617c2cd8215ededfde6bb1a04_2a3c49a5-3b36-49da-8083-10ec5524b783.webp?v=1714911258","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a7add32235428c228526cd239d99eb63285dff3b_bdaf7819-0b79-4f67-b84b-7797c3a945f5.webp?v=1714911260"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/21c16aba2c7684497064853ff3fdce686176365b_c92da271-d86b-479d-8e44-874b2861a687.webp?v=1714911239","options":["color"],"media":[{"alt":null,"id":23893373648995,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/21c16aba2c7684497064853ff3fdce686176365b_c92da271-d86b-479d-8e44-874b2861a687.webp?v=1714911239"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/21c16aba2c7684497064853ff3fdce686176365b_c92da271-d86b-479d-8e44-874b2861a687.webp?v=1714911239","width":2000},{"alt":null,"id":23893373943907,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e294ca3784dab0efd58354db4c8c5ccf14721c0b_3e1c055a-3f28-4778-b8a0-272a445c2c7a.webp?v=1714911242"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e294ca3784dab0efd58354db4c8c5ccf14721c0b_3e1c055a-3f28-4778-b8a0-272a445c2c7a.webp?v=1714911242","width":2000},{"alt":null,"id":23893374435427,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b20b2c8504f1f73b68c09f9542e3ed4fffb0d057_c3eaf0b7-90e3-4248-a610-014e2aba6231.webp?v=1714911244"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b20b2c8504f1f73b68c09f9542e3ed4fffb0d057_c3eaf0b7-90e3-4248-a610-014e2aba6231.webp?v=1714911244","width":2000},{"alt":null,"id":23893374992483,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f0e4016a29a223b2505a9ac08c322eda31ffbc4_e8b475ad-f6f6-42bc-a9da-c3c17b25e913.webp?v=1714911246"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f0e4016a29a223b2505a9ac08c322eda31ffbc4_e8b475ad-f6f6-42bc-a9da-c3c17b25e913.webp?v=1714911246","width":2000},{"alt":null,"id":23893375713379,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2509842ec88b7223408471aab9f454daf877219e_3283ecba-dfde-4cd3-9389-5ba3896c6dc0.webp?v=1714911248"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2509842ec88b7223408471aab9f454daf877219e_3283ecba-dfde-4cd3-9389-5ba3896c6dc0.webp?v=1714911248","width":2000},{"alt":null,"id":23893376106595,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d71e694b353d1457d12a4c9fcc2c2643e177c8b1_ee09264a-47d6-40d1-b672-b321e284dbdf.webp?v=1714911251"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d71e694b353d1457d12a4c9fcc2c2643e177c8b1_ee09264a-47d6-40d1-b672-b321e284dbdf.webp?v=1714911251","width":2000},{"alt":null,"id":23893376630883,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/424adf1e38d8eedc2c7ede047f515e0e6a66394e_18c02f6f-e431-4417-82c6-15126c47c44f.webp?v=1714911253"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/424adf1e38d8eedc2c7ede047f515e0e6a66394e_18c02f6f-e431-4417-82c6-15126c47c44f.webp?v=1714911253","width":2000},{"alt":null,"id":23893377155171,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c688f807f4e2e14a2c6809ccba59822406b28076_e5d66963-881c-42c2-a07c-eed423e5311c.webp?v=1714911256"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c688f807f4e2e14a2c6809ccba59822406b28076_e5d66963-881c-42c2-a07c-eed423e5311c.webp?v=1714911256","width":2000},{"alt":null,"id":23893377876067,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fcbe1f7eb93f68617c2cd8215ededfde6bb1a04_2a3c49a5-3b36-49da-8083-10ec5524b783.webp?v=1714911258"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fcbe1f7eb93f68617c2cd8215ededfde6bb1a04_2a3c49a5-3b36-49da-8083-10ec5524b783.webp?v=1714911258","width":2000},{"alt":null,"id":23893378269283,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a7add32235428c228526cd239d99eb63285dff3b_bdaf7819-0b79-4f67-b84b-7797c3a945f5.webp?v=1714911260"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a7add32235428c228526cd239d99eb63285dff3b_bdaf7819-0b79-4f67-b84b-7797c3a945f5.webp?v=1714911260","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41911374708835,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-YB09","requires_shipping":true,"taxable":true,"featured_image":{"id":31488030670947,"product_id":7415053254755,"position":4,"created_at":"2024-05-05T20:14:06+08:00","updated_at":"2024-05-05T20:14:06+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f0e4016a29a223b2505a9ac08c322eda31ffbc4_e8b475ad-f6f6-42bc-a9da-c3c17b25e913.webp?v=1714911246","variant_ids":[41911374708835]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Care Bears - 熊滿星空 - 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":"MPB0118724-YB09","featured_media":{"alt":null,"id":23893374992483,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f0e4016a29a223b2505a9ac08c322eda31ffbc4_e8b475ad-f6f6-42bc-a9da-c3c17b25e913.webp?v=1714911246"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41911374708835,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-YB09","requires_shipping":true,"taxable":true,"featured_image":{"id":31488030670947,"product_id":7415053254755,"position":4,"created_at":"2024-05-05T20:14:06+08:00","updated_at":"2024-05-05T20:14:06+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f0e4016a29a223b2505a9ac08c322eda31ffbc4_e8b475ad-f6f6-42bc-a9da-c3c17b25e913.webp?v=1714911246","variant_ids":[41911374708835]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Care Bears - 熊滿星空 - 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":"MPB0118724-YB09","featured_media":{"alt":null,"id":23893374992483,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f0e4016a29a223b2505a9ac08c322eda31ffbc4_e8b475ad-f6f6-42bc-a9da-c3c17b25e913.webp?v=1714911246"}},"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: "停產"
}