$product = {"id":7415006265443,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 1G - 生日帽","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-iv01","description":null,"published_at":"2024-06-11T17:55:26+08:00","created_at":"2024-05-05T20:04:58+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":41910865330275,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-IV01","requires_shipping":true,"taxable":true,"featured_image":{"id":31487906840675,"product_id":7415006265443,"position":6,"created_at":"2024-05-05T20:05:12+08:00","updated_at":"2024-05-05T20:05:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c15b9c80ad07fc911b324ed64d1ce0807391f43_94cb4c98-63c1-4b73-ad2e-8adedcc126a1.webp?v=1714910712","variant_ids":[41910865330275]},"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-IV01","featured_media":{"alt":null,"id":23893250834531,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c15b9c80ad07fc911b324ed64d1ce0807391f43_94cb4c98-63c1-4b73-ad2e-8adedcc126a1.webp?v=1714910712"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4308a3f1b9b68d595aa92ab0791aefca2931f05e_91e5473b-c890-44c7-8b21-e3ef5a200ec1.webp?v=1714910700","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d3ee37916eff0276e321bcf8eceb25d8a49e08f_ceb26ea1-4075-4052-b69e-ed692b1cb141.webp?v=1714910703","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d9769df7ea20215fde14e755968642413829e61f_2404d898-a766-401a-9acf-62ad65bc1e3b.webp?v=1714910705","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/19ed59462f31e9d938d64a67adeb1875b67dba9f_75d31f1a-8436-47bc-bbc8-3ddb1be12b55.webp?v=1714910708","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7eeeebf60572e7bf0e4aa02283fe91c09a65c1b8_90115ae6-4c4e-4bb3-b9b2-a25013e26051.webp?v=1714910710","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c15b9c80ad07fc911b324ed64d1ce0807391f43_94cb4c98-63c1-4b73-ad2e-8adedcc126a1.webp?v=1714910712","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b538d32a9adedc8cf8464715591e81a223160000_fab9bceb-a503-486d-88bf-c7c384c8c775.webp?v=1714910714","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/16ee971901563900a895ea17328ff85b3ec33bd4_5cf127b6-498a-48e1-b7d6-0b900634fe25.webp?v=1714910717","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6172eb549a111b359f394f93f0e7689b09ee4bc6_b2c0a2e6-de6f-4da2-9b88-df2f37209c80.webp?v=1714910719","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e00d2867ac15deefbf7c100c031e9e48aa4feddf_e3140163-79d6-4434-a214-3145dd2eab20.webp?v=1714910722"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4308a3f1b9b68d595aa92ab0791aefca2931f05e_91e5473b-c890-44c7-8b21-e3ef5a200ec1.webp?v=1714910700","options":["color"],"media":[{"alt":null,"id":23893248409699,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4308a3f1b9b68d595aa92ab0791aefca2931f05e_91e5473b-c890-44c7-8b21-e3ef5a200ec1.webp?v=1714910700"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4308a3f1b9b68d595aa92ab0791aefca2931f05e_91e5473b-c890-44c7-8b21-e3ef5a200ec1.webp?v=1714910700","width":2000},{"alt":null,"id":23893248802915,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d3ee37916eff0276e321bcf8eceb25d8a49e08f_ceb26ea1-4075-4052-b69e-ed692b1cb141.webp?v=1714910703"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d3ee37916eff0276e321bcf8eceb25d8a49e08f_ceb26ea1-4075-4052-b69e-ed692b1cb141.webp?v=1714910703","width":2000},{"alt":null,"id":23893249425507,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d9769df7ea20215fde14e755968642413829e61f_2404d898-a766-401a-9acf-62ad65bc1e3b.webp?v=1714910705"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d9769df7ea20215fde14e755968642413829e61f_2404d898-a766-401a-9acf-62ad65bc1e3b.webp?v=1714910705","width":2000},{"alt":null,"id":23893249884259,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/19ed59462f31e9d938d64a67adeb1875b67dba9f_75d31f1a-8436-47bc-bbc8-3ddb1be12b55.webp?v=1714910708"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/19ed59462f31e9d938d64a67adeb1875b67dba9f_75d31f1a-8436-47bc-bbc8-3ddb1be12b55.webp?v=1714910708","width":2000},{"alt":null,"id":23893250310243,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7eeeebf60572e7bf0e4aa02283fe91c09a65c1b8_90115ae6-4c4e-4bb3-b9b2-a25013e26051.webp?v=1714910710"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7eeeebf60572e7bf0e4aa02283fe91c09a65c1b8_90115ae6-4c4e-4bb3-b9b2-a25013e26051.webp?v=1714910710","width":2000},{"alt":null,"id":23893250834531,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c15b9c80ad07fc911b324ed64d1ce0807391f43_94cb4c98-63c1-4b73-ad2e-8adedcc126a1.webp?v=1714910712"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c15b9c80ad07fc911b324ed64d1ce0807391f43_94cb4c98-63c1-4b73-ad2e-8adedcc126a1.webp?v=1714910712","width":2000},{"alt":null,"id":23893251555427,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b538d32a9adedc8cf8464715591e81a223160000_fab9bceb-a503-486d-88bf-c7c384c8c775.webp?v=1714910714"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b538d32a9adedc8cf8464715591e81a223160000_fab9bceb-a503-486d-88bf-c7c384c8c775.webp?v=1714910714","width":2000},{"alt":null,"id":23893251981411,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/16ee971901563900a895ea17328ff85b3ec33bd4_5cf127b6-498a-48e1-b7d6-0b900634fe25.webp?v=1714910717"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/16ee971901563900a895ea17328ff85b3ec33bd4_5cf127b6-498a-48e1-b7d6-0b900634fe25.webp?v=1714910717","width":2000},{"alt":null,"id":23893252472931,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6172eb549a111b359f394f93f0e7689b09ee4bc6_b2c0a2e6-de6f-4da2-9b88-df2f37209c80.webp?v=1714910719"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6172eb549a111b359f394f93f0e7689b09ee4bc6_b2c0a2e6-de6f-4da2-9b88-df2f37209c80.webp?v=1714910719","width":2000},{"alt":null,"id":23893252866147,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e00d2867ac15deefbf7c100c031e9e48aa4feddf_e3140163-79d6-4434-a214-3145dd2eab20.webp?v=1714910722"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e00d2867ac15deefbf7c100c031e9e48aa4feddf_e3140163-79d6-4434-a214-3145dd2eab20.webp?v=1714910722","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910865330275,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-IV01","requires_shipping":true,"taxable":true,"featured_image":{"id":31487906840675,"product_id":7415006265443,"position":6,"created_at":"2024-05-05T20:05:12+08:00","updated_at":"2024-05-05T20:05:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c15b9c80ad07fc911b324ed64d1ce0807391f43_94cb4c98-63c1-4b73-ad2e-8adedcc126a1.webp?v=1714910712","variant_ids":[41910865330275]},"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-IV01","featured_media":{"alt":null,"id":23893250834531,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c15b9c80ad07fc911b324ed64d1ce0807391f43_94cb4c98-63c1-4b73-ad2e-8adedcc126a1.webp?v=1714910712"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910865330275,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-IV01","requires_shipping":true,"taxable":true,"featured_image":{"id":31487906840675,"product_id":7415006265443,"position":6,"created_at":"2024-05-05T20:05:12+08:00","updated_at":"2024-05-05T20:05:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c15b9c80ad07fc911b324ed64d1ce0807391f43_94cb4c98-63c1-4b73-ad2e-8adedcc126a1.webp?v=1714910712","variant_ids":[41910865330275]},"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-IV01","featured_media":{"alt":null,"id":23893250834531,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c15b9c80ad07fc911b324ed64d1ce0807391f43_94cb4c98-63c1-4b73-ad2e-8adedcc126a1.webp?v=1714910712"}},"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: "停產" }