$product = {"id":7414967566435,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Look - 人在做 北極冰川在看","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-af05","description":null,"published_at":"2024-06-11T17:54:23+08:00","created_at":"2024-05-05T19:57: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 pro max","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":41910448029795,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-AF05","requires_shipping":true,"taxable":true,"featured_image":{"id":31487802998883,"product_id":7414967566435,"position":10,"created_at":"2024-05-05T19:57:51+08:00","updated_at":"2024-05-05T19:57:51+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/493ca45ac9b5c1fdf385bbae167f7920b03fafb5_ec46a8d1-8c94-4e08-be5a-daaeac49035b.webp?v=1714910271","variant_ids":[41910448029795]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 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":"MPB0118724-AF05","featured_media":{"alt":null,"id":23893146992739,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/493ca45ac9b5c1fdf385bbae167f7920b03fafb5_ec46a8d1-8c94-4e08-be5a-daaeac49035b.webp?v=1714910271"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8af12832a3ff9f03677cc8930d19546a1ce07fe_08a4972e-0859-4251-a31a-7d8226ef2f0b.webp?v=1714910250","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e631d322bd42f267f7869e29385f4617ab9cc73c_f14ac3ed-1464-41fd-8aa5-47eb56c9333a.webp?v=1714910252","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69f61f8ce34dd48a782507bc0c82c3ab097ab5e3_48a2d4b8-e9f9-40f0-80f3-2cf3c35945f3.webp?v=1714910254","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c27563637718afbed46140c907aa0d4afcf8a23_a91c6095-a472-48d1-8787-0e03f8e2d23d.webp?v=1714910257","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b471eec6a4f3f3fcae02258d7fae3a5aabf4c7b4_3895019f-fa67-45f7-b58a-3e47a17a0f41.webp?v=1714910259","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/adef3f36ef907687e9e6f98f04f44aaf2634886a_43e057a1-9cc0-42f3-8be4-c22a137d66e4.webp?v=1714910261","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e10f5279743e34a76fe2e1b6a1d6a7498c6d977b_6bc1baec-ef1b-4681-a25e-1d7e95549739.webp?v=1714910264","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dae2693fb0f20047c1e29be0b85c3e030fb5a95f_234b4d5b-8f0a-4a33-a09e-8eac1e658535.webp?v=1714910266","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/604ce5f5a892152e7fbaf959e579ada3198489b4_aa3ae495-a469-406c-a123-ce5f0cbe4aaa.webp?v=1714910269","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/493ca45ac9b5c1fdf385bbae167f7920b03fafb5_ec46a8d1-8c94-4e08-be5a-daaeac49035b.webp?v=1714910271"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8af12832a3ff9f03677cc8930d19546a1ce07fe_08a4972e-0859-4251-a31a-7d8226ef2f0b.webp?v=1714910250","options":["color"],"media":[{"alt":null,"id":23893141880931,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8af12832a3ff9f03677cc8930d19546a1ce07fe_08a4972e-0859-4251-a31a-7d8226ef2f0b.webp?v=1714910250"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8af12832a3ff9f03677cc8930d19546a1ce07fe_08a4972e-0859-4251-a31a-7d8226ef2f0b.webp?v=1714910250","width":2000},{"alt":null,"id":23893142470755,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e631d322bd42f267f7869e29385f4617ab9cc73c_f14ac3ed-1464-41fd-8aa5-47eb56c9333a.webp?v=1714910252"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e631d322bd42f267f7869e29385f4617ab9cc73c_f14ac3ed-1464-41fd-8aa5-47eb56c9333a.webp?v=1714910252","width":2000},{"alt":null,"id":23893143126115,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69f61f8ce34dd48a782507bc0c82c3ab097ab5e3_48a2d4b8-e9f9-40f0-80f3-2cf3c35945f3.webp?v=1714910254"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69f61f8ce34dd48a782507bc0c82c3ab097ab5e3_48a2d4b8-e9f9-40f0-80f3-2cf3c35945f3.webp?v=1714910254","width":2000},{"alt":null,"id":23893143584867,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c27563637718afbed46140c907aa0d4afcf8a23_a91c6095-a472-48d1-8787-0e03f8e2d23d.webp?v=1714910257"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c27563637718afbed46140c907aa0d4afcf8a23_a91c6095-a472-48d1-8787-0e03f8e2d23d.webp?v=1714910257","width":2000},{"alt":null,"id":23893144272995,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b471eec6a4f3f3fcae02258d7fae3a5aabf4c7b4_3895019f-fa67-45f7-b58a-3e47a17a0f41.webp?v=1714910259"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b471eec6a4f3f3fcae02258d7fae3a5aabf4c7b4_3895019f-fa67-45f7-b58a-3e47a17a0f41.webp?v=1714910259","width":2000},{"alt":null,"id":23893144797283,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/adef3f36ef907687e9e6f98f04f44aaf2634886a_43e057a1-9cc0-42f3-8be4-c22a137d66e4.webp?v=1714910261"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/adef3f36ef907687e9e6f98f04f44aaf2634886a_43e057a1-9cc0-42f3-8be4-c22a137d66e4.webp?v=1714910261","width":2000},{"alt":null,"id":23893145321571,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e10f5279743e34a76fe2e1b6a1d6a7498c6d977b_6bc1baec-ef1b-4681-a25e-1d7e95549739.webp?v=1714910264"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e10f5279743e34a76fe2e1b6a1d6a7498c6d977b_6bc1baec-ef1b-4681-a25e-1d7e95549739.webp?v=1714910264","width":2000},{"alt":null,"id":23893146042467,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dae2693fb0f20047c1e29be0b85c3e030fb5a95f_234b4d5b-8f0a-4a33-a09e-8eac1e658535.webp?v=1714910266"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dae2693fb0f20047c1e29be0b85c3e030fb5a95f_234b4d5b-8f0a-4a33-a09e-8eac1e658535.webp?v=1714910266","width":2000},{"alt":null,"id":23893146501219,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/604ce5f5a892152e7fbaf959e579ada3198489b4_aa3ae495-a469-406c-a123-ce5f0cbe4aaa.webp?v=1714910269"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/604ce5f5a892152e7fbaf959e579ada3198489b4_aa3ae495-a469-406c-a123-ce5f0cbe4aaa.webp?v=1714910269","width":2000},{"alt":null,"id":23893146992739,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/493ca45ac9b5c1fdf385bbae167f7920b03fafb5_ec46a8d1-8c94-4e08-be5a-daaeac49035b.webp?v=1714910271"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/493ca45ac9b5c1fdf385bbae167f7920b03fafb5_ec46a8d1-8c94-4e08-be5a-daaeac49035b.webp?v=1714910271","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910448029795,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-AF05","requires_shipping":true,"taxable":true,"featured_image":{"id":31487802998883,"product_id":7414967566435,"position":10,"created_at":"2024-05-05T19:57:51+08:00","updated_at":"2024-05-05T19:57:51+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/493ca45ac9b5c1fdf385bbae167f7920b03fafb5_ec46a8d1-8c94-4e08-be5a-daaeac49035b.webp?v=1714910271","variant_ids":[41910448029795]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 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":"MPB0118724-AF05","featured_media":{"alt":null,"id":23893146992739,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/493ca45ac9b5c1fdf385bbae167f7920b03fafb5_ec46a8d1-8c94-4e08-be5a-daaeac49035b.webp?v=1714910271"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910448029795,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-AF05","requires_shipping":true,"taxable":true,"featured_image":{"id":31487802998883,"product_id":7414967566435,"position":10,"created_at":"2024-05-05T19:57:51+08:00","updated_at":"2024-05-05T19:57:51+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/493ca45ac9b5c1fdf385bbae167f7920b03fafb5_ec46a8d1-8c94-4e08-be5a-daaeac49035b.webp?v=1714910271","variant_ids":[41910448029795]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 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":"MPB0118724-AF05","featured_media":{"alt":null,"id":23893146992739,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/493ca45ac9b5c1fdf385bbae167f7920b03fafb5_ec46a8d1-8c94-4e08-be5a-daaeac49035b.webp?v=1714910271"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; $device_handle = null; $brand_handle = null; $type = ""; var sellingStatus // 只有設計款(SKU 含 '-')才需要合圖 if ($isMerge && $defaultVariant.sku.includes('-')) { $(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: "停產" }