$product = {"id":7415032545379,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Batman - 小丑","handle":"iphone-12-mini-mod-nx-magsafe-printable-sb14","description":null,"published_at":"2024-06-11T17:56:09+08:00","created_at":"2024-05-05T20:10:08+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":41911154671715,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-SB14","requires_shipping":true,"taxable":true,"featured_image":{"id":31487983353955,"product_id":7415032545379,"position":8,"created_at":"2024-05-05T20:10:44+08:00","updated_at":"2024-05-05T20:10:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1873796bd260089080f9db9cd7e8f9353840de61_6317cfd9-b26f-49ec-a735-bd9d0067fc25.webp?v=1714911044","variant_ids":[41911154671715]},"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-SB14","featured_media":{"alt":null,"id":23893327675491,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1873796bd260089080f9db9cd7e8f9353840de61_6317cfd9-b26f-49ec-a735-bd9d0067fc25.webp?v=1714911044"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29b2c4ffb2d0457e77e9b2ea8bab38bc082a0d70_b1c117f7-ecd3-437a-ae23-32ff54cae2c7.webp?v=1714911010","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14ea5440d7c97101321f0e8a6970ea1f26885c59_0316de21-6a47-4943-9649-694d520a33e1.webp?v=1714911013","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/05bbeb01addf7d71a44de2bfd79b699b3264c823_c8c289d9-7b5b-4f9f-a58b-4b6a60044873.webp?v=1714911016","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac12c810bf3691e939c74bc506d6d072b9a59acd_42b83b1e-0915-4641-874c-2854f49eabcf.webp?v=1714911034","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a27c4415931d409dd347a27715e49aab64c032c_e427e463-bceb-41cd-af89-67715e90f9df.webp?v=1714911037","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79e2642a6cfc54b706811ced18601c22ff37c519_79b8b5fc-f5d4-4623-87f7-7f6efc0b1454.webp?v=1714911039","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c6e80d2da3365199261581bd24a9cb3dbe39e10_7aaefe7e-ea04-43b4-b4d9-869ba2284e65.webp?v=1714911042","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1873796bd260089080f9db9cd7e8f9353840de61_6317cfd9-b26f-49ec-a735-bd9d0067fc25.webp?v=1714911044","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9cee206f24d28ce12445bb8ae961951ef7d0129_7b1a83bf-6283-48a5-af5b-99ca5b9bbc02.webp?v=1714911047","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39e0d04c9fe84ebcb137fd342d6fec7d52af5d58_951056fe-6f41-46f0-a51c-a594ec630dc1.webp?v=1714911050","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89dd150004e8ca654027c001f2c68d17072cda7d_d74fffaf-157a-4ed4-b8e7-d8d3813a1ff6.webp?v=1714911052"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29b2c4ffb2d0457e77e9b2ea8bab38bc082a0d70_b1c117f7-ecd3-437a-ae23-32ff54cae2c7.webp?v=1714911010","options":["color"],"media":[{"alt":null,"id":23893321154659,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29b2c4ffb2d0457e77e9b2ea8bab38bc082a0d70_b1c117f7-ecd3-437a-ae23-32ff54cae2c7.webp?v=1714911010"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29b2c4ffb2d0457e77e9b2ea8bab38bc082a0d70_b1c117f7-ecd3-437a-ae23-32ff54cae2c7.webp?v=1714911010","width":2000},{"alt":null,"id":23893321777251,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14ea5440d7c97101321f0e8a6970ea1f26885c59_0316de21-6a47-4943-9649-694d520a33e1.webp?v=1714911013"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14ea5440d7c97101321f0e8a6970ea1f26885c59_0316de21-6a47-4943-9649-694d520a33e1.webp?v=1714911013","width":2000},{"alt":null,"id":23893322694755,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/05bbeb01addf7d71a44de2bfd79b699b3264c823_c8c289d9-7b5b-4f9f-a58b-4b6a60044873.webp?v=1714911016"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/05bbeb01addf7d71a44de2bfd79b699b3264c823_c8c289d9-7b5b-4f9f-a58b-4b6a60044873.webp?v=1714911016","width":2000},{"alt":null,"id":23893325217891,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac12c810bf3691e939c74bc506d6d072b9a59acd_42b83b1e-0915-4641-874c-2854f49eabcf.webp?v=1714911034"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac12c810bf3691e939c74bc506d6d072b9a59acd_42b83b1e-0915-4641-874c-2854f49eabcf.webp?v=1714911034","width":2000},{"alt":null,"id":23893325742179,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a27c4415931d409dd347a27715e49aab64c032c_e427e463-bceb-41cd-af89-67715e90f9df.webp?v=1714911037"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a27c4415931d409dd347a27715e49aab64c032c_e427e463-bceb-41cd-af89-67715e90f9df.webp?v=1714911037","width":2000},{"alt":null,"id":23893326299235,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79e2642a6cfc54b706811ced18601c22ff37c519_79b8b5fc-f5d4-4623-87f7-7f6efc0b1454.webp?v=1714911039"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79e2642a6cfc54b706811ced18601c22ff37c519_79b8b5fc-f5d4-4623-87f7-7f6efc0b1454.webp?v=1714911039","width":2000},{"alt":null,"id":23893327052899,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c6e80d2da3365199261581bd24a9cb3dbe39e10_7aaefe7e-ea04-43b4-b4d9-869ba2284e65.webp?v=1714911042"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c6e80d2da3365199261581bd24a9cb3dbe39e10_7aaefe7e-ea04-43b4-b4d9-869ba2284e65.webp?v=1714911042","width":2000},{"alt":null,"id":23893327675491,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1873796bd260089080f9db9cd7e8f9353840de61_6317cfd9-b26f-49ec-a735-bd9d0067fc25.webp?v=1714911044"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1873796bd260089080f9db9cd7e8f9353840de61_6317cfd9-b26f-49ec-a735-bd9d0067fc25.webp?v=1714911044","width":2000},{"alt":null,"id":23893328232547,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9cee206f24d28ce12445bb8ae961951ef7d0129_7b1a83bf-6283-48a5-af5b-99ca5b9bbc02.webp?v=1714911047"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9cee206f24d28ce12445bb8ae961951ef7d0129_7b1a83bf-6283-48a5-af5b-99ca5b9bbc02.webp?v=1714911047","width":2000},{"alt":null,"id":23893329051747,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39e0d04c9fe84ebcb137fd342d6fec7d52af5d58_951056fe-6f41-46f0-a51c-a594ec630dc1.webp?v=1714911050"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39e0d04c9fe84ebcb137fd342d6fec7d52af5d58_951056fe-6f41-46f0-a51c-a594ec630dc1.webp?v=1714911050","width":2000},{"alt":null,"id":23893329444963,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89dd150004e8ca654027c001f2c68d17072cda7d_d74fffaf-157a-4ed4-b8e7-d8d3813a1ff6.webp?v=1714911052"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89dd150004e8ca654027c001f2c68d17072cda7d_d74fffaf-157a-4ed4-b8e7-d8d3813a1ff6.webp?v=1714911052","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911154671715,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-SB14","requires_shipping":true,"taxable":true,"featured_image":{"id":31487983353955,"product_id":7415032545379,"position":8,"created_at":"2024-05-05T20:10:44+08:00","updated_at":"2024-05-05T20:10:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1873796bd260089080f9db9cd7e8f9353840de61_6317cfd9-b26f-49ec-a735-bd9d0067fc25.webp?v=1714911044","variant_ids":[41911154671715]},"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-SB14","featured_media":{"alt":null,"id":23893327675491,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1873796bd260089080f9db9cd7e8f9353840de61_6317cfd9-b26f-49ec-a735-bd9d0067fc25.webp?v=1714911044"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911154671715,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-SB14","requires_shipping":true,"taxable":true,"featured_image":{"id":31487983353955,"product_id":7415032545379,"position":8,"created_at":"2024-05-05T20:10:44+08:00","updated_at":"2024-05-05T20:10:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1873796bd260089080f9db9cd7e8f9353840de61_6317cfd9-b26f-49ec-a735-bd9d0067fc25.webp?v=1714911044","variant_ids":[41911154671715]},"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-SB14","featured_media":{"alt":null,"id":23893327675491,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1873796bd260089080f9db9cd7e8f9353840de61_6317cfd9-b26f-49ec-a735-bd9d0067fc25.webp?v=1714911044"}},"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: "停產" }