$product = {"id":7415069474915,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Batman - Batman Logo","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-sb03","description":null,"published_at":"2024-06-11T17:57:09+08:00","created_at":"2024-05-05T20:16:56+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":41911543595107,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-SB03","requires_shipping":true,"taxable":true,"featured_image":{"id":31488074186851,"product_id":7415069474915,"position":2,"created_at":"2024-05-05T20:17:01+08:00","updated_at":"2024-05-05T20:17:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f22ba8ebacecc2b09e4ac76d9fcca4a1252f87dc_7b3f5e43-59fb-4eae-97cc-faae6a7da9a2.webp?v=1714911421","variant_ids":[41911543595107]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Batman - 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":"MPB0118724-SB03","featured_media":{"alt":null,"id":23893418573923,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f22ba8ebacecc2b09e4ac76d9fcca4a1252f87dc_7b3f5e43-59fb-4eae-97cc-faae6a7da9a2.webp?v=1714911421"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86d09bfcfb93453c3a92e3fd1290b51c4f976ecb_ca833909-c250-41d6-8a99-98144d9500be.webp?v=1714911419","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f22ba8ebacecc2b09e4ac76d9fcca4a1252f87dc_7b3f5e43-59fb-4eae-97cc-faae6a7da9a2.webp?v=1714911421","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3fe7737a9f9dedbcde0344e51cf06a4daddd049e_baad76e8-2cbc-4a4f-88c6-5e04516788a0.webp?v=1714911424","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a7c63a8d132eaf8f73479d41fc3692277146eeb7_6cdfafe0-0d7a-43ef-8317-b5ffc289fc07.webp?v=1714911426","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b9d95da45675c0e245eb19ae92033c183c7ef7d_cbb78366-365d-48fd-94d2-13e72332eec7.webp?v=1714911429","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10893344a007173ac45dd9b0d1b51ea1bd5f0bcf_7c659db5-88aa-4fd4-95a8-423a60fbe9e6.webp?v=1714911431","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c31128b970540cf7fcb5efeba200c1f1e6094439_423960fa-d02e-402a-9aa0-5cf7bcb960a0.webp?v=1714911434","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36fc72fbc1510d9b5e86de0e3b7c264b2b94b3bc_23b142cf-8255-4c13-a511-fa746d74b663.webp?v=1714911436","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a9a06de1357e625d7cc1ac6119d700520a0b32d_5ebeedbe-57e6-48c1-8941-6bbd6ba66452.webp?v=1714911438","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1aaedc862fc284a6ee455999935c656cc78385a6_4d49bc4c-c2fb-4cd9-abf1-039661de1f20.webp?v=1714911440"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86d09bfcfb93453c3a92e3fd1290b51c4f976ecb_ca833909-c250-41d6-8a99-98144d9500be.webp?v=1714911419","options":["color"],"media":[{"alt":null,"id":23893417820259,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86d09bfcfb93453c3a92e3fd1290b51c4f976ecb_ca833909-c250-41d6-8a99-98144d9500be.webp?v=1714911419"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86d09bfcfb93453c3a92e3fd1290b51c4f976ecb_ca833909-c250-41d6-8a99-98144d9500be.webp?v=1714911419","width":2000},{"alt":null,"id":23893418573923,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f22ba8ebacecc2b09e4ac76d9fcca4a1252f87dc_7b3f5e43-59fb-4eae-97cc-faae6a7da9a2.webp?v=1714911421"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f22ba8ebacecc2b09e4ac76d9fcca4a1252f87dc_7b3f5e43-59fb-4eae-97cc-faae6a7da9a2.webp?v=1714911421","width":2000},{"alt":null,"id":23893419032675,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3fe7737a9f9dedbcde0344e51cf06a4daddd049e_baad76e8-2cbc-4a4f-88c6-5e04516788a0.webp?v=1714911424"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3fe7737a9f9dedbcde0344e51cf06a4daddd049e_baad76e8-2cbc-4a4f-88c6-5e04516788a0.webp?v=1714911424","width":2000},{"alt":null,"id":23893419622499,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a7c63a8d132eaf8f73479d41fc3692277146eeb7_6cdfafe0-0d7a-43ef-8317-b5ffc289fc07.webp?v=1714911426"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a7c63a8d132eaf8f73479d41fc3692277146eeb7_6cdfafe0-0d7a-43ef-8317-b5ffc289fc07.webp?v=1714911426","width":2000},{"alt":null,"id":23893420474467,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b9d95da45675c0e245eb19ae92033c183c7ef7d_cbb78366-365d-48fd-94d2-13e72332eec7.webp?v=1714911429"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b9d95da45675c0e245eb19ae92033c183c7ef7d_cbb78366-365d-48fd-94d2-13e72332eec7.webp?v=1714911429","width":2000},{"alt":null,"id":23893421359203,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10893344a007173ac45dd9b0d1b51ea1bd5f0bcf_7c659db5-88aa-4fd4-95a8-423a60fbe9e6.webp?v=1714911431"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10893344a007173ac45dd9b0d1b51ea1bd5f0bcf_7c659db5-88aa-4fd4-95a8-423a60fbe9e6.webp?v=1714911431","width":2000},{"alt":null,"id":23893421817955,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c31128b970540cf7fcb5efeba200c1f1e6094439_423960fa-d02e-402a-9aa0-5cf7bcb960a0.webp?v=1714911434"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c31128b970540cf7fcb5efeba200c1f1e6094439_423960fa-d02e-402a-9aa0-5cf7bcb960a0.webp?v=1714911434","width":2000},{"alt":null,"id":23893422440547,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36fc72fbc1510d9b5e86de0e3b7c264b2b94b3bc_23b142cf-8255-4c13-a511-fa746d74b663.webp?v=1714911436"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36fc72fbc1510d9b5e86de0e3b7c264b2b94b3bc_23b142cf-8255-4c13-a511-fa746d74b663.webp?v=1714911436","width":2000},{"alt":null,"id":23893422964835,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a9a06de1357e625d7cc1ac6119d700520a0b32d_5ebeedbe-57e6-48c1-8941-6bbd6ba66452.webp?v=1714911438"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a9a06de1357e625d7cc1ac6119d700520a0b32d_5ebeedbe-57e6-48c1-8941-6bbd6ba66452.webp?v=1714911438","width":2000},{"alt":null,"id":23893423554659,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1aaedc862fc284a6ee455999935c656cc78385a6_4d49bc4c-c2fb-4cd9-abf1-039661de1f20.webp?v=1714911440"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1aaedc862fc284a6ee455999935c656cc78385a6_4d49bc4c-c2fb-4cd9-abf1-039661de1f20.webp?v=1714911440","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911543595107,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-SB03","requires_shipping":true,"taxable":true,"featured_image":{"id":31488074186851,"product_id":7415069474915,"position":2,"created_at":"2024-05-05T20:17:01+08:00","updated_at":"2024-05-05T20:17:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f22ba8ebacecc2b09e4ac76d9fcca4a1252f87dc_7b3f5e43-59fb-4eae-97cc-faae6a7da9a2.webp?v=1714911421","variant_ids":[41911543595107]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Batman - 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":"MPB0118724-SB03","featured_media":{"alt":null,"id":23893418573923,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f22ba8ebacecc2b09e4ac76d9fcca4a1252f87dc_7b3f5e43-59fb-4eae-97cc-faae6a7da9a2.webp?v=1714911421"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911543595107,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-SB03","requires_shipping":true,"taxable":true,"featured_image":{"id":31488074186851,"product_id":7415069474915,"position":2,"created_at":"2024-05-05T20:17:01+08:00","updated_at":"2024-05-05T20:17:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f22ba8ebacecc2b09e4ac76d9fcca4a1252f87dc_7b3f5e43-59fb-4eae-97cc-faae6a7da9a2.webp?v=1714911421","variant_ids":[41911543595107]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Batman - 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":"MPB0118724-SB03","featured_media":{"alt":null,"id":23893418573923,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f22ba8ebacecc2b09e4ac76d9fcca4a1252f87dc_7b3f5e43-59fb-4eae-97cc-faae6a7da9a2.webp?v=1714911421"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; $device_handle = null; $brand_handle = null; $type = ""; var sellingStatus // 只有設計款(SKU 含 '-')才需要合圖 if ($isMerge && $defaultVariant.sku.includes('-')) { $(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: "停產" }