$product = {"id":7415005741155,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Batman - 哥譚市","handle":"iphone-12-mini-mod-nx-magsafe-printable-sb19","description":null,"published_at":"2024-06-11T17:55:26+08:00","created_at":"2024-05-05T20:04:53+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 mini","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":41910864871523,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-SB19","requires_shipping":true,"taxable":true,"featured_image":{"id":31487903563875,"product_id":7415005741155,"position":2,"created_at":"2024-05-05T20:04:58+08:00","updated_at":"2024-05-05T20:04:58+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01c09041228fcf4b8d1197ea588111c1c687c1c7_05c6f15d-2519-48b8-b719-170548baf578.webp?v=1714910698","variant_ids":[41910864871523]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 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":"MPB0118424-SB19","featured_media":{"alt":null,"id":23893247656035,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01c09041228fcf4b8d1197ea588111c1c687c1c7_05c6f15d-2519-48b8-b719-170548baf578.webp?v=1714910698"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37c2e5f1db9a647c8b00866d14eddd127e557163_20b564bf-890f-409e-a98d-58e9b26da8a5.webp?v=1714910695","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01c09041228fcf4b8d1197ea588111c1c687c1c7_05c6f15d-2519-48b8-b719-170548baf578.webp?v=1714910698","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ab9b8a0f6118d51247ef8480f50e5940c9110aa_cf917e11-db86-431e-b443-432f609f96e3.webp?v=1714910700","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/295d37fe3a92892ed65b6922155c9f25b542d6b8_9981ffc4-8a44-4c43-a851-e0653b21be7a.webp?v=1714910702","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a04bcb8112694c8d33885e329505edb8852b88f_0071204f-d8b5-4b22-8440-1af006812798.webp?v=1714910705","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fd6c8d970295ed8d40a7d059d0060b87e3f7057_fe7b7b6a-0632-4348-ba2e-67f94468a934.webp?v=1714910708","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9711afbdb01bf881266b36726dfb8b00cb8938b_88ab8650-160d-45fb-b8eb-e027c586c42a.webp?v=1714910711","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cef7bd635a1e2f54b83ab3ceb06b4de13b3fa027_7af79d96-4e30-4a18-ab15-75f395f1646a.webp?v=1714910713","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd9bfeeab2627953b9ab648bdfe6218a64d1b59e_05af284f-1b19-48d9-9044-8d21cae6ff49.webp?v=1714910716","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc88e7ed182136d696eed6119c58d82cc322021b_3ad4645c-d48b-449f-806f-bad34f0ec674.webp?v=1714910718","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8bf299f448aef2c87b79c8b23c6b26475cc57128_51ac8066-3d6e-46f4-a282-96197968e66b.webp?v=1714910721"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37c2e5f1db9a647c8b00866d14eddd127e557163_20b564bf-890f-409e-a98d-58e9b26da8a5.webp?v=1714910695","options":["color"],"media":[{"alt":null,"id":23893247066211,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37c2e5f1db9a647c8b00866d14eddd127e557163_20b564bf-890f-409e-a98d-58e9b26da8a5.webp?v=1714910695"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37c2e5f1db9a647c8b00866d14eddd127e557163_20b564bf-890f-409e-a98d-58e9b26da8a5.webp?v=1714910695","width":2000},{"alt":null,"id":23893247656035,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01c09041228fcf4b8d1197ea588111c1c687c1c7_05c6f15d-2519-48b8-b719-170548baf578.webp?v=1714910698"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01c09041228fcf4b8d1197ea588111c1c687c1c7_05c6f15d-2519-48b8-b719-170548baf578.webp?v=1714910698","width":2000},{"alt":null,"id":23893248376931,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ab9b8a0f6118d51247ef8480f50e5940c9110aa_cf917e11-db86-431e-b443-432f609f96e3.webp?v=1714910700"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ab9b8a0f6118d51247ef8480f50e5940c9110aa_cf917e11-db86-431e-b443-432f609f96e3.webp?v=1714910700","width":2000},{"alt":null,"id":23893248770147,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/295d37fe3a92892ed65b6922155c9f25b542d6b8_9981ffc4-8a44-4c43-a851-e0653b21be7a.webp?v=1714910702"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/295d37fe3a92892ed65b6922155c9f25b542d6b8_9981ffc4-8a44-4c43-a851-e0653b21be7a.webp?v=1714910702","width":2000},{"alt":null,"id":23893249491043,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a04bcb8112694c8d33885e329505edb8852b88f_0071204f-d8b5-4b22-8440-1af006812798.webp?v=1714910705"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a04bcb8112694c8d33885e329505edb8852b88f_0071204f-d8b5-4b22-8440-1af006812798.webp?v=1714910705","width":2000},{"alt":null,"id":23893250080867,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fd6c8d970295ed8d40a7d059d0060b87e3f7057_fe7b7b6a-0632-4348-ba2e-67f94468a934.webp?v=1714910708"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fd6c8d970295ed8d40a7d059d0060b87e3f7057_fe7b7b6a-0632-4348-ba2e-67f94468a934.webp?v=1714910708","width":2000},{"alt":null,"id":23893250605155,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9711afbdb01bf881266b36726dfb8b00cb8938b_88ab8650-160d-45fb-b8eb-e027c586c42a.webp?v=1714910711"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9711afbdb01bf881266b36726dfb8b00cb8938b_88ab8650-160d-45fb-b8eb-e027c586c42a.webp?v=1714910711","width":2000},{"alt":null,"id":23893251391587,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cef7bd635a1e2f54b83ab3ceb06b4de13b3fa027_7af79d96-4e30-4a18-ab15-75f395f1646a.webp?v=1714910713"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cef7bd635a1e2f54b83ab3ceb06b4de13b3fa027_7af79d96-4e30-4a18-ab15-75f395f1646a.webp?v=1714910713","width":2000},{"alt":null,"id":23893251850339,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd9bfeeab2627953b9ab648bdfe6218a64d1b59e_05af284f-1b19-48d9-9044-8d21cae6ff49.webp?v=1714910716"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd9bfeeab2627953b9ab648bdfe6218a64d1b59e_05af284f-1b19-48d9-9044-8d21cae6ff49.webp?v=1714910716","width":2000},{"alt":null,"id":23893252276323,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc88e7ed182136d696eed6119c58d82cc322021b_3ad4645c-d48b-449f-806f-bad34f0ec674.webp?v=1714910718"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc88e7ed182136d696eed6119c58d82cc322021b_3ad4645c-d48b-449f-806f-bad34f0ec674.webp?v=1714910718","width":2000},{"alt":null,"id":23893252767843,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8bf299f448aef2c87b79c8b23c6b26475cc57128_51ac8066-3d6e-46f4-a282-96197968e66b.webp?v=1714910721"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8bf299f448aef2c87b79c8b23c6b26475cc57128_51ac8066-3d6e-46f4-a282-96197968e66b.webp?v=1714910721","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910864871523,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-SB19","requires_shipping":true,"taxable":true,"featured_image":{"id":31487903563875,"product_id":7415005741155,"position":2,"created_at":"2024-05-05T20:04:58+08:00","updated_at":"2024-05-05T20:04:58+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01c09041228fcf4b8d1197ea588111c1c687c1c7_05c6f15d-2519-48b8-b719-170548baf578.webp?v=1714910698","variant_ids":[41910864871523]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 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":"MPB0118424-SB19","featured_media":{"alt":null,"id":23893247656035,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01c09041228fcf4b8d1197ea588111c1c687c1c7_05c6f15d-2519-48b8-b719-170548baf578.webp?v=1714910698"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910864871523,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-SB19","requires_shipping":true,"taxable":true,"featured_image":{"id":31487903563875,"product_id":7415005741155,"position":2,"created_at":"2024-05-05T20:04:58+08:00","updated_at":"2024-05-05T20:04:58+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01c09041228fcf4b8d1197ea588111c1c687c1c7_05c6f15d-2519-48b8-b719-170548baf578.webp?v=1714910698","variant_ids":[41910864871523]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 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":"MPB0118424-SB19","featured_media":{"alt":null,"id":23893247656035,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01c09041228fcf4b8d1197ea588111c1c687c1c7_05c6f15d-2519-48b8-b719-170548baf578.webp?v=1714910698"}},"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: "停產" }