$product = {"id":7415010852963,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Weiweiboy - 可愛大王10週年","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-eo05","description":null,"published_at":"2024-06-11T17:55:34+08:00","created_at":"2024-05-05T20:05:44+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區Weiweiboy","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-weiweiboy","device-iPhone 12 pro max","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-weiweiboy","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":41910912122979,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-EO05","requires_shipping":true,"taxable":true,"featured_image":{"id":31487916834915,"product_id":7415010852963,"position":5,"created_at":"2024-05-05T20:05:57+08:00","updated_at":"2024-05-05T20:05:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1def4ac7ad1de1b5fcd13c6c510e7c12764d8dfb_d75c0d03-7652-4ba5-86a2-6fae171a6cac.webp?v=1714910757","variant_ids":[41910912122979]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Weiweiboy - 可愛大王10週年 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118724-EO05","featured_media":{"alt":null,"id":23893260927075,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1def4ac7ad1de1b5fcd13c6c510e7c12764d8dfb_d75c0d03-7652-4ba5-86a2-6fae171a6cac.webp?v=1714910757"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ed0ea7f61d5c915b4d2c58a7a48610918e74c8dc_4a1f035e-6dad-4a2e-b6b7-9d96ccaab29b.webp?v=1714910747","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9455e93477a4b551c6f6da5ee0fa4fc4d259f944_aec7a2a4-7dd1-4cc4-894f-d840cd9ab16a.webp?v=1714910749","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6f0719adf8d36ea3020e7de49ff9ef9df9aafad_31b40b80-cfbe-4768-b33e-0c52537259cb.webp?v=1714910752","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/061a531d943d4857013c68cfeb0fc835737472a1_203d4dbe-b579-4217-8fed-feada5103d4d.webp?v=1714910754","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1def4ac7ad1de1b5fcd13c6c510e7c12764d8dfb_d75c0d03-7652-4ba5-86a2-6fae171a6cac.webp?v=1714910757","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43f438f91babf471520a9257f1c9549407ca483f_8c3d9c97-c047-4446-90d6-5c33cc154fb9.webp?v=1714910759","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8bc20abe31f7e5f25c975ac1e872d6bcef188275_ea97af63-108b-4517-bc9f-9e467fe7bb78.webp?v=1714910761","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9e10c5509928fb16ee6eb4dba4e4aa5cb41f1f0_3033acf2-8afd-4e65-be3a-00ebc0018183.webp?v=1714910764","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/13e6681839d2395ba39ebf643c59fe59b68c3596_4fce5e68-d412-4c59-95f6-7b6e882d1ca4.webp?v=1714910767","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4fcd6d2b0f148b5a2b8a0ecc2a23a408d037939a_de094eb1-b8dd-4ad3-98a0-aa177a163a6e.webp?v=1714910769","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17f70ae6832ff68fc18bdb2f23608d915410b106_a0247625-d074-40b4-9c87-9e34d2b6a565.webp?v=1714910771"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ed0ea7f61d5c915b4d2c58a7a48610918e74c8dc_4a1f035e-6dad-4a2e-b6b7-9d96ccaab29b.webp?v=1714910747","options":["color"],"media":[{"alt":null,"id":23893258535011,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ed0ea7f61d5c915b4d2c58a7a48610918e74c8dc_4a1f035e-6dad-4a2e-b6b7-9d96ccaab29b.webp?v=1714910747"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ed0ea7f61d5c915b4d2c58a7a48610918e74c8dc_4a1f035e-6dad-4a2e-b6b7-9d96ccaab29b.webp?v=1714910747","width":2000},{"alt":null,"id":23893259026531,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9455e93477a4b551c6f6da5ee0fa4fc4d259f944_aec7a2a4-7dd1-4cc4-894f-d840cd9ab16a.webp?v=1714910749"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9455e93477a4b551c6f6da5ee0fa4fc4d259f944_aec7a2a4-7dd1-4cc4-894f-d840cd9ab16a.webp?v=1714910749","width":2000},{"alt":null,"id":23893259747427,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6f0719adf8d36ea3020e7de49ff9ef9df9aafad_31b40b80-cfbe-4768-b33e-0c52537259cb.webp?v=1714910752"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6f0719adf8d36ea3020e7de49ff9ef9df9aafad_31b40b80-cfbe-4768-b33e-0c52537259cb.webp?v=1714910752","width":2000},{"alt":null,"id":23893260271715,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/061a531d943d4857013c68cfeb0fc835737472a1_203d4dbe-b579-4217-8fed-feada5103d4d.webp?v=1714910754"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/061a531d943d4857013c68cfeb0fc835737472a1_203d4dbe-b579-4217-8fed-feada5103d4d.webp?v=1714910754","width":2000},{"alt":null,"id":23893260927075,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1def4ac7ad1de1b5fcd13c6c510e7c12764d8dfb_d75c0d03-7652-4ba5-86a2-6fae171a6cac.webp?v=1714910757"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1def4ac7ad1de1b5fcd13c6c510e7c12764d8dfb_d75c0d03-7652-4ba5-86a2-6fae171a6cac.webp?v=1714910757","width":2000},{"alt":null,"id":23893261353059,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43f438f91babf471520a9257f1c9549407ca483f_8c3d9c97-c047-4446-90d6-5c33cc154fb9.webp?v=1714910759"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43f438f91babf471520a9257f1c9549407ca483f_8c3d9c97-c047-4446-90d6-5c33cc154fb9.webp?v=1714910759","width":2000},{"alt":null,"id":23893262172259,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8bc20abe31f7e5f25c975ac1e872d6bcef188275_ea97af63-108b-4517-bc9f-9e467fe7bb78.webp?v=1714910761"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8bc20abe31f7e5f25c975ac1e872d6bcef188275_ea97af63-108b-4517-bc9f-9e467fe7bb78.webp?v=1714910761","width":2000},{"alt":null,"id":23893262729315,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9e10c5509928fb16ee6eb4dba4e4aa5cb41f1f0_3033acf2-8afd-4e65-be3a-00ebc0018183.webp?v=1714910764"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9e10c5509928fb16ee6eb4dba4e4aa5cb41f1f0_3033acf2-8afd-4e65-be3a-00ebc0018183.webp?v=1714910764","width":2000},{"alt":null,"id":23893263286371,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/13e6681839d2395ba39ebf643c59fe59b68c3596_4fce5e68-d412-4c59-95f6-7b6e882d1ca4.webp?v=1714910767"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/13e6681839d2395ba39ebf643c59fe59b68c3596_4fce5e68-d412-4c59-95f6-7b6e882d1ca4.webp?v=1714910767","width":2000},{"alt":null,"id":23893263876195,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4fcd6d2b0f148b5a2b8a0ecc2a23a408d037939a_de094eb1-b8dd-4ad3-98a0-aa177a163a6e.webp?v=1714910769"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4fcd6d2b0f148b5a2b8a0ecc2a23a408d037939a_de094eb1-b8dd-4ad3-98a0-aa177a163a6e.webp?v=1714910769","width":2000},{"alt":null,"id":23893264400483,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17f70ae6832ff68fc18bdb2f23608d915410b106_a0247625-d074-40b4-9c87-9e34d2b6a565.webp?v=1714910771"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17f70ae6832ff68fc18bdb2f23608d915410b106_a0247625-d074-40b4-9c87-9e34d2b6a565.webp?v=1714910771","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910912122979,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-EO05","requires_shipping":true,"taxable":true,"featured_image":{"id":31487916834915,"product_id":7415010852963,"position":5,"created_at":"2024-05-05T20:05:57+08:00","updated_at":"2024-05-05T20:05:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1def4ac7ad1de1b5fcd13c6c510e7c12764d8dfb_d75c0d03-7652-4ba5-86a2-6fae171a6cac.webp?v=1714910757","variant_ids":[41910912122979]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Weiweiboy - 可愛大王10週年 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118724-EO05","featured_media":{"alt":null,"id":23893260927075,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1def4ac7ad1de1b5fcd13c6c510e7c12764d8dfb_d75c0d03-7652-4ba5-86a2-6fae171a6cac.webp?v=1714910757"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910912122979,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-EO05","requires_shipping":true,"taxable":true,"featured_image":{"id":31487916834915,"product_id":7415010852963,"position":5,"created_at":"2024-05-05T20:05:57+08:00","updated_at":"2024-05-05T20:05:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1def4ac7ad1de1b5fcd13c6c510e7c12764d8dfb_d75c0d03-7652-4ba5-86a2-6fae171a6cac.webp?v=1714910757","variant_ids":[41910912122979]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Weiweiboy - 可愛大王10週年 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118724-EO05","featured_media":{"alt":null,"id":23893260927075,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1def4ac7ad1de1b5fcd13c6c510e7c12764d8dfb_d75c0d03-7652-4ba5-86a2-6fae171a6cac.webp?v=1714910757"}},"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: "停產" }