$product = {"id":7415005282403,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Batman - 蝙蝠俠出任務","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-sb06","description":null,"published_at":"2024-06-11T17:55:25+08:00","created_at":"2024-05-05T20:04:47+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":41910856384611,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-SB06","requires_shipping":true,"taxable":true,"featured_image":{"id":31487901532259,"product_id":7415005282403,"position":1,"created_at":"2024-05-05T20:04:50+08:00","updated_at":"2024-05-05T20:04:50+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/924869d038bd7005eca4b2cdb34d90ae4a74ab03_d0a061a3-cc7f-48a3-b61f-4d7a88431d34.webp?v=1714910690","variant_ids":[41910856384611]},"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-SB06","featured_media":{"alt":null,"id":23893245558883,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/924869d038bd7005eca4b2cdb34d90ae4a74ab03_d0a061a3-cc7f-48a3-b61f-4d7a88431d34.webp?v=1714910690"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/924869d038bd7005eca4b2cdb34d90ae4a74ab03_d0a061a3-cc7f-48a3-b61f-4d7a88431d34.webp?v=1714910690","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fdedace3f2357d349e95dae9c449832ba45f3bda_b2facbcf-526a-497e-9ef5-b820c50c50d4.webp?v=1714910692","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc662dccf36cef67f47621702f4e7bda3bfb251a_df1eb616-1d76-4008-9705-01751ba14ed0.webp?v=1714910695","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0880f654017cd2714ff5f58a0fe6c72477224e91_aa2a0ee0-4120-4a83-adb2-7847b18f2902.webp?v=1714910697","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23cd5480db1951fbac675658c68cd81d8c296352_14338785-89df-4753-9417-3707f69b5bab.webp?v=1714910700","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c1b626a1c9b7e7c357d41fdc1a44f05437760a0_87c203aa-cdd8-4b56-bdc3-665da66ee9ea.webp?v=1714910702","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/823fb780e124b4bfffd46260b3cf534ed17baecb_619ed3bc-3514-4571-87df-07a7f03266b4.webp?v=1714910705","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6bfd1c24053d389bf4d7f6d72fbe846e1e3e1cdf_7c1523bb-43e6-4ccb-a708-db336953f2ce.webp?v=1714910707","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbd02ca628b3aa084b90acd657eebfa40f7bdca5_45fca85f-6047-425e-ad98-f2e9084e7d98.webp?v=1714910710","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5ea833f5e4523c8df91c42c74797b24106f389fe_ae6703b0-76c9-455a-854c-182f16d876fc.webp?v=1714910712"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/924869d038bd7005eca4b2cdb34d90ae4a74ab03_d0a061a3-cc7f-48a3-b61f-4d7a88431d34.webp?v=1714910690","options":["color"],"media":[{"alt":null,"id":23893245558883,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/924869d038bd7005eca4b2cdb34d90ae4a74ab03_d0a061a3-cc7f-48a3-b61f-4d7a88431d34.webp?v=1714910690"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/924869d038bd7005eca4b2cdb34d90ae4a74ab03_d0a061a3-cc7f-48a3-b61f-4d7a88431d34.webp?v=1714910690","width":2000},{"alt":null,"id":23893246312547,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fdedace3f2357d349e95dae9c449832ba45f3bda_b2facbcf-526a-497e-9ef5-b820c50c50d4.webp?v=1714910692"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fdedace3f2357d349e95dae9c449832ba45f3bda_b2facbcf-526a-497e-9ef5-b820c50c50d4.webp?v=1714910692","width":2000},{"alt":null,"id":23893246967907,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc662dccf36cef67f47621702f4e7bda3bfb251a_df1eb616-1d76-4008-9705-01751ba14ed0.webp?v=1714910695"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc662dccf36cef67f47621702f4e7bda3bfb251a_df1eb616-1d76-4008-9705-01751ba14ed0.webp?v=1714910695","width":2000},{"alt":null,"id":23893247557731,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0880f654017cd2714ff5f58a0fe6c72477224e91_aa2a0ee0-4120-4a83-adb2-7847b18f2902.webp?v=1714910697"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0880f654017cd2714ff5f58a0fe6c72477224e91_aa2a0ee0-4120-4a83-adb2-7847b18f2902.webp?v=1714910697","width":2000},{"alt":null,"id":23893248180323,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23cd5480db1951fbac675658c68cd81d8c296352_14338785-89df-4753-9417-3707f69b5bab.webp?v=1714910700"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23cd5480db1951fbac675658c68cd81d8c296352_14338785-89df-4753-9417-3707f69b5bab.webp?v=1714910700","width":2000},{"alt":null,"id":23893248737379,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c1b626a1c9b7e7c357d41fdc1a44f05437760a0_87c203aa-cdd8-4b56-bdc3-665da66ee9ea.webp?v=1714910702"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c1b626a1c9b7e7c357d41fdc1a44f05437760a0_87c203aa-cdd8-4b56-bdc3-665da66ee9ea.webp?v=1714910702","width":2000},{"alt":null,"id":23893249392739,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/823fb780e124b4bfffd46260b3cf534ed17baecb_619ed3bc-3514-4571-87df-07a7f03266b4.webp?v=1714910705"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/823fb780e124b4bfffd46260b3cf534ed17baecb_619ed3bc-3514-4571-87df-07a7f03266b4.webp?v=1714910705","width":2000},{"alt":null,"id":23893249851491,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6bfd1c24053d389bf4d7f6d72fbe846e1e3e1cdf_7c1523bb-43e6-4ccb-a708-db336953f2ce.webp?v=1714910707"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6bfd1c24053d389bf4d7f6d72fbe846e1e3e1cdf_7c1523bb-43e6-4ccb-a708-db336953f2ce.webp?v=1714910707","width":2000},{"alt":null,"id":23893250277475,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbd02ca628b3aa084b90acd657eebfa40f7bdca5_45fca85f-6047-425e-ad98-f2e9084e7d98.webp?v=1714910710"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbd02ca628b3aa084b90acd657eebfa40f7bdca5_45fca85f-6047-425e-ad98-f2e9084e7d98.webp?v=1714910710","width":2000},{"alt":null,"id":23893250801763,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5ea833f5e4523c8df91c42c74797b24106f389fe_ae6703b0-76c9-455a-854c-182f16d876fc.webp?v=1714910712"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5ea833f5e4523c8df91c42c74797b24106f389fe_ae6703b0-76c9-455a-854c-182f16d876fc.webp?v=1714910712","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910856384611,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-SB06","requires_shipping":true,"taxable":true,"featured_image":{"id":31487901532259,"product_id":7415005282403,"position":1,"created_at":"2024-05-05T20:04:50+08:00","updated_at":"2024-05-05T20:04:50+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/924869d038bd7005eca4b2cdb34d90ae4a74ab03_d0a061a3-cc7f-48a3-b61f-4d7a88431d34.webp?v=1714910690","variant_ids":[41910856384611]},"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-SB06","featured_media":{"alt":null,"id":23893245558883,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/924869d038bd7005eca4b2cdb34d90ae4a74ab03_d0a061a3-cc7f-48a3-b61f-4d7a88431d34.webp?v=1714910690"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910856384611,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-SB06","requires_shipping":true,"taxable":true,"featured_image":{"id":31487901532259,"product_id":7415005282403,"position":1,"created_at":"2024-05-05T20:04:50+08:00","updated_at":"2024-05-05T20:04:50+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/924869d038bd7005eca4b2cdb34d90ae4a74ab03_d0a061a3-cc7f-48a3-b61f-4d7a88431d34.webp?v=1714910690","variant_ids":[41910856384611]},"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-SB06","featured_media":{"alt":null,"id":23893245558883,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/924869d038bd7005eca4b2cdb34d90ae4a74ab03_d0a061a3-cc7f-48a3-b61f-4d7a88431d34.webp?v=1714910690"}},"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: "停產" }