$product = {"id":7415066984547,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Look - 人在做 大堡礁在看","handle":"iphone-12-mini-mod-nx-magsafe-printable-af07","description":null,"published_at":"2024-06-11T17:57:05+08:00","created_at":"2024-05-05T20:16:27+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區Look","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-look","device-iPhone 12 mini","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-look","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":41911518167139,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-AF07","requires_shipping":true,"taxable":true,"featured_image":{"id":31488065699939,"product_id":7415066984547,"position":2,"created_at":"2024-05-05T20:16:32+08:00","updated_at":"2024-05-05T20:16:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35ec750aa0bbd540a891bd17588bb0f7f7658cff_15f07cfa-9b65-4264-9ef2-703b49b90483.webp?v=1714911392","variant_ids":[41911518167139]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Look - 人在做 大堡礁在看 - 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":"MPB0118424-AF07","featured_media":{"alt":null,"id":23893410152547,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35ec750aa0bbd540a891bd17588bb0f7f7658cff_15f07cfa-9b65-4264-9ef2-703b49b90483.webp?v=1714911392"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c0d7a75d2ea9ad8abb7917c910d3e334b329a4b_77b2a76c-ffc9-4bb4-aea3-2292a6e5e443.webp?v=1714911389","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35ec750aa0bbd540a891bd17588bb0f7f7658cff_15f07cfa-9b65-4264-9ef2-703b49b90483.webp?v=1714911392","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d546bf82726c7d9e8a87cf1941a0f3bb49bf3e55_aa4c3e83-47c8-467c-916c-7d532a2750e0.webp?v=1714911394","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9cace70005e9ba5db6cb89cac606f3a9314bc7ce_f8556c56-0aa1-4012-9417-0a773a2892df.webp?v=1714911397","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a570a349f8047676b22928c1536cf50ee8722791_aa78f3c0-daf9-4b72-9bd9-28369031b46a.webp?v=1714911399","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9da6e164a1093cdd645a583201c187e684cddc02_5ee5e6ba-8204-41a8-95d4-72ec317162c4.webp?v=1714911402","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f516cde885466c877e894b7c9c2d3f9b3da82ee0_9def4ec1-a6fd-4da9-bbe0-853ba8faf935.webp?v=1714911404","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f579979c264c07a423cc49defc1be58b0700ef48_ed5bef83-c388-4ee4-ad24-d49f14e2a709.webp?v=1714911406","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f534c827569629ec812c218bab85066d17249720_c16d1d90-f79b-4a90-9787-14cfbe49f418.webp?v=1714911409","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/562ebc9d8271e6b13a15d980eaa81af9c73bcc1f_e587c51f-cb0e-4298-87cf-c92ce344af87.webp?v=1714911411","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e331643d2ee00f49e053a963927da3960994661d_885e37ae-9f17-4b59-abb8-21d4fc8a5217.webp?v=1714911413"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c0d7a75d2ea9ad8abb7917c910d3e334b329a4b_77b2a76c-ffc9-4bb4-aea3-2292a6e5e443.webp?v=1714911389","options":["color"],"media":[{"alt":null,"id":23893409497187,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c0d7a75d2ea9ad8abb7917c910d3e334b329a4b_77b2a76c-ffc9-4bb4-aea3-2292a6e5e443.webp?v=1714911389"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c0d7a75d2ea9ad8abb7917c910d3e334b329a4b_77b2a76c-ffc9-4bb4-aea3-2292a6e5e443.webp?v=1714911389","width":2000},{"alt":null,"id":23893410152547,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35ec750aa0bbd540a891bd17588bb0f7f7658cff_15f07cfa-9b65-4264-9ef2-703b49b90483.webp?v=1714911392"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35ec750aa0bbd540a891bd17588bb0f7f7658cff_15f07cfa-9b65-4264-9ef2-703b49b90483.webp?v=1714911392","width":2000},{"alt":null,"id":23893410906211,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d546bf82726c7d9e8a87cf1941a0f3bb49bf3e55_aa4c3e83-47c8-467c-916c-7d532a2750e0.webp?v=1714911394"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d546bf82726c7d9e8a87cf1941a0f3bb49bf3e55_aa4c3e83-47c8-467c-916c-7d532a2750e0.webp?v=1714911394","width":2000},{"alt":null,"id":23893411823715,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9cace70005e9ba5db6cb89cac606f3a9314bc7ce_f8556c56-0aa1-4012-9417-0a773a2892df.webp?v=1714911397"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9cace70005e9ba5db6cb89cac606f3a9314bc7ce_f8556c56-0aa1-4012-9417-0a773a2892df.webp?v=1714911397","width":2000},{"alt":null,"id":23893412282467,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a570a349f8047676b22928c1536cf50ee8722791_aa78f3c0-daf9-4b72-9bd9-28369031b46a.webp?v=1714911399"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a570a349f8047676b22928c1536cf50ee8722791_aa78f3c0-daf9-4b72-9bd9-28369031b46a.webp?v=1714911399","width":2000},{"alt":null,"id":23893412905059,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9da6e164a1093cdd645a583201c187e684cddc02_5ee5e6ba-8204-41a8-95d4-72ec317162c4.webp?v=1714911402"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9da6e164a1093cdd645a583201c187e684cddc02_5ee5e6ba-8204-41a8-95d4-72ec317162c4.webp?v=1714911402","width":2000},{"alt":null,"id":23893413789795,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f516cde885466c877e894b7c9c2d3f9b3da82ee0_9def4ec1-a6fd-4da9-bbe0-853ba8faf935.webp?v=1714911404"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f516cde885466c877e894b7c9c2d3f9b3da82ee0_9def4ec1-a6fd-4da9-bbe0-853ba8faf935.webp?v=1714911404","width":2000},{"alt":null,"id":23893414510691,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f579979c264c07a423cc49defc1be58b0700ef48_ed5bef83-c388-4ee4-ad24-d49f14e2a709.webp?v=1714911406"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f579979c264c07a423cc49defc1be58b0700ef48_ed5bef83-c388-4ee4-ad24-d49f14e2a709.webp?v=1714911406","width":2000},{"alt":null,"id":23893414969443,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f534c827569629ec812c218bab85066d17249720_c16d1d90-f79b-4a90-9787-14cfbe49f418.webp?v=1714911409"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f534c827569629ec812c218bab85066d17249720_c16d1d90-f79b-4a90-9787-14cfbe49f418.webp?v=1714911409","width":2000},{"alt":null,"id":23893415919715,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/562ebc9d8271e6b13a15d980eaa81af9c73bcc1f_e587c51f-cb0e-4298-87cf-c92ce344af87.webp?v=1714911411"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/562ebc9d8271e6b13a15d980eaa81af9c73bcc1f_e587c51f-cb0e-4298-87cf-c92ce344af87.webp?v=1714911411","width":2000},{"alt":null,"id":23893416476771,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e331643d2ee00f49e053a963927da3960994661d_885e37ae-9f17-4b59-abb8-21d4fc8a5217.webp?v=1714911413"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e331643d2ee00f49e053a963927da3960994661d_885e37ae-9f17-4b59-abb8-21d4fc8a5217.webp?v=1714911413","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911518167139,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-AF07","requires_shipping":true,"taxable":true,"featured_image":{"id":31488065699939,"product_id":7415066984547,"position":2,"created_at":"2024-05-05T20:16:32+08:00","updated_at":"2024-05-05T20:16:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35ec750aa0bbd540a891bd17588bb0f7f7658cff_15f07cfa-9b65-4264-9ef2-703b49b90483.webp?v=1714911392","variant_ids":[41911518167139]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Look - 人在做 大堡礁在看 - 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":"MPB0118424-AF07","featured_media":{"alt":null,"id":23893410152547,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35ec750aa0bbd540a891bd17588bb0f7f7658cff_15f07cfa-9b65-4264-9ef2-703b49b90483.webp?v=1714911392"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911518167139,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-AF07","requires_shipping":true,"taxable":true,"featured_image":{"id":31488065699939,"product_id":7415066984547,"position":2,"created_at":"2024-05-05T20:16:32+08:00","updated_at":"2024-05-05T20:16:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35ec750aa0bbd540a891bd17588bb0f7f7658cff_15f07cfa-9b65-4264-9ef2-703b49b90483.webp?v=1714911392","variant_ids":[41911518167139]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Look - 人在做 大堡礁在看 - 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":"MPB0118424-AF07","featured_media":{"alt":null,"id":23893410152547,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35ec750aa0bbd540a891bd17588bb0f7f7658cff_15f07cfa-9b65-4264-9ef2-703b49b90483.webp?v=1714911392"}},"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: "停產" }