$product = {"id":7414939353187,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Batman - 高譚守護者","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-sb20","description":null,"published_at":"2024-06-11T17:53:37+08:00","created_at":"2024-05-05T19:52:34+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":41910145843299,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-SB20","requires_shipping":true,"taxable":true,"featured_image":{"id":31487731368035,"product_id":7414939353187,"position":3,"created_at":"2024-05-05T19:52:41+08:00","updated_at":"2024-05-05T19:52:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9560a0c87c2c10756c8b3d8f9aef0cfe3c88995d_4d7556ef-fed6-4150-8465-2b54fc77753f.webp?v=1714909961","variant_ids":[41910145843299]},"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-SB20","featured_media":{"alt":null,"id":23893075296355,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9560a0c87c2c10756c8b3d8f9aef0cfe3c88995d_4d7556ef-fed6-4150-8465-2b54fc77753f.webp?v=1714909961"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71723268d59e6ed530e6620e32623f221d66f0a0_e3647183-7f2f-4cac-ad97-c8ae13251547.webp?v=1714909957","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ce2d62032fd52fe524560e71b7fb3e917e0de1e6_e6dedc52-8d35-4f71-8055-82e52106403e.webp?v=1714909959","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9560a0c87c2c10756c8b3d8f9aef0cfe3c88995d_4d7556ef-fed6-4150-8465-2b54fc77753f.webp?v=1714909961","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77ae8608aace8aee020036507b691e6a8bbc7e0d_fa195167-84cd-41bf-aa5d-60b24c052e50.webp?v=1714909964","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab1019937c50cbf8e4d70c604c7097c5bead869d_1e2fe44b-7bba-4807-b197-4477562a7492.webp?v=1714909966","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5bc60e6980ab89f28e70b7cbb355ad61c58b93dc_d4c4a8a3-7613-47cb-b484-f6edc852b6dd.webp?v=1714909968","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9da7dd614643fb1694b25d054956e79dc9c7a521_4d9108aa-81a7-47cd-b658-8ae07d40085a.webp?v=1714909971","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23c35109f3dab03c50f2f3fed9680715acc64bf7_398bfd8b-658b-487a-8a34-cdda014a5479.webp?v=1714909973","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/034551fc498008716b5624371a46cd1490008d45_9ee24882-674d-41ee-8ab9-6ae4768cbd40.webp?v=1714909975","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0a7212ee763413b15504321db1470256911f9e1_0b1a41b0-b87d-4054-a994-7703bcfbb4c5.webp?v=1714909977"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71723268d59e6ed530e6620e32623f221d66f0a0_e3647183-7f2f-4cac-ad97-c8ae13251547.webp?v=1714909957","options":["color"],"media":[{"alt":null,"id":23893074280547,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71723268d59e6ed530e6620e32623f221d66f0a0_e3647183-7f2f-4cac-ad97-c8ae13251547.webp?v=1714909957"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71723268d59e6ed530e6620e32623f221d66f0a0_e3647183-7f2f-4cac-ad97-c8ae13251547.webp?v=1714909957","width":2000},{"alt":null,"id":23893074804835,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ce2d62032fd52fe524560e71b7fb3e917e0de1e6_e6dedc52-8d35-4f71-8055-82e52106403e.webp?v=1714909959"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ce2d62032fd52fe524560e71b7fb3e917e0de1e6_e6dedc52-8d35-4f71-8055-82e52106403e.webp?v=1714909959","width":2000},{"alt":null,"id":23893075296355,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9560a0c87c2c10756c8b3d8f9aef0cfe3c88995d_4d7556ef-fed6-4150-8465-2b54fc77753f.webp?v=1714909961"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9560a0c87c2c10756c8b3d8f9aef0cfe3c88995d_4d7556ef-fed6-4150-8465-2b54fc77753f.webp?v=1714909961","width":2000},{"alt":null,"id":23893075853411,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77ae8608aace8aee020036507b691e6a8bbc7e0d_fa195167-84cd-41bf-aa5d-60b24c052e50.webp?v=1714909964"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77ae8608aace8aee020036507b691e6a8bbc7e0d_fa195167-84cd-41bf-aa5d-60b24c052e50.webp?v=1714909964","width":2000},{"alt":null,"id":23893076344931,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab1019937c50cbf8e4d70c604c7097c5bead869d_1e2fe44b-7bba-4807-b197-4477562a7492.webp?v=1714909966"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab1019937c50cbf8e4d70c604c7097c5bead869d_1e2fe44b-7bba-4807-b197-4477562a7492.webp?v=1714909966","width":2000},{"alt":null,"id":23893077229667,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5bc60e6980ab89f28e70b7cbb355ad61c58b93dc_d4c4a8a3-7613-47cb-b484-f6edc852b6dd.webp?v=1714909968"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5bc60e6980ab89f28e70b7cbb355ad61c58b93dc_d4c4a8a3-7613-47cb-b484-f6edc852b6dd.webp?v=1714909968","width":2000},{"alt":null,"id":23893077688419,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9da7dd614643fb1694b25d054956e79dc9c7a521_4d9108aa-81a7-47cd-b658-8ae07d40085a.webp?v=1714909971"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9da7dd614643fb1694b25d054956e79dc9c7a521_4d9108aa-81a7-47cd-b658-8ae07d40085a.webp?v=1714909971","width":2000},{"alt":null,"id":23893078278243,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23c35109f3dab03c50f2f3fed9680715acc64bf7_398bfd8b-658b-487a-8a34-cdda014a5479.webp?v=1714909973"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23c35109f3dab03c50f2f3fed9680715acc64bf7_398bfd8b-658b-487a-8a34-cdda014a5479.webp?v=1714909973","width":2000},{"alt":null,"id":23893078802531,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/034551fc498008716b5624371a46cd1490008d45_9ee24882-674d-41ee-8ab9-6ae4768cbd40.webp?v=1714909975"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/034551fc498008716b5624371a46cd1490008d45_9ee24882-674d-41ee-8ab9-6ae4768cbd40.webp?v=1714909975","width":2000},{"alt":null,"id":23893079162979,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0a7212ee763413b15504321db1470256911f9e1_0b1a41b0-b87d-4054-a994-7703bcfbb4c5.webp?v=1714909977"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0a7212ee763413b15504321db1470256911f9e1_0b1a41b0-b87d-4054-a994-7703bcfbb4c5.webp?v=1714909977","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910145843299,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-SB20","requires_shipping":true,"taxable":true,"featured_image":{"id":31487731368035,"product_id":7414939353187,"position":3,"created_at":"2024-05-05T19:52:41+08:00","updated_at":"2024-05-05T19:52:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9560a0c87c2c10756c8b3d8f9aef0cfe3c88995d_4d7556ef-fed6-4150-8465-2b54fc77753f.webp?v=1714909961","variant_ids":[41910145843299]},"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-SB20","featured_media":{"alt":null,"id":23893075296355,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9560a0c87c2c10756c8b3d8f9aef0cfe3c88995d_4d7556ef-fed6-4150-8465-2b54fc77753f.webp?v=1714909961"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910145843299,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-SB20","requires_shipping":true,"taxable":true,"featured_image":{"id":31487731368035,"product_id":7414939353187,"position":3,"created_at":"2024-05-05T19:52:41+08:00","updated_at":"2024-05-05T19:52:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9560a0c87c2c10756c8b3d8f9aef0cfe3c88995d_4d7556ef-fed6-4150-8465-2b54fc77753f.webp?v=1714909961","variant_ids":[41910145843299]},"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-SB20","featured_media":{"alt":null,"id":23893075296355,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9560a0c87c2c10756c8b3d8f9aef0cfe3c88995d_4d7556ef-fed6-4150-8465-2b54fc77753f.webp?v=1714909961"}},"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: "停產" }