$product = {"id":7414958162019,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Look - 人在做 大堡礁在看","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-af07","description":null,"published_at":"2024-06-11T17:54:08+08:00","created_at":"2024-05-05T19:55:52+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區Look","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-look","device-iPhone 12 pro max","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-look","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":41910348906595,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-AF07","requires_shipping":true,"taxable":true,"featured_image":{"id":31487780913251,"product_id":7414958162019,"position":9,"created_at":"2024-05-05T19:56:14+08:00","updated_at":"2024-05-05T19:56:14+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9553bbb865b075df4643c8502ee87e7a4ad73ecd_b8af09f4-158b-4952-9f45-f053fa7a95c9.webp?v=1714910174","variant_ids":[41910348906595]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Look - 人在做 大堡礁在看 - 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-AF07","featured_media":{"alt":null,"id":23893124841571,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9553bbb865b075df4643c8502ee87e7a4ad73ecd_b8af09f4-158b-4952-9f45-f053fa7a95c9.webp?v=1714910174"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80cc546fad9cd12c515717dd78af41462883bce8_0cb0c248-62a6-42f2-8ab8-a624e335c5d0.webp?v=1714910155","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/27591a96b4a907bbaffbf96367aefe0aa85cdc96_e5b39f3c-4b89-4f35-9272-a9673467af92.webp?v=1714910157","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/252abffaa49bd131c2b58989411208ed1ee691a4_5a0e822e-5512-41d2-b23d-0ca528af0c31.webp?v=1714910160","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/74c227678fce01d3df9da3223fa553b615a1d374_cbbb1062-30e8-4323-bffe-6e5d1ee90a47.webp?v=1714910162","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3180d64391fe765e896ca4ba59871fa5b768968f_21b437de-f92d-4e5f-b1e5-eac55ec36cfe.webp?v=1714910164","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f13e82d7eb4ce45f2c2e10fb6c34981a95880329_0a77495c-3223-48de-8548-e3dfbb4ad2dc.webp?v=1714910167","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71f92c34247358ae87d01c35d76fb43d352b4707_900d93d0-cd59-4163-ab9f-ddee86abd5f9.webp?v=1714910169","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52a935973029fb5d32c909f66e10a7e2c53c9c0d_53c25323-08ef-465b-b844-12724dccf23a.webp?v=1714910172","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9553bbb865b075df4643c8502ee87e7a4ad73ecd_b8af09f4-158b-4952-9f45-f053fa7a95c9.webp?v=1714910174","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/840642fb9a908ac03304e8d94c6a9efa7a9494cb_a56fb3b1-8df0-4bb3-93f6-69ed8b0e20be.webp?v=1714910177"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80cc546fad9cd12c515717dd78af41462883bce8_0cb0c248-62a6-42f2-8ab8-a624e335c5d0.webp?v=1714910155","options":["color"],"media":[{"alt":null,"id":23893120254051,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80cc546fad9cd12c515717dd78af41462883bce8_0cb0c248-62a6-42f2-8ab8-a624e335c5d0.webp?v=1714910155"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80cc546fad9cd12c515717dd78af41462883bce8_0cb0c248-62a6-42f2-8ab8-a624e335c5d0.webp?v=1714910155","width":2000},{"alt":null,"id":23893120614499,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/27591a96b4a907bbaffbf96367aefe0aa85cdc96_e5b39f3c-4b89-4f35-9272-a9673467af92.webp?v=1714910157"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/27591a96b4a907bbaffbf96367aefe0aa85cdc96_e5b39f3c-4b89-4f35-9272-a9673467af92.webp?v=1714910157","width":2000},{"alt":null,"id":23893121269859,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/252abffaa49bd131c2b58989411208ed1ee691a4_5a0e822e-5512-41d2-b23d-0ca528af0c31.webp?v=1714910160"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/252abffaa49bd131c2b58989411208ed1ee691a4_5a0e822e-5512-41d2-b23d-0ca528af0c31.webp?v=1714910160","width":2000},{"alt":null,"id":23893121990755,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/74c227678fce01d3df9da3223fa553b615a1d374_cbbb1062-30e8-4323-bffe-6e5d1ee90a47.webp?v=1714910162"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/74c227678fce01d3df9da3223fa553b615a1d374_cbbb1062-30e8-4323-bffe-6e5d1ee90a47.webp?v=1714910162","width":2000},{"alt":null,"id":23893122482275,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3180d64391fe765e896ca4ba59871fa5b768968f_21b437de-f92d-4e5f-b1e5-eac55ec36cfe.webp?v=1714910164"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3180d64391fe765e896ca4ba59871fa5b768968f_21b437de-f92d-4e5f-b1e5-eac55ec36cfe.webp?v=1714910164","width":2000},{"alt":null,"id":23893123104867,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f13e82d7eb4ce45f2c2e10fb6c34981a95880329_0a77495c-3223-48de-8548-e3dfbb4ad2dc.webp?v=1714910167"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f13e82d7eb4ce45f2c2e10fb6c34981a95880329_0a77495c-3223-48de-8548-e3dfbb4ad2dc.webp?v=1714910167","width":2000},{"alt":null,"id":23893123825763,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71f92c34247358ae87d01c35d76fb43d352b4707_900d93d0-cd59-4163-ab9f-ddee86abd5f9.webp?v=1714910169"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71f92c34247358ae87d01c35d76fb43d352b4707_900d93d0-cd59-4163-ab9f-ddee86abd5f9.webp?v=1714910169","width":2000},{"alt":null,"id":23893124350051,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52a935973029fb5d32c909f66e10a7e2c53c9c0d_53c25323-08ef-465b-b844-12724dccf23a.webp?v=1714910172"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52a935973029fb5d32c909f66e10a7e2c53c9c0d_53c25323-08ef-465b-b844-12724dccf23a.webp?v=1714910172","width":2000},{"alt":null,"id":23893124841571,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9553bbb865b075df4643c8502ee87e7a4ad73ecd_b8af09f4-158b-4952-9f45-f053fa7a95c9.webp?v=1714910174"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9553bbb865b075df4643c8502ee87e7a4ad73ecd_b8af09f4-158b-4952-9f45-f053fa7a95c9.webp?v=1714910174","width":2000},{"alt":null,"id":23893125562467,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/840642fb9a908ac03304e8d94c6a9efa7a9494cb_a56fb3b1-8df0-4bb3-93f6-69ed8b0e20be.webp?v=1714910177"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/840642fb9a908ac03304e8d94c6a9efa7a9494cb_a56fb3b1-8df0-4bb3-93f6-69ed8b0e20be.webp?v=1714910177","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41910348906595,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-AF07","requires_shipping":true,"taxable":true,"featured_image":{"id":31487780913251,"product_id":7414958162019,"position":9,"created_at":"2024-05-05T19:56:14+08:00","updated_at":"2024-05-05T19:56:14+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9553bbb865b075df4643c8502ee87e7a4ad73ecd_b8af09f4-158b-4952-9f45-f053fa7a95c9.webp?v=1714910174","variant_ids":[41910348906595]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Look - 人在做 大堡礁在看 - 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-AF07","featured_media":{"alt":null,"id":23893124841571,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9553bbb865b075df4643c8502ee87e7a4ad73ecd_b8af09f4-158b-4952-9f45-f053fa7a95c9.webp?v=1714910174"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41910348906595,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-AF07","requires_shipping":true,"taxable":true,"featured_image":{"id":31487780913251,"product_id":7414958162019,"position":9,"created_at":"2024-05-05T19:56:14+08:00","updated_at":"2024-05-05T19:56:14+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9553bbb865b075df4643c8502ee87e7a4ad73ecd_b8af09f4-158b-4952-9f45-f053fa7a95c9.webp?v=1714910174","variant_ids":[41910348906595]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Look - 人在做 大堡礁在看 - 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-AF07","featured_media":{"alt":null,"id":23893124841571,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9553bbb865b075df4643c8502ee87e7a4ad73ecd_b8af09f4-158b-4952-9f45-f053fa7a95c9.webp?v=1714910174"}},"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: "停產"
}