$product = {"id":7415077404771,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Batman - 黑白畫風-小丑","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-sb13","description":null,"published_at":"2024-06-11T17:57:21+08:00","created_at":"2024-05-05T20:18:25+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":41911625056355,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-SB13","requires_shipping":true,"taxable":true,"featured_image":{"id":31488101187683,"product_id":7415077404771,"position":10,"created_at":"2024-05-05T20:18:50+08:00","updated_at":"2024-05-05T20:18:50+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a794245fdf35afaf983e89eef9f0c791f40b4ef7_b64da094-5b9b-49a6-8cd2-e5a74b7d9d52.webp?v=1714911530","variant_ids":[41911625056355]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Batman - 黑白畫風-小丑 - 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-SB13","featured_media":{"alt":null,"id":23893445673059,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a794245fdf35afaf983e89eef9f0c791f40b4ef7_b64da094-5b9b-49a6-8cd2-e5a74b7d9d52.webp?v=1714911530"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85bf2dba9a97defa25f965487029c6362b370fb4_40a6422e-a31b-4c5d-9bec-a02f16afa4e5.webp?v=1714911508","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83393e3e1e0357836ee9b9137e459ba0db722e4e_d95ac80a-32d3-43f0-a5a8-bc5128f28cbe.webp?v=1714911510","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b6153f53231a59d1bd774a434292c513eb2a19c_e9fdd372-704a-46f1-9db3-8fdf9508b5c3.webp?v=1714911513","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ccffed6c495914afcb03e79bb2f3615dad3a1b1_50869bc2-49d3-40b2-b9b3-6af1fbe40052.webp?v=1714911515","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/084991fc47fa07952ab8aecce8839353eea16c49_d932000b-e862-4633-acdb-0a6a066097ff.webp?v=1714911518","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd808588f810ce8c4dd85f598bd44efde198f479_df3123ed-da6b-4dad-a0ce-750d02267066.webp?v=1714911520","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da7f55ef2abe1638305440af4b883ac09858494f_62534acb-4ce2-444d-881e-2322c3ae231f.webp?v=1714911522","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14beda0e876be2f4518c8a38dab6857ae26908c5_50b3ed0b-3c0e-4f46-bd02-9aa726bc7c32.webp?v=1714911525","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5502b3320dd4266a55c5a1f98211bd3f47b7080_f18d08d6-56e5-422b-8467-2454693c6fa9.webp?v=1714911527","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a794245fdf35afaf983e89eef9f0c791f40b4ef7_b64da094-5b9b-49a6-8cd2-e5a74b7d9d52.webp?v=1714911530"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85bf2dba9a97defa25f965487029c6362b370fb4_40a6422e-a31b-4c5d-9bec-a02f16afa4e5.webp?v=1714911508","options":["color"],"media":[{"alt":null,"id":23893439709283,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85bf2dba9a97defa25f965487029c6362b370fb4_40a6422e-a31b-4c5d-9bec-a02f16afa4e5.webp?v=1714911508"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85bf2dba9a97defa25f965487029c6362b370fb4_40a6422e-a31b-4c5d-9bec-a02f16afa4e5.webp?v=1714911508","width":2000},{"alt":null,"id":23893440528483,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83393e3e1e0357836ee9b9137e459ba0db722e4e_d95ac80a-32d3-43f0-a5a8-bc5128f28cbe.webp?v=1714911510"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83393e3e1e0357836ee9b9137e459ba0db722e4e_d95ac80a-32d3-43f0-a5a8-bc5128f28cbe.webp?v=1714911510","width":2000},{"alt":null,"id":23893441282147,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b6153f53231a59d1bd774a434292c513eb2a19c_e9fdd372-704a-46f1-9db3-8fdf9508b5c3.webp?v=1714911513"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b6153f53231a59d1bd774a434292c513eb2a19c_e9fdd372-704a-46f1-9db3-8fdf9508b5c3.webp?v=1714911513","width":2000},{"alt":null,"id":23893441839203,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ccffed6c495914afcb03e79bb2f3615dad3a1b1_50869bc2-49d3-40b2-b9b3-6af1fbe40052.webp?v=1714911515"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ccffed6c495914afcb03e79bb2f3615dad3a1b1_50869bc2-49d3-40b2-b9b3-6af1fbe40052.webp?v=1714911515","width":2000},{"alt":null,"id":23893442330723,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/084991fc47fa07952ab8aecce8839353eea16c49_d932000b-e862-4633-acdb-0a6a066097ff.webp?v=1714911518"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/084991fc47fa07952ab8aecce8839353eea16c49_d932000b-e862-4633-acdb-0a6a066097ff.webp?v=1714911518","width":2000},{"alt":null,"id":23893442986083,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd808588f810ce8c4dd85f598bd44efde198f479_df3123ed-da6b-4dad-a0ce-750d02267066.webp?v=1714911520"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd808588f810ce8c4dd85f598bd44efde198f479_df3123ed-da6b-4dad-a0ce-750d02267066.webp?v=1714911520","width":2000},{"alt":null,"id":23893443641443,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da7f55ef2abe1638305440af4b883ac09858494f_62534acb-4ce2-444d-881e-2322c3ae231f.webp?v=1714911522"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da7f55ef2abe1638305440af4b883ac09858494f_62534acb-4ce2-444d-881e-2322c3ae231f.webp?v=1714911522","width":2000},{"alt":null,"id":23893444460643,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14beda0e876be2f4518c8a38dab6857ae26908c5_50b3ed0b-3c0e-4f46-bd02-9aa726bc7c32.webp?v=1714911525"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14beda0e876be2f4518c8a38dab6857ae26908c5_50b3ed0b-3c0e-4f46-bd02-9aa726bc7c32.webp?v=1714911525","width":2000},{"alt":null,"id":23893445279843,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5502b3320dd4266a55c5a1f98211bd3f47b7080_f18d08d6-56e5-422b-8467-2454693c6fa9.webp?v=1714911527"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5502b3320dd4266a55c5a1f98211bd3f47b7080_f18d08d6-56e5-422b-8467-2454693c6fa9.webp?v=1714911527","width":2000},{"alt":null,"id":23893445673059,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a794245fdf35afaf983e89eef9f0c791f40b4ef7_b64da094-5b9b-49a6-8cd2-e5a74b7d9d52.webp?v=1714911530"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a794245fdf35afaf983e89eef9f0c791f40b4ef7_b64da094-5b9b-49a6-8cd2-e5a74b7d9d52.webp?v=1714911530","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911625056355,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-SB13","requires_shipping":true,"taxable":true,"featured_image":{"id":31488101187683,"product_id":7415077404771,"position":10,"created_at":"2024-05-05T20:18:50+08:00","updated_at":"2024-05-05T20:18:50+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a794245fdf35afaf983e89eef9f0c791f40b4ef7_b64da094-5b9b-49a6-8cd2-e5a74b7d9d52.webp?v=1714911530","variant_ids":[41911625056355]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Batman - 黑白畫風-小丑 - 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-SB13","featured_media":{"alt":null,"id":23893445673059,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a794245fdf35afaf983e89eef9f0c791f40b4ef7_b64da094-5b9b-49a6-8cd2-e5a74b7d9d52.webp?v=1714911530"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911625056355,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-SB13","requires_shipping":true,"taxable":true,"featured_image":{"id":31488101187683,"product_id":7415077404771,"position":10,"created_at":"2024-05-05T20:18:50+08:00","updated_at":"2024-05-05T20:18:50+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a794245fdf35afaf983e89eef9f0c791f40b4ef7_b64da094-5b9b-49a6-8cd2-e5a74b7d9d52.webp?v=1714911530","variant_ids":[41911625056355]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Batman - 黑白畫風-小丑 - 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-SB13","featured_media":{"alt":null,"id":23893445673059,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a794245fdf35afaf983e89eef9f0c791f40b4ef7_b64da094-5b9b-49a6-8cd2-e5a74b7d9d52.webp?v=1714911530"}},"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: "停產" }