$product = {"id":7411248627811,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 1G - 抱一個","handle":"iphone-14-plus-mod-nx-magsafe-printable-iv03","description":null,"published_at":"2024-06-11T17:39:52+08:00","created_at":"2024-05-04T23:53:23+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 14 Plus","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":41896507375715,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-IV03","requires_shipping":true,"taxable":true,"featured_image":{"id":31479957127267,"product_id":7411248627811,"position":7,"created_at":"2024-05-04T23:53:39+08:00","updated_at":"2024-05-04T23:53:39+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac07f69a9742545188107060fec25bf3ca078e51_d99bdff9-9e55-4321-a5aa-ee568d31d0de.webp?v=1714838019","variant_ids":[41896507375715]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 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":"MPB0126124-IV03","featured_media":{"alt":null,"id":23885207568483,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac07f69a9742545188107060fec25bf3ca078e51_d99bdff9-9e55-4321-a5aa-ee568d31d0de.webp?v=1714838019"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/220b1fe81717001f56a79cbb240f858d79343005_bfce6c39-e5e1-46e0-ac8c-851cc754e74e.webp?v=1714838005","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f85151ea9cb74be00cc8a18b50c56473c4a9fc5d_35e54236-a47b-43d3-b50e-038af7c3e291.webp?v=1714838008","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bcdf5dafc8fc2f46e9a563b175accbd61c83244_0407e544-d809-4626-960a-af021007acb1.webp?v=1714838010","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65a50b98e6d469be96f46fcf02984158f6d1bee9_e35087cb-61ac-4d5e-8380-0cb1d53078cc.webp?v=1714838012","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/25334f7084aa0602b300778ea01987140e6af5d6_211864d8-6ec3-416e-b6ec-995e6ed95779.webp?v=1714838015","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fafb652a1f3fc384425ee229c59e3bce3f3d05d6_b64c5651-71e9-40d7-8af3-3cde41cde50e.webp?v=1714838017","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac07f69a9742545188107060fec25bf3ca078e51_d99bdff9-9e55-4321-a5aa-ee568d31d0de.webp?v=1714838019","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/171d1ee50fc05bfa328bab83113b761f1712c1a7_d6dca32b-3755-4f77-bb9d-01403110973f.webp?v=1714838021","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77dce7a1a329bf6fd4cfa2136e8f952d8c465505_59cea096-d8c3-4967-9637-3791026c47fa.webp?v=1714838024","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f40b296e2f94b2a2a21b9ad80054d3ab965751e3_2e2bb8a1-fd58-41c2-ba90-247f362479e0.webp?v=1714838026"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/220b1fe81717001f56a79cbb240f858d79343005_bfce6c39-e5e1-46e0-ac8c-851cc754e74e.webp?v=1714838005","options":["color"],"media":[{"alt":null,"id":23885204586595,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/220b1fe81717001f56a79cbb240f858d79343005_bfce6c39-e5e1-46e0-ac8c-851cc754e74e.webp?v=1714838005"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/220b1fe81717001f56a79cbb240f858d79343005_bfce6c39-e5e1-46e0-ac8c-851cc754e74e.webp?v=1714838005","width":2000},{"alt":null,"id":23885205209187,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f85151ea9cb74be00cc8a18b50c56473c4a9fc5d_35e54236-a47b-43d3-b50e-038af7c3e291.webp?v=1714838008"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f85151ea9cb74be00cc8a18b50c56473c4a9fc5d_35e54236-a47b-43d3-b50e-038af7c3e291.webp?v=1714838008","width":2000},{"alt":null,"id":23885205635171,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bcdf5dafc8fc2f46e9a563b175accbd61c83244_0407e544-d809-4626-960a-af021007acb1.webp?v=1714838010"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bcdf5dafc8fc2f46e9a563b175accbd61c83244_0407e544-d809-4626-960a-af021007acb1.webp?v=1714838010","width":2000},{"alt":null,"id":23885206061155,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65a50b98e6d469be96f46fcf02984158f6d1bee9_e35087cb-61ac-4d5e-8380-0cb1d53078cc.webp?v=1714838012"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65a50b98e6d469be96f46fcf02984158f6d1bee9_e35087cb-61ac-4d5e-8380-0cb1d53078cc.webp?v=1714838012","width":2000},{"alt":null,"id":23885206585443,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/25334f7084aa0602b300778ea01987140e6af5d6_211864d8-6ec3-416e-b6ec-995e6ed95779.webp?v=1714838015"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/25334f7084aa0602b300778ea01987140e6af5d6_211864d8-6ec3-416e-b6ec-995e6ed95779.webp?v=1714838015","width":2000},{"alt":null,"id":23885207109731,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fafb652a1f3fc384425ee229c59e3bce3f3d05d6_b64c5651-71e9-40d7-8af3-3cde41cde50e.webp?v=1714838017"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fafb652a1f3fc384425ee229c59e3bce3f3d05d6_b64c5651-71e9-40d7-8af3-3cde41cde50e.webp?v=1714838017","width":2000},{"alt":null,"id":23885207568483,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac07f69a9742545188107060fec25bf3ca078e51_d99bdff9-9e55-4321-a5aa-ee568d31d0de.webp?v=1714838019"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac07f69a9742545188107060fec25bf3ca078e51_d99bdff9-9e55-4321-a5aa-ee568d31d0de.webp?v=1714838019","width":2000},{"alt":null,"id":23885207994467,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/171d1ee50fc05bfa328bab83113b761f1712c1a7_d6dca32b-3755-4f77-bb9d-01403110973f.webp?v=1714838021"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/171d1ee50fc05bfa328bab83113b761f1712c1a7_d6dca32b-3755-4f77-bb9d-01403110973f.webp?v=1714838021","width":2000},{"alt":null,"id":23885208453219,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77dce7a1a329bf6fd4cfa2136e8f952d8c465505_59cea096-d8c3-4967-9637-3791026c47fa.webp?v=1714838024"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77dce7a1a329bf6fd4cfa2136e8f952d8c465505_59cea096-d8c3-4967-9637-3791026c47fa.webp?v=1714838024","width":2000},{"alt":null,"id":23885208977507,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f40b296e2f94b2a2a21b9ad80054d3ab965751e3_2e2bb8a1-fd58-41c2-ba90-247f362479e0.webp?v=1714838026"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f40b296e2f94b2a2a21b9ad80054d3ab965751e3_2e2bb8a1-fd58-41c2-ba90-247f362479e0.webp?v=1714838026","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41896507375715,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-IV03","requires_shipping":true,"taxable":true,"featured_image":{"id":31479957127267,"product_id":7411248627811,"position":7,"created_at":"2024-05-04T23:53:39+08:00","updated_at":"2024-05-04T23:53:39+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac07f69a9742545188107060fec25bf3ca078e51_d99bdff9-9e55-4321-a5aa-ee568d31d0de.webp?v=1714838019","variant_ids":[41896507375715]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 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":"MPB0126124-IV03","featured_media":{"alt":null,"id":23885207568483,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac07f69a9742545188107060fec25bf3ca078e51_d99bdff9-9e55-4321-a5aa-ee568d31d0de.webp?v=1714838019"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41896507375715,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-IV03","requires_shipping":true,"taxable":true,"featured_image":{"id":31479957127267,"product_id":7411248627811,"position":7,"created_at":"2024-05-04T23:53:39+08:00","updated_at":"2024-05-04T23:53:39+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac07f69a9742545188107060fec25bf3ca078e51_d99bdff9-9e55-4321-a5aa-ee568d31d0de.webp?v=1714838019","variant_ids":[41896507375715]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 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":"MPB0126124-IV03","featured_media":{"alt":null,"id":23885207568483,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac07f69a9742545188107060fec25bf3ca078e51_d99bdff9-9e55-4321-a5aa-ee568d31d0de.webp?v=1714838019"}},"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: "停產" }