$product = {"id":7415106863203,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 1G - 抱一個","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-iv03","description":null,"published_at":"2024-06-11T17:58:08+08:00","created_at":"2024-05-05T20:24:10+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區1G","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-1chun","device-iPhone 12 pro max","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-1chun","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":41911941595235,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-IV03","requires_shipping":true,"taxable":true,"featured_image":{"id":31488178290787,"product_id":7415106863203,"position":2,"created_at":"2024-05-05T20:24:15+08:00","updated_at":"2024-05-05T20:24:15+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e734b63ccc31ac10c743beb6f68448b7c19af3c8_812c80c9-d449-413f-8eeb-e295af8c0d0f.webp?v=1714911855","variant_ids":[41911941595235]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 1G - 抱一個 - 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-IV03","featured_media":{"alt":null,"id":23893522907235,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e734b63ccc31ac10c743beb6f68448b7c19af3c8_812c80c9-d449-413f-8eeb-e295af8c0d0f.webp?v=1714911855"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/379edfb16f3c8b234080d479c2100d2bd5fea27e_f4ebb927-d12a-4a37-9878-5316f786f722.webp?v=1714911852","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e734b63ccc31ac10c743beb6f68448b7c19af3c8_812c80c9-d449-413f-8eeb-e295af8c0d0f.webp?v=1714911855","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b532e527e0c8ad2d8c3ceaea1f902652f4e718a9_43ea7ec2-7c99-45cd-aeb8-2c31f0fb980b.webp?v=1714911857","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/141732298a9b5ccd51e97ce91218c3ca00c1ba97_17c7ccaf-a2fd-4b24-abd2-8c521158cc0c.webp?v=1714911859","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9e5269b0625b0ed1dabd5a92819bf7b81bf652b_111aecad-1a5e-4490-a0ef-ce2b49758d81.webp?v=1714911862","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cef97a6de18348f2aa2cfa19e09e7ddc04565296_8a636d84-6a25-49a3-b665-34e26b4d1a4e.webp?v=1714911864","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/143aaab7ce1b34ac40c3ecacd0554d02764492f9_39a4c1fb-a2d0-4a0c-b7be-b623d1c46719.webp?v=1714911867","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57ec32718150c9304ff97af6b17deace76a3ad74_9e0db35d-e3e1-4db4-bf59-1637d775ac84.webp?v=1714911869","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50fe01fcfc826358e6dba0c72ab365d7e7351b31_1464d0d5-561c-425a-afdd-c2d1acee0870.webp?v=1714911871","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d45c6021dc754e6d75bb720e13f34537fa55ace_7247087b-85a5-4386-b484-4fd95bbde21d.webp?v=1714911873"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/379edfb16f3c8b234080d479c2100d2bd5fea27e_f4ebb927-d12a-4a37-9878-5316f786f722.webp?v=1714911852","options":["color"],"media":[{"alt":null,"id":23893522448483,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/379edfb16f3c8b234080d479c2100d2bd5fea27e_f4ebb927-d12a-4a37-9878-5316f786f722.webp?v=1714911852"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/379edfb16f3c8b234080d479c2100d2bd5fea27e_f4ebb927-d12a-4a37-9878-5316f786f722.webp?v=1714911852","width":2000},{"alt":null,"id":23893522907235,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e734b63ccc31ac10c743beb6f68448b7c19af3c8_812c80c9-d449-413f-8eeb-e295af8c0d0f.webp?v=1714911855"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e734b63ccc31ac10c743beb6f68448b7c19af3c8_812c80c9-d449-413f-8eeb-e295af8c0d0f.webp?v=1714911855","width":2000},{"alt":null,"id":23893523431523,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b532e527e0c8ad2d8c3ceaea1f902652f4e718a9_43ea7ec2-7c99-45cd-aeb8-2c31f0fb980b.webp?v=1714911857"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b532e527e0c8ad2d8c3ceaea1f902652f4e718a9_43ea7ec2-7c99-45cd-aeb8-2c31f0fb980b.webp?v=1714911857","width":2000},{"alt":null,"id":23893523791971,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/141732298a9b5ccd51e97ce91218c3ca00c1ba97_17c7ccaf-a2fd-4b24-abd2-8c521158cc0c.webp?v=1714911859"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/141732298a9b5ccd51e97ce91218c3ca00c1ba97_17c7ccaf-a2fd-4b24-abd2-8c521158cc0c.webp?v=1714911859","width":2000},{"alt":null,"id":23893524381795,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9e5269b0625b0ed1dabd5a92819bf7b81bf652b_111aecad-1a5e-4490-a0ef-ce2b49758d81.webp?v=1714911862"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9e5269b0625b0ed1dabd5a92819bf7b81bf652b_111aecad-1a5e-4490-a0ef-ce2b49758d81.webp?v=1714911862","width":2000},{"alt":null,"id":23893524840547,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cef97a6de18348f2aa2cfa19e09e7ddc04565296_8a636d84-6a25-49a3-b665-34e26b4d1a4e.webp?v=1714911864"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cef97a6de18348f2aa2cfa19e09e7ddc04565296_8a636d84-6a25-49a3-b665-34e26b4d1a4e.webp?v=1714911864","width":2000},{"alt":null,"id":23893525856355,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/143aaab7ce1b34ac40c3ecacd0554d02764492f9_39a4c1fb-a2d0-4a0c-b7be-b623d1c46719.webp?v=1714911867"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/143aaab7ce1b34ac40c3ecacd0554d02764492f9_39a4c1fb-a2d0-4a0c-b7be-b623d1c46719.webp?v=1714911867","width":2000},{"alt":null,"id":23893526184035,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57ec32718150c9304ff97af6b17deace76a3ad74_9e0db35d-e3e1-4db4-bf59-1637d775ac84.webp?v=1714911869"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57ec32718150c9304ff97af6b17deace76a3ad74_9e0db35d-e3e1-4db4-bf59-1637d775ac84.webp?v=1714911869","width":2000},{"alt":null,"id":23893526904931,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50fe01fcfc826358e6dba0c72ab365d7e7351b31_1464d0d5-561c-425a-afdd-c2d1acee0870.webp?v=1714911871"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50fe01fcfc826358e6dba0c72ab365d7e7351b31_1464d0d5-561c-425a-afdd-c2d1acee0870.webp?v=1714911871","width":2000},{"alt":null,"id":23893527298147,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d45c6021dc754e6d75bb720e13f34537fa55ace_7247087b-85a5-4386-b484-4fd95bbde21d.webp?v=1714911873"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d45c6021dc754e6d75bb720e13f34537fa55ace_7247087b-85a5-4386-b484-4fd95bbde21d.webp?v=1714911873","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911941595235,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-IV03","requires_shipping":true,"taxable":true,"featured_image":{"id":31488178290787,"product_id":7415106863203,"position":2,"created_at":"2024-05-05T20:24:15+08:00","updated_at":"2024-05-05T20:24:15+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e734b63ccc31ac10c743beb6f68448b7c19af3c8_812c80c9-d449-413f-8eeb-e295af8c0d0f.webp?v=1714911855","variant_ids":[41911941595235]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 1G - 抱一個 - 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-IV03","featured_media":{"alt":null,"id":23893522907235,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e734b63ccc31ac10c743beb6f68448b7c19af3c8_812c80c9-d449-413f-8eeb-e295af8c0d0f.webp?v=1714911855"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911941595235,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-IV03","requires_shipping":true,"taxable":true,"featured_image":{"id":31488178290787,"product_id":7415106863203,"position":2,"created_at":"2024-05-05T20:24:15+08:00","updated_at":"2024-05-05T20:24:15+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e734b63ccc31ac10c743beb6f68448b7c19af3c8_812c80c9-d449-413f-8eeb-e295af8c0d0f.webp?v=1714911855","variant_ids":[41911941595235]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 1G - 抱一個 - 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-IV03","featured_media":{"alt":null,"id":23893522907235,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e734b63ccc31ac10c743beb6f68448b7c19af3c8_812c80c9-d449-413f-8eeb-e295af8c0d0f.webp?v=1714911855"}},"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: "停產" }