$product = {"id":7415101653091,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 史迪奇 - 經典系列-Aloha!","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-yf08","description":null,"published_at":"2024-06-11T17:58:00+08:00","created_at":"2024-05-05T20:23:03+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區史迪奇","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-stitch","device-iPhone 12 pro max","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-stitch","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":41911880581219,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-YF08","requires_shipping":true,"taxable":true,"featured_image":{"id":31488164233315,"product_id":7415101653091,"position":5,"created_at":"2024-05-05T20:23:15+08:00","updated_at":"2024-05-05T20:23:15+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/230a958078f159154bc68285ba8a4d92d80d3081_caeef34f-08d1-49b1-b006-5829ef0f5b13.webp?v=1714911795","variant_ids":[41911880581219]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 史迪奇 - 經典系列-Aloha! - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118724-YF08","featured_media":{"alt":null,"id":23893508915299,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/230a958078f159154bc68285ba8a4d92d80d3081_caeef34f-08d1-49b1-b006-5829ef0f5b13.webp?v=1714911795"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85f62dbc48a0b66bc775d47edfb412c63c6a01c5_c6418b92-e834-44ac-b1cf-450714aea013.webp?v=1714911785","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee5aaa348240f51335006e3de50d329809da3940_88de2bc9-cfbe-4b90-b36d-90c3ed77c882.webp?v=1714911787","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8398ccd583e152d133917995307aab55da26c876_b47d5e15-7555-46dc-9594-02c05a307fe9.webp?v=1714911790","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f54cccb483f511ca201383ec2beb28f4a7c8606_80e05922-f907-4527-ac6f-88981e55144f.webp?v=1714911792","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/230a958078f159154bc68285ba8a4d92d80d3081_caeef34f-08d1-49b1-b006-5829ef0f5b13.webp?v=1714911795","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88d950134818eb9d8100624dcbddfdce1a71707c_87a33848-5539-442f-986c-8b02e93e4fa0.webp?v=1714911797","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fbd81f01b6460d8a962bbe17725b7117bcd41d87_df400a03-cc2c-4fe0-a10f-a957e20636d4.webp?v=1714911799","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c9757ab381cb04d75640ab615d8ec69a51ba93ce_6fa4a7c9-b97f-4276-9f1b-9bdd49623bb5.webp?v=1714911802","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/199f249e1621136b065d64d07f355896fce76142_bdb7be58-03af-4a2b-b70d-f1dff7c0800e.webp?v=1714911804","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/421ad921aac78501790a41ff95924567b2849711_714f5316-15a1-431f-ad50-1a389da77823.webp?v=1714911806"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85f62dbc48a0b66bc775d47edfb412c63c6a01c5_c6418b92-e834-44ac-b1cf-450714aea013.webp?v=1714911785","options":["color"],"media":[{"alt":null,"id":23893506523235,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85f62dbc48a0b66bc775d47edfb412c63c6a01c5_c6418b92-e834-44ac-b1cf-450714aea013.webp?v=1714911785"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85f62dbc48a0b66bc775d47edfb412c63c6a01c5_c6418b92-e834-44ac-b1cf-450714aea013.webp?v=1714911785","width":2000},{"alt":null,"id":23893506949219,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee5aaa348240f51335006e3de50d329809da3940_88de2bc9-cfbe-4b90-b36d-90c3ed77c882.webp?v=1714911787"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee5aaa348240f51335006e3de50d329809da3940_88de2bc9-cfbe-4b90-b36d-90c3ed77c882.webp?v=1714911787","width":2000},{"alt":null,"id":23893507735651,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8398ccd583e152d133917995307aab55da26c876_b47d5e15-7555-46dc-9594-02c05a307fe9.webp?v=1714911790"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8398ccd583e152d133917995307aab55da26c876_b47d5e15-7555-46dc-9594-02c05a307fe9.webp?v=1714911790","width":2000},{"alt":null,"id":23893508292707,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f54cccb483f511ca201383ec2beb28f4a7c8606_80e05922-f907-4527-ac6f-88981e55144f.webp?v=1714911792"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f54cccb483f511ca201383ec2beb28f4a7c8606_80e05922-f907-4527-ac6f-88981e55144f.webp?v=1714911792","width":2000},{"alt":null,"id":23893508915299,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/230a958078f159154bc68285ba8a4d92d80d3081_caeef34f-08d1-49b1-b006-5829ef0f5b13.webp?v=1714911795"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/230a958078f159154bc68285ba8a4d92d80d3081_caeef34f-08d1-49b1-b006-5829ef0f5b13.webp?v=1714911795","width":2000},{"alt":null,"id":23893509341283,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88d950134818eb9d8100624dcbddfdce1a71707c_87a33848-5539-442f-986c-8b02e93e4fa0.webp?v=1714911797"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88d950134818eb9d8100624dcbddfdce1a71707c_87a33848-5539-442f-986c-8b02e93e4fa0.webp?v=1714911797","width":2000},{"alt":null,"id":23893509865571,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fbd81f01b6460d8a962bbe17725b7117bcd41d87_df400a03-cc2c-4fe0-a10f-a957e20636d4.webp?v=1714911799"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fbd81f01b6460d8a962bbe17725b7117bcd41d87_df400a03-cc2c-4fe0-a10f-a957e20636d4.webp?v=1714911799","width":2000},{"alt":null,"id":23893510226019,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c9757ab381cb04d75640ab615d8ec69a51ba93ce_6fa4a7c9-b97f-4276-9f1b-9bdd49623bb5.webp?v=1714911802"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c9757ab381cb04d75640ab615d8ec69a51ba93ce_6fa4a7c9-b97f-4276-9f1b-9bdd49623bb5.webp?v=1714911802","width":2000},{"alt":null,"id":23893511176291,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/199f249e1621136b065d64d07f355896fce76142_bdb7be58-03af-4a2b-b70d-f1dff7c0800e.webp?v=1714911804"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/199f249e1621136b065d64d07f355896fce76142_bdb7be58-03af-4a2b-b70d-f1dff7c0800e.webp?v=1714911804","width":2000},{"alt":null,"id":23893511897187,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/421ad921aac78501790a41ff95924567b2849711_714f5316-15a1-431f-ad50-1a389da77823.webp?v=1714911806"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/421ad921aac78501790a41ff95924567b2849711_714f5316-15a1-431f-ad50-1a389da77823.webp?v=1714911806","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41911880581219,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-YF08","requires_shipping":true,"taxable":true,"featured_image":{"id":31488164233315,"product_id":7415101653091,"position":5,"created_at":"2024-05-05T20:23:15+08:00","updated_at":"2024-05-05T20:23:15+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/230a958078f159154bc68285ba8a4d92d80d3081_caeef34f-08d1-49b1-b006-5829ef0f5b13.webp?v=1714911795","variant_ids":[41911880581219]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 史迪奇 - 經典系列-Aloha! - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118724-YF08","featured_media":{"alt":null,"id":23893508915299,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/230a958078f159154bc68285ba8a4d92d80d3081_caeef34f-08d1-49b1-b006-5829ef0f5b13.webp?v=1714911795"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41911880581219,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-YF08","requires_shipping":true,"taxable":true,"featured_image":{"id":31488164233315,"product_id":7415101653091,"position":5,"created_at":"2024-05-05T20:23:15+08:00","updated_at":"2024-05-05T20:23:15+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/230a958078f159154bc68285ba8a4d92d80d3081_caeef34f-08d1-49b1-b006-5829ef0f5b13.webp?v=1714911795","variant_ids":[41911880581219]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 史迪奇 - 經典系列-Aloha! - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118724-YF08","featured_media":{"alt":null,"id":23893508915299,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/230a958078f159154bc68285ba8a4d92d80d3081_caeef34f-08d1-49b1-b006-5829ef0f5b13.webp?v=1714911795"}},"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: "停產"
}