$product = {"id":7415030153315,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Batman - Logo貼紙款","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-sb04","description":null,"published_at":"2024-06-11T17:56:05+08:00","created_at":"2024-05-05T20:09:38+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區Batman","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-batman","device-iPhone 12 pro max","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-batman","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":41911119413347,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-SB04","requires_shipping":true,"taxable":true,"featured_image":{"id":31487969722467,"product_id":7415030153315,"position":1,"created_at":"2024-05-05T20:09:41+08:00","updated_at":"2024-05-05T20:09:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/73f0968af6a7fb12342999feeb8a072506f8b4d1_3473146c-48fd-458b-98f9-c672fceb6a79.webp?v=1714910981","variant_ids":[41911119413347]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Batman - Logo貼紙款 - 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-SB04","featured_media":{"alt":null,"id":23893314011235,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/73f0968af6a7fb12342999feeb8a072506f8b4d1_3473146c-48fd-458b-98f9-c672fceb6a79.webp?v=1714910981"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/73f0968af6a7fb12342999feeb8a072506f8b4d1_3473146c-48fd-458b-98f9-c672fceb6a79.webp?v=1714910981","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c56e4c86592359a692cf2d2f43add3b3d1addf63_d59c7daa-6f7e-4e34-9e13-a085aa055bc2.webp?v=1714910984","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b67b67106d1ba0fcd3dae2d14972174f063c89e_2f49cfcc-0940-4a92-8938-992fce48d967.webp?v=1714910986","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffe4983837dd05fe2f8a81e749469a3d938f6634_6d909467-1c91-4518-a57d-deb58df54ed2.webp?v=1714910989","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ed5cb7b71fff0b7a272e2df235d053cdb2446a47_b8983ab0-a4ff-49f3-b813-70db7fb9d2cf.webp?v=1714910992","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1454c48dfcf970443d26a04bc99387dfe3753afe_a5cedd54-e507-4d51-a784-2a7d8692dfee.webp?v=1714910994","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b6e30d86070dbf9757ffcfe8549cd416830878c_ee6c772a-8844-4373-9996-1996cbace559.webp?v=1714910997","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87585c3fd6837849d2f55ddbf503c899b2451df6_29b2afeb-7bd7-4c3b-8bee-f9cca33611de.webp?v=1714911000","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a0a66f95bf1e8b67b404b3d34693938b977c63c_efa1ad2a-cc4f-4405-87f5-0b2144e6ff71.webp?v=1714911002","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f67dc88390a264329aeb1d8693228ee4e345938a_11f2b267-59a7-4e53-a921-a35cee8006aa.webp?v=1714911005"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/73f0968af6a7fb12342999feeb8a072506f8b4d1_3473146c-48fd-458b-98f9-c672fceb6a79.webp?v=1714910981","options":["color"],"media":[{"alt":null,"id":23893314011235,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/73f0968af6a7fb12342999feeb8a072506f8b4d1_3473146c-48fd-458b-98f9-c672fceb6a79.webp?v=1714910981"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/73f0968af6a7fb12342999feeb8a072506f8b4d1_3473146c-48fd-458b-98f9-c672fceb6a79.webp?v=1714910981","width":2000},{"alt":null,"id":23893314633827,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c56e4c86592359a692cf2d2f43add3b3d1addf63_d59c7daa-6f7e-4e34-9e13-a085aa055bc2.webp?v=1714910984"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c56e4c86592359a692cf2d2f43add3b3d1addf63_d59c7daa-6f7e-4e34-9e13-a085aa055bc2.webp?v=1714910984","width":2000},{"alt":null,"id":23893315518563,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b67b67106d1ba0fcd3dae2d14972174f063c89e_2f49cfcc-0940-4a92-8938-992fce48d967.webp?v=1714910986"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b67b67106d1ba0fcd3dae2d14972174f063c89e_2f49cfcc-0940-4a92-8938-992fce48d967.webp?v=1714910986","width":2000},{"alt":null,"id":23893316010083,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffe4983837dd05fe2f8a81e749469a3d938f6634_6d909467-1c91-4518-a57d-deb58df54ed2.webp?v=1714910989"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffe4983837dd05fe2f8a81e749469a3d938f6634_6d909467-1c91-4518-a57d-deb58df54ed2.webp?v=1714910989","width":2000},{"alt":null,"id":23893316730979,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ed5cb7b71fff0b7a272e2df235d053cdb2446a47_b8983ab0-a4ff-49f3-b813-70db7fb9d2cf.webp?v=1714910992"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ed5cb7b71fff0b7a272e2df235d053cdb2446a47_b8983ab0-a4ff-49f3-b813-70db7fb9d2cf.webp?v=1714910992","width":2000},{"alt":null,"id":23893317451875,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1454c48dfcf970443d26a04bc99387dfe3753afe_a5cedd54-e507-4d51-a784-2a7d8692dfee.webp?v=1714910994"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1454c48dfcf970443d26a04bc99387dfe3753afe_a5cedd54-e507-4d51-a784-2a7d8692dfee.webp?v=1714910994","width":2000},{"alt":null,"id":23893317976163,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b6e30d86070dbf9757ffcfe8549cd416830878c_ee6c772a-8844-4373-9996-1996cbace559.webp?v=1714910997"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b6e30d86070dbf9757ffcfe8549cd416830878c_ee6c772a-8844-4373-9996-1996cbace559.webp?v=1714910997","width":2000},{"alt":null,"id":23893318860899,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87585c3fd6837849d2f55ddbf503c899b2451df6_29b2afeb-7bd7-4c3b-8bee-f9cca33611de.webp?v=1714911000"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87585c3fd6837849d2f55ddbf503c899b2451df6_29b2afeb-7bd7-4c3b-8bee-f9cca33611de.webp?v=1714911000","width":2000},{"alt":null,"id":23893319417955,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a0a66f95bf1e8b67b404b3d34693938b977c63c_efa1ad2a-cc4f-4405-87f5-0b2144e6ff71.webp?v=1714911002"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a0a66f95bf1e8b67b404b3d34693938b977c63c_efa1ad2a-cc4f-4405-87f5-0b2144e6ff71.webp?v=1714911002","width":2000},{"alt":null,"id":23893320269923,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f67dc88390a264329aeb1d8693228ee4e345938a_11f2b267-59a7-4e53-a921-a35cee8006aa.webp?v=1714911005"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f67dc88390a264329aeb1d8693228ee4e345938a_11f2b267-59a7-4e53-a921-a35cee8006aa.webp?v=1714911005","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41911119413347,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-SB04","requires_shipping":true,"taxable":true,"featured_image":{"id":31487969722467,"product_id":7415030153315,"position":1,"created_at":"2024-05-05T20:09:41+08:00","updated_at":"2024-05-05T20:09:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/73f0968af6a7fb12342999feeb8a072506f8b4d1_3473146c-48fd-458b-98f9-c672fceb6a79.webp?v=1714910981","variant_ids":[41911119413347]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Batman - Logo貼紙款 - 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-SB04","featured_media":{"alt":null,"id":23893314011235,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/73f0968af6a7fb12342999feeb8a072506f8b4d1_3473146c-48fd-458b-98f9-c672fceb6a79.webp?v=1714910981"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41911119413347,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-SB04","requires_shipping":true,"taxable":true,"featured_image":{"id":31487969722467,"product_id":7415030153315,"position":1,"created_at":"2024-05-05T20:09:41+08:00","updated_at":"2024-05-05T20:09:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/73f0968af6a7fb12342999feeb8a072506f8b4d1_3473146c-48fd-458b-98f9-c672fceb6a79.webp?v=1714910981","variant_ids":[41911119413347]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Batman - Logo貼紙款 - 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-SB04","featured_media":{"alt":null,"id":23893314011235,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/73f0968af6a7fb12342999feeb8a072506f8b4d1_3473146c-48fd-458b-98f9-c672fceb6a79.webp?v=1714910981"}},"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: "停產"
}