$product = {"id":7414969532515,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 1G - 左看看","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-iv05","description":null,"published_at":"2024-06-11T17:54:26+08:00","created_at":"2024-05-05T19:57:47+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":41910462644323,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-IV05","requires_shipping":true,"taxable":true,"featured_image":{"id":31487808733283,"product_id":7414969532515,"position":10,"created_at":"2024-05-05T19:58:12+08:00","updated_at":"2024-05-05T19:58:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/639b1edc6134c229c44720f41fd30da9f68fc809_f53da198-e323-45ed-9c2e-5818225e6660.webp?v=1714910292","variant_ids":[41910462644323]},"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-IV05","featured_media":{"alt":null,"id":23893152759907,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/639b1edc6134c229c44720f41fd30da9f68fc809_f53da198-e323-45ed-9c2e-5818225e6660.webp?v=1714910292"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/562be626b35bbcf0064c21d29b8ed617774038d7_c92b17ca-6748-4227-aa6b-189a03aa07fc.webp?v=1714910270","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/347e0652fdae061af2416c26241af7177a4759fe_dfe14ce0-9d82-49eb-9290-6a9948b879b9.webp?v=1714910272","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af6bbbba9316e22094994551d613ab645f314705_415bf2c5-9db5-4c83-b9d6-7709ab3b7aa6.webp?v=1714910275","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66740c808c3a4ef69b6a7507554914cdfa622622_3eac51bf-87ae-47e9-b943-befc8907a722.webp?v=1714910277","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e2da59be11b024557c35004dc6962cdecd5f33f_ea391c0d-ad12-4de2-8e9c-8e18a059a1a4.webp?v=1714910280","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52f30ad3a954714ed8501ec63108cec5b8b43aca_d7811590-dbcf-4ab0-b056-b2d19a7858e8.webp?v=1714910282","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1f2ede396a8751961ca4041f8168673cc237b65_8ac4158b-5c6f-4c77-a848-d27ac4258e7f.webp?v=1714910284","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d47ba85f311720127075778e29de7f3b46c3c1ae_23a7ab70-b37d-408f-a886-82e8d2d716d4.webp?v=1714910288","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e75af664e7071c5527e31e4dfc8cfe6a6ed7b4a_973559ac-f098-4cf5-aca6-299a6aeaa750.webp?v=1714910290","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/639b1edc6134c229c44720f41fd30da9f68fc809_f53da198-e323-45ed-9c2e-5818225e6660.webp?v=1714910292"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/562be626b35bbcf0064c21d29b8ed617774038d7_c92b17ca-6748-4227-aa6b-189a03aa07fc.webp?v=1714910270","options":["color"],"media":[{"alt":null,"id":23893146927203,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/562be626b35bbcf0064c21d29b8ed617774038d7_c92b17ca-6748-4227-aa6b-189a03aa07fc.webp?v=1714910270"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/562be626b35bbcf0064c21d29b8ed617774038d7_c92b17ca-6748-4227-aa6b-189a03aa07fc.webp?v=1714910270","width":2000},{"alt":null,"id":23893147746403,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/347e0652fdae061af2416c26241af7177a4759fe_dfe14ce0-9d82-49eb-9290-6a9948b879b9.webp?v=1714910272"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/347e0652fdae061af2416c26241af7177a4759fe_dfe14ce0-9d82-49eb-9290-6a9948b879b9.webp?v=1714910272","width":2000},{"alt":null,"id":23893148434531,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af6bbbba9316e22094994551d613ab645f314705_415bf2c5-9db5-4c83-b9d6-7709ab3b7aa6.webp?v=1714910275"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af6bbbba9316e22094994551d613ab645f314705_415bf2c5-9db5-4c83-b9d6-7709ab3b7aa6.webp?v=1714910275","width":2000},{"alt":null,"id":23893148958819,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66740c808c3a4ef69b6a7507554914cdfa622622_3eac51bf-87ae-47e9-b943-befc8907a722.webp?v=1714910277"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66740c808c3a4ef69b6a7507554914cdfa622622_3eac51bf-87ae-47e9-b943-befc8907a722.webp?v=1714910277","width":2000},{"alt":null,"id":23893149679715,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e2da59be11b024557c35004dc6962cdecd5f33f_ea391c0d-ad12-4de2-8e9c-8e18a059a1a4.webp?v=1714910280"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e2da59be11b024557c35004dc6962cdecd5f33f_ea391c0d-ad12-4de2-8e9c-8e18a059a1a4.webp?v=1714910280","width":2000},{"alt":null,"id":23893150204003,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52f30ad3a954714ed8501ec63108cec5b8b43aca_d7811590-dbcf-4ab0-b056-b2d19a7858e8.webp?v=1714910282"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52f30ad3a954714ed8501ec63108cec5b8b43aca_d7811590-dbcf-4ab0-b056-b2d19a7858e8.webp?v=1714910282","width":2000},{"alt":null,"id":23893150793827,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1f2ede396a8751961ca4041f8168673cc237b65_8ac4158b-5c6f-4c77-a848-d27ac4258e7f.webp?v=1714910284"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1f2ede396a8751961ca4041f8168673cc237b65_8ac4158b-5c6f-4c77-a848-d27ac4258e7f.webp?v=1714910284","width":2000},{"alt":null,"id":23893151449187,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d47ba85f311720127075778e29de7f3b46c3c1ae_23a7ab70-b37d-408f-a886-82e8d2d716d4.webp?v=1714910288"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d47ba85f311720127075778e29de7f3b46c3c1ae_23a7ab70-b37d-408f-a886-82e8d2d716d4.webp?v=1714910288","width":2000},{"alt":null,"id":23893152268387,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e75af664e7071c5527e31e4dfc8cfe6a6ed7b4a_973559ac-f098-4cf5-aca6-299a6aeaa750.webp?v=1714910290"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e75af664e7071c5527e31e4dfc8cfe6a6ed7b4a_973559ac-f098-4cf5-aca6-299a6aeaa750.webp?v=1714910290","width":2000},{"alt":null,"id":23893152759907,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/639b1edc6134c229c44720f41fd30da9f68fc809_f53da198-e323-45ed-9c2e-5818225e6660.webp?v=1714910292"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/639b1edc6134c229c44720f41fd30da9f68fc809_f53da198-e323-45ed-9c2e-5818225e6660.webp?v=1714910292","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910462644323,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-IV05","requires_shipping":true,"taxable":true,"featured_image":{"id":31487808733283,"product_id":7414969532515,"position":10,"created_at":"2024-05-05T19:58:12+08:00","updated_at":"2024-05-05T19:58:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/639b1edc6134c229c44720f41fd30da9f68fc809_f53da198-e323-45ed-9c2e-5818225e6660.webp?v=1714910292","variant_ids":[41910462644323]},"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-IV05","featured_media":{"alt":null,"id":23893152759907,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/639b1edc6134c229c44720f41fd30da9f68fc809_f53da198-e323-45ed-9c2e-5818225e6660.webp?v=1714910292"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910462644323,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-IV05","requires_shipping":true,"taxable":true,"featured_image":{"id":31487808733283,"product_id":7414969532515,"position":10,"created_at":"2024-05-05T19:58:12+08:00","updated_at":"2024-05-05T19:58:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/639b1edc6134c229c44720f41fd30da9f68fc809_f53da198-e323-45ed-9c2e-5818225e6660.webp?v=1714910292","variant_ids":[41910462644323]},"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-IV05","featured_media":{"alt":null,"id":23893152759907,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/639b1edc6134c229c44720f41fd30da9f68fc809_f53da198-e323-45ed-9c2e-5818225e6660.webp?v=1714910292"}},"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: "停產" }