$product = {"id":7415003906147,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 1G - 生日8","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-iv02","description":null,"published_at":"2024-06-11T17:55:23+08:00","created_at":"2024-05-05T20:04:29+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":41910836494435,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-IV02","requires_shipping":true,"taxable":true,"featured_image":{"id":31487896813667,"product_id":7415003906147,"position":1,"created_at":"2024-05-05T20:04:32+08:00","updated_at":"2024-05-05T20:04:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58808910fbd0c67cd0496242d6a86e6aeb5d78ff_29a6bc07-e946-4d66-b7d5-a894de3ed9b0.webp?v=1714910672","variant_ids":[41910836494435]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 1G - 生日8 - 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-IV02","featured_media":{"alt":null,"id":23893240840291,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58808910fbd0c67cd0496242d6a86e6aeb5d78ff_29a6bc07-e946-4d66-b7d5-a894de3ed9b0.webp?v=1714910672"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58808910fbd0c67cd0496242d6a86e6aeb5d78ff_29a6bc07-e946-4d66-b7d5-a894de3ed9b0.webp?v=1714910672","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbe0fd4e1838ee5509b62f0e6915065ae3306ede_6907f595-f81b-4b8b-99f5-baec5a31cc32.webp?v=1714910674","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/53e81a3863480c4411e23c64230957b68581e470_5b1281fa-661d-409e-8d7e-2f8f1dc8b6f0.webp?v=1714910677","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03ab46776eae0232b766859602e63714504f64ba_b27230c4-bd29-4dba-974a-9523fbee4fa1.webp?v=1714910679","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/144d6a0c09cd97dea46978eeddb8c05c40591078_3efdd1e5-bdb5-4421-a6e7-a35c9ff01b9f.webp?v=1714910682","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5892bfaf9064baa5ee29b649ef3734da919cea13_31e46321-985a-4cf3-a85e-8e6660e72d0a.webp?v=1714910684","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3360eac22ce56aac3179cce6629775dc1f8b02b_dbe9be49-1ebf-4411-a6c0-026b54713c05.webp?v=1714910686","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d0f83f67435374a5c9b4957e3b30a2e1bd8d8b8_eb9ea35f-8f44-4a67-8d7f-634a9421bc62.webp?v=1714910689","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/037c1fe81f0586dfdfdd5a27127014e0e1e58458_665d5f6d-b578-4b5b-9260-862a7874ef68.webp?v=1714910691","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e3ebe6da000a10b6798b627b4b03d9e8b5de93a_f25c2272-9a46-422a-9618-0a1863612c87.webp?v=1714910693"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58808910fbd0c67cd0496242d6a86e6aeb5d78ff_29a6bc07-e946-4d66-b7d5-a894de3ed9b0.webp?v=1714910672","options":["color"],"media":[{"alt":null,"id":23893240840291,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58808910fbd0c67cd0496242d6a86e6aeb5d78ff_29a6bc07-e946-4d66-b7d5-a894de3ed9b0.webp?v=1714910672"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58808910fbd0c67cd0496242d6a86e6aeb5d78ff_29a6bc07-e946-4d66-b7d5-a894de3ed9b0.webp?v=1714910672","width":2000},{"alt":null,"id":23893241462883,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbe0fd4e1838ee5509b62f0e6915065ae3306ede_6907f595-f81b-4b8b-99f5-baec5a31cc32.webp?v=1714910674"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbe0fd4e1838ee5509b62f0e6915065ae3306ede_6907f595-f81b-4b8b-99f5-baec5a31cc32.webp?v=1714910674","width":2000},{"alt":null,"id":23893242052707,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/53e81a3863480c4411e23c64230957b68581e470_5b1281fa-661d-409e-8d7e-2f8f1dc8b6f0.webp?v=1714910677"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/53e81a3863480c4411e23c64230957b68581e470_5b1281fa-661d-409e-8d7e-2f8f1dc8b6f0.webp?v=1714910677","width":2000},{"alt":null,"id":23893242478691,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03ab46776eae0232b766859602e63714504f64ba_b27230c4-bd29-4dba-974a-9523fbee4fa1.webp?v=1714910679"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03ab46776eae0232b766859602e63714504f64ba_b27230c4-bd29-4dba-974a-9523fbee4fa1.webp?v=1714910679","width":2000},{"alt":null,"id":23893243166819,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/144d6a0c09cd97dea46978eeddb8c05c40591078_3efdd1e5-bdb5-4421-a6e7-a35c9ff01b9f.webp?v=1714910682"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/144d6a0c09cd97dea46978eeddb8c05c40591078_3efdd1e5-bdb5-4421-a6e7-a35c9ff01b9f.webp?v=1714910682","width":2000},{"alt":null,"id":23893243986019,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5892bfaf9064baa5ee29b649ef3734da919cea13_31e46321-985a-4cf3-a85e-8e6660e72d0a.webp?v=1714910684"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5892bfaf9064baa5ee29b649ef3734da919cea13_31e46321-985a-4cf3-a85e-8e6660e72d0a.webp?v=1714910684","width":2000},{"alt":null,"id":23893244837987,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3360eac22ce56aac3179cce6629775dc1f8b02b_dbe9be49-1ebf-4411-a6c0-026b54713c05.webp?v=1714910686"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3360eac22ce56aac3179cce6629775dc1f8b02b_dbe9be49-1ebf-4411-a6c0-026b54713c05.webp?v=1714910686","width":2000},{"alt":null,"id":23893245427811,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d0f83f67435374a5c9b4957e3b30a2e1bd8d8b8_eb9ea35f-8f44-4a67-8d7f-634a9421bc62.webp?v=1714910689"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d0f83f67435374a5c9b4957e3b30a2e1bd8d8b8_eb9ea35f-8f44-4a67-8d7f-634a9421bc62.webp?v=1714910689","width":2000},{"alt":null,"id":23893245952099,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/037c1fe81f0586dfdfdd5a27127014e0e1e58458_665d5f6d-b578-4b5b-9260-862a7874ef68.webp?v=1714910691"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/037c1fe81f0586dfdfdd5a27127014e0e1e58458_665d5f6d-b578-4b5b-9260-862a7874ef68.webp?v=1714910691","width":2000},{"alt":null,"id":23893246738531,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e3ebe6da000a10b6798b627b4b03d9e8b5de93a_f25c2272-9a46-422a-9618-0a1863612c87.webp?v=1714910693"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e3ebe6da000a10b6798b627b4b03d9e8b5de93a_f25c2272-9a46-422a-9618-0a1863612c87.webp?v=1714910693","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910836494435,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-IV02","requires_shipping":true,"taxable":true,"featured_image":{"id":31487896813667,"product_id":7415003906147,"position":1,"created_at":"2024-05-05T20:04:32+08:00","updated_at":"2024-05-05T20:04:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58808910fbd0c67cd0496242d6a86e6aeb5d78ff_29a6bc07-e946-4d66-b7d5-a894de3ed9b0.webp?v=1714910672","variant_ids":[41910836494435]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 1G - 生日8 - 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-IV02","featured_media":{"alt":null,"id":23893240840291,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58808910fbd0c67cd0496242d6a86e6aeb5d78ff_29a6bc07-e946-4d66-b7d5-a894de3ed9b0.webp?v=1714910672"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910836494435,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-IV02","requires_shipping":true,"taxable":true,"featured_image":{"id":31487896813667,"product_id":7415003906147,"position":1,"created_at":"2024-05-05T20:04:32+08:00","updated_at":"2024-05-05T20:04:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58808910fbd0c67cd0496242d6a86e6aeb5d78ff_29a6bc07-e946-4d66-b7d5-a894de3ed9b0.webp?v=1714910672","variant_ids":[41910836494435]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 1G - 生日8 - 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-IV02","featured_media":{"alt":null,"id":23893240840291,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58808910fbd0c67cd0496242d6a86e6aeb5d78ff_29a6bc07-e946-4d66-b7d5-a894de3ed9b0.webp?v=1714910672"}},"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: "停產" }