$product = {"id":7414970974307,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 1G - 在幹嘛","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-iv06","description":null,"published_at":"2024-06-11T17:54:29+08:00","created_at":"2024-05-05T19:58: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":41910484598883,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-IV06","requires_shipping":true,"taxable":true,"featured_image":{"id":31487813288035,"product_id":7414970974307,"position":9,"created_at":"2024-05-05T19:58:31+08:00","updated_at":"2024-05-05T19:58:31+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6046fb637c4bc374bd845c67c870c6296559b03d_2c0e0d30-dd54-4780-bf5d-55b550bcbf7e.webp?v=1714910311","variant_ids":[41910484598883]},"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-IV06","featured_media":{"alt":null,"id":23893157249123,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6046fb637c4bc374bd845c67c870c6296559b03d_2c0e0d30-dd54-4780-bf5d-55b550bcbf7e.webp?v=1714910311"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87670cdd79dcc8a3ba4ae63048d2876f8c26196d_e4e9af2d-68df-42e1-9159-f44981d26bdb.webp?v=1714910292","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/81a120091a5213c17d0dd0aa08f9352b9fa6ddd4_ee61a1bd-9c45-47b5-af02-2e057b1e32bd.webp?v=1714910295","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6d58e59c6ad57560a89275841493e1d38d1f9205_a5ac72db-3149-4da0-8db3-19b6fe9cef87.webp?v=1714910297","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df5c4cab98bbe3ee194c20f319b45243ae96a3b3_dc2772b9-eb5e-43a1-9b6b-13c24d5a0683.webp?v=1714910299","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/16e05072778792ad521cbf8bc18beeaf98dbaea3_49075f05-38cb-4d4d-8f78-91299a321be9.webp?v=1714910301","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2be3ea16dcc68e383f571a1fb9b0b881e5aceaea_ba57c7d7-d663-406a-8df7-f45300bbee38.webp?v=1714910304","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22a50d52b3b45cb5e5c7c8c032e2907018b3096e_6a5c60f2-bdb2-4c2d-ad5a-957f87d5a1a6.webp?v=1714910306","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a65fa448052bd860478d92f5cd388bc10971496c_34444e12-6924-4c10-be48-7ab18d03d85c.webp?v=1714910309","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6046fb637c4bc374bd845c67c870c6296559b03d_2c0e0d30-dd54-4780-bf5d-55b550bcbf7e.webp?v=1714910311","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd451cd4df56978c97edb0b011b4f5e1be70c4f4_78c2d894-74f7-4cb4-9fab-064a9c43bc72.webp?v=1714910313"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87670cdd79dcc8a3ba4ae63048d2876f8c26196d_e4e9af2d-68df-42e1-9159-f44981d26bdb.webp?v=1714910292","options":["color"],"media":[{"alt":null,"id":23893152858211,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87670cdd79dcc8a3ba4ae63048d2876f8c26196d_e4e9af2d-68df-42e1-9159-f44981d26bdb.webp?v=1714910292"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87670cdd79dcc8a3ba4ae63048d2876f8c26196d_e4e9af2d-68df-42e1-9159-f44981d26bdb.webp?v=1714910292","width":2000},{"alt":null,"id":23893153775715,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/81a120091a5213c17d0dd0aa08f9352b9fa6ddd4_ee61a1bd-9c45-47b5-af02-2e057b1e32bd.webp?v=1714910295"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/81a120091a5213c17d0dd0aa08f9352b9fa6ddd4_ee61a1bd-9c45-47b5-af02-2e057b1e32bd.webp?v=1714910295","width":2000},{"alt":null,"id":23893154398307,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6d58e59c6ad57560a89275841493e1d38d1f9205_a5ac72db-3149-4da0-8db3-19b6fe9cef87.webp?v=1714910297"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6d58e59c6ad57560a89275841493e1d38d1f9205_a5ac72db-3149-4da0-8db3-19b6fe9cef87.webp?v=1714910297","width":2000},{"alt":null,"id":23893154857059,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df5c4cab98bbe3ee194c20f319b45243ae96a3b3_dc2772b9-eb5e-43a1-9b6b-13c24d5a0683.webp?v=1714910299"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df5c4cab98bbe3ee194c20f319b45243ae96a3b3_dc2772b9-eb5e-43a1-9b6b-13c24d5a0683.webp?v=1714910299","width":2000},{"alt":null,"id":23893155381347,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/16e05072778792ad521cbf8bc18beeaf98dbaea3_49075f05-38cb-4d4d-8f78-91299a321be9.webp?v=1714910301"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/16e05072778792ad521cbf8bc18beeaf98dbaea3_49075f05-38cb-4d4d-8f78-91299a321be9.webp?v=1714910301","width":2000},{"alt":null,"id":23893155709027,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2be3ea16dcc68e383f571a1fb9b0b881e5aceaea_ba57c7d7-d663-406a-8df7-f45300bbee38.webp?v=1714910304"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2be3ea16dcc68e383f571a1fb9b0b881e5aceaea_ba57c7d7-d663-406a-8df7-f45300bbee38.webp?v=1714910304","width":2000},{"alt":null,"id":23893156462691,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22a50d52b3b45cb5e5c7c8c032e2907018b3096e_6a5c60f2-bdb2-4c2d-ad5a-957f87d5a1a6.webp?v=1714910306"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22a50d52b3b45cb5e5c7c8c032e2907018b3096e_6a5c60f2-bdb2-4c2d-ad5a-957f87d5a1a6.webp?v=1714910306","width":2000},{"alt":null,"id":23893156954211,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a65fa448052bd860478d92f5cd388bc10971496c_34444e12-6924-4c10-be48-7ab18d03d85c.webp?v=1714910309"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a65fa448052bd860478d92f5cd388bc10971496c_34444e12-6924-4c10-be48-7ab18d03d85c.webp?v=1714910309","width":2000},{"alt":null,"id":23893157249123,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6046fb637c4bc374bd845c67c870c6296559b03d_2c0e0d30-dd54-4780-bf5d-55b550bcbf7e.webp?v=1714910311"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6046fb637c4bc374bd845c67c870c6296559b03d_2c0e0d30-dd54-4780-bf5d-55b550bcbf7e.webp?v=1714910311","width":2000},{"alt":null,"id":23893157773411,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd451cd4df56978c97edb0b011b4f5e1be70c4f4_78c2d894-74f7-4cb4-9fab-064a9c43bc72.webp?v=1714910313"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd451cd4df56978c97edb0b011b4f5e1be70c4f4_78c2d894-74f7-4cb4-9fab-064a9c43bc72.webp?v=1714910313","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910484598883,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-IV06","requires_shipping":true,"taxable":true,"featured_image":{"id":31487813288035,"product_id":7414970974307,"position":9,"created_at":"2024-05-05T19:58:31+08:00","updated_at":"2024-05-05T19:58:31+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6046fb637c4bc374bd845c67c870c6296559b03d_2c0e0d30-dd54-4780-bf5d-55b550bcbf7e.webp?v=1714910311","variant_ids":[41910484598883]},"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-IV06","featured_media":{"alt":null,"id":23893157249123,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6046fb637c4bc374bd845c67c870c6296559b03d_2c0e0d30-dd54-4780-bf5d-55b550bcbf7e.webp?v=1714910311"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910484598883,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-IV06","requires_shipping":true,"taxable":true,"featured_image":{"id":31487813288035,"product_id":7414970974307,"position":9,"created_at":"2024-05-05T19:58:31+08:00","updated_at":"2024-05-05T19:58:31+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6046fb637c4bc374bd845c67c870c6296559b03d_2c0e0d30-dd54-4780-bf5d-55b550bcbf7e.webp?v=1714910311","variant_ids":[41910484598883]},"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-IV06","featured_media":{"alt":null,"id":23893157249123,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6046fb637c4bc374bd845c67c870c6296559b03d_2c0e0d30-dd54-4780-bf5d-55b550bcbf7e.webp?v=1714910311"}},"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: "停產" }