$product = {"id":7415058006115,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Batman - Logo","handle":"iphone-12-mini-mod-nx-magsafe-printable-sb16","description":null,"published_at":"2024-06-11T17:56:50+08:00","created_at":"2024-05-05T20:14:42+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":41911418519651,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-SB16","requires_shipping":true,"taxable":true,"featured_image":{"id":31488044630115,"product_id":7415058006115,"position":9,"created_at":"2024-05-05T20:15:05+08:00","updated_at":"2024-05-05T20:15:05+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87a773353634e24b2ea08fccbb9a85f5c8e6c6f4_b4d896f0-6518-4271-b446-9e8a25889acb.webp?v=1714911305","variant_ids":[41911418519651]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 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":"MPB0118424-SB16","featured_media":{"alt":null,"id":23893389082723,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87a773353634e24b2ea08fccbb9a85f5c8e6c6f4_b4d896f0-6518-4271-b446-9e8a25889acb.webp?v=1714911305"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe2a9ea6cfb8790feb67e0d624b135e90fa9ce49_b90d4b80-9739-43b0-bb11-16d615ab084f.webp?v=1714911285","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc6eb2ac52a20dc8e7e069c0dc38ca40d4ca3fab_a4ea2a1f-3a8f-4cac-aaef-4ea429494824.webp?v=1714911288","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86255f905f0c91ceef698cce89fc034a5d2dbc7b_2969da65-6719-47b4-9c70-3bd1e64e0919.webp?v=1714911290","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/370cef5cf6aa2184f658c08cc1c1a254e48fdfed_2ee34f2f-9261-438e-a556-cb9300401786.webp?v=1714911293","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e3f3e7d39de638c48a744049163daf95ed26c075_3081b3a7-ead9-49b9-88cd-df3be629b8a7.webp?v=1714911295","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dff410e41d532fadd8ac116e593be3b3d30aec30_f63987f9-b1bf-4346-bda9-9c2342b68889.webp?v=1714911298","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1702bbef9fcaa8931639320d7670edbb9d4fef29_3203c901-394d-40e7-b57d-7a38f2dd2fc5.webp?v=1714911300","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/943a15cd3334ce85b5c509cb80925437b702487e_8bccbba8-98a3-4c69-bdb6-6066d5d07fac.webp?v=1714911302","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87a773353634e24b2ea08fccbb9a85f5c8e6c6f4_b4d896f0-6518-4271-b446-9e8a25889acb.webp?v=1714911305","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2a1899bc2c15da31853a7fa69f0d25c86081c9f_42d8b464-3fc9-4dba-b009-59248b9e53c5.webp?v=1714911308","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db10b07e964114f2aff82ddea197969cd1dc1ce3_9cea68ac-c98f-445a-a1e0-23c637b87a68.webp?v=1714911310"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe2a9ea6cfb8790feb67e0d624b135e90fa9ce49_b90d4b80-9739-43b0-bb11-16d615ab084f.webp?v=1714911285","options":["color"],"media":[{"alt":null,"id":23893383774307,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe2a9ea6cfb8790feb67e0d624b135e90fa9ce49_b90d4b80-9739-43b0-bb11-16d615ab084f.webp?v=1714911285"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe2a9ea6cfb8790feb67e0d624b135e90fa9ce49_b90d4b80-9739-43b0-bb11-16d615ab084f.webp?v=1714911285","width":2000},{"alt":null,"id":23893384855651,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc6eb2ac52a20dc8e7e069c0dc38ca40d4ca3fab_a4ea2a1f-3a8f-4cac-aaef-4ea429494824.webp?v=1714911288"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc6eb2ac52a20dc8e7e069c0dc38ca40d4ca3fab_a4ea2a1f-3a8f-4cac-aaef-4ea429494824.webp?v=1714911288","width":2000},{"alt":null,"id":23893385281635,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86255f905f0c91ceef698cce89fc034a5d2dbc7b_2969da65-6719-47b4-9c70-3bd1e64e0919.webp?v=1714911290"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86255f905f0c91ceef698cce89fc034a5d2dbc7b_2969da65-6719-47b4-9c70-3bd1e64e0919.webp?v=1714911290","width":2000},{"alt":null,"id":23893386068067,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/370cef5cf6aa2184f658c08cc1c1a254e48fdfed_2ee34f2f-9261-438e-a556-cb9300401786.webp?v=1714911293"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/370cef5cf6aa2184f658c08cc1c1a254e48fdfed_2ee34f2f-9261-438e-a556-cb9300401786.webp?v=1714911293","width":2000},{"alt":null,"id":23893386428515,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e3f3e7d39de638c48a744049163daf95ed26c075_3081b3a7-ead9-49b9-88cd-df3be629b8a7.webp?v=1714911295"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e3f3e7d39de638c48a744049163daf95ed26c075_3081b3a7-ead9-49b9-88cd-df3be629b8a7.webp?v=1714911295","width":2000},{"alt":null,"id":23893387149411,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dff410e41d532fadd8ac116e593be3b3d30aec30_f63987f9-b1bf-4346-bda9-9c2342b68889.webp?v=1714911298"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dff410e41d532fadd8ac116e593be3b3d30aec30_f63987f9-b1bf-4346-bda9-9c2342b68889.webp?v=1714911298","width":2000},{"alt":null,"id":23893387706467,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1702bbef9fcaa8931639320d7670edbb9d4fef29_3203c901-394d-40e7-b57d-7a38f2dd2fc5.webp?v=1714911300"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1702bbef9fcaa8931639320d7670edbb9d4fef29_3203c901-394d-40e7-b57d-7a38f2dd2fc5.webp?v=1714911300","width":2000},{"alt":null,"id":23893388132451,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/943a15cd3334ce85b5c509cb80925437b702487e_8bccbba8-98a3-4c69-bdb6-6066d5d07fac.webp?v=1714911302"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/943a15cd3334ce85b5c509cb80925437b702487e_8bccbba8-98a3-4c69-bdb6-6066d5d07fac.webp?v=1714911302","width":2000},{"alt":null,"id":23893389082723,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87a773353634e24b2ea08fccbb9a85f5c8e6c6f4_b4d896f0-6518-4271-b446-9e8a25889acb.webp?v=1714911305"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87a773353634e24b2ea08fccbb9a85f5c8e6c6f4_b4d896f0-6518-4271-b446-9e8a25889acb.webp?v=1714911305","width":2000},{"alt":null,"id":23893389869155,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2a1899bc2c15da31853a7fa69f0d25c86081c9f_42d8b464-3fc9-4dba-b009-59248b9e53c5.webp?v=1714911308"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2a1899bc2c15da31853a7fa69f0d25c86081c9f_42d8b464-3fc9-4dba-b009-59248b9e53c5.webp?v=1714911308","width":2000},{"alt":null,"id":23893390262371,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db10b07e964114f2aff82ddea197969cd1dc1ce3_9cea68ac-c98f-445a-a1e0-23c637b87a68.webp?v=1714911310"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db10b07e964114f2aff82ddea197969cd1dc1ce3_9cea68ac-c98f-445a-a1e0-23c637b87a68.webp?v=1714911310","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911418519651,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-SB16","requires_shipping":true,"taxable":true,"featured_image":{"id":31488044630115,"product_id":7415058006115,"position":9,"created_at":"2024-05-05T20:15:05+08:00","updated_at":"2024-05-05T20:15:05+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87a773353634e24b2ea08fccbb9a85f5c8e6c6f4_b4d896f0-6518-4271-b446-9e8a25889acb.webp?v=1714911305","variant_ids":[41911418519651]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 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":"MPB0118424-SB16","featured_media":{"alt":null,"id":23893389082723,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87a773353634e24b2ea08fccbb9a85f5c8e6c6f4_b4d896f0-6518-4271-b446-9e8a25889acb.webp?v=1714911305"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911418519651,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-SB16","requires_shipping":true,"taxable":true,"featured_image":{"id":31488044630115,"product_id":7415058006115,"position":9,"created_at":"2024-05-05T20:15:05+08:00","updated_at":"2024-05-05T20:15:05+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87a773353634e24b2ea08fccbb9a85f5c8e6c6f4_b4d896f0-6518-4271-b446-9e8a25889acb.webp?v=1714911305","variant_ids":[41911418519651]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 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":"MPB0118424-SB16","featured_media":{"alt":null,"id":23893389082723,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87a773353634e24b2ea08fccbb9a85f5c8e6c6f4_b4d896f0-6518-4271-b446-9e8a25889acb.webp?v=1714911305"}},"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: "停產" }