$product = {"id":7414927786083,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Look - 人在做 峇里島在看","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-af06","description":null,"published_at":"2024-06-11T17:53:18+08:00","created_at":"2024-05-05T19:50:34+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":41910024372323,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-AF06","requires_shipping":true,"taxable":true,"featured_image":{"id":31487703613539,"product_id":7414927786083,"position":3,"created_at":"2024-05-05T19:50:41+08:00","updated_at":"2024-05-05T19:50:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37fec668050029fbcc81a69fcf233d363129ddb6_9fdc4df6-14e3-451a-87ac-cce463c852a6.webp?v=1714909841","variant_ids":[41910024372323]},"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-AF06","featured_media":{"alt":null,"id":23893047476323,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37fec668050029fbcc81a69fcf233d363129ddb6_9fdc4df6-14e3-451a-87ac-cce463c852a6.webp?v=1714909841"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9277e21ae4410ac556d84cf196f1a082721b14af_6adc2062-1f69-4403-8e0a-aae08bdf3af5.webp?v=1714909837","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/11be483d89e894b19f738086ea377d7b59e2bee9_00b90d8a-4272-48b4-95bd-b05cf23bd67c.webp?v=1714909839","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37fec668050029fbcc81a69fcf233d363129ddb6_9fdc4df6-14e3-451a-87ac-cce463c852a6.webp?v=1714909841","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01da2e622c074b10a182177460b01aeb27e7ad65_ffe6fe49-79ef-4ab1-bd71-ca5b841c5f89.webp?v=1714909844","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d2fe3fe46527800b8f7bc26e1d710e22ed95ea91_e7b60e26-6b05-4569-869a-d74e5f66e566.webp?v=1714909846","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f27ab22d6dbd650a57cf996300a2bb0d7adfa64_15c35155-d779-4982-a892-503d92978a61.webp?v=1714909849","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9cc86a253a4a94c3eef9fc46137c7a2e322cb987_526614bc-a385-42c1-948a-8ced16116e45.webp?v=1714909851","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a43dbb88a8a60e83e472173f4a12019f6023bcf_9bc63235-a2ac-4c22-afb5-cc18214fe627.webp?v=1714909853","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2248a2a406bc069754ca3c51ba32af669eb1e521_fb5107f0-8d2b-4d34-9f53-69e87800fe8b.webp?v=1714909856","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/483f588e3b2ea452acb3e55ae3f70b5693763b9a_d0dcd3f7-d036-4591-9b27-dc41b75f18f9.webp?v=1714909858"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9277e21ae4410ac556d84cf196f1a082721b14af_6adc2062-1f69-4403-8e0a-aae08bdf3af5.webp?v=1714909837","options":["color"],"media":[{"alt":null,"id":23893046460515,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9277e21ae4410ac556d84cf196f1a082721b14af_6adc2062-1f69-4403-8e0a-aae08bdf3af5.webp?v=1714909837"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9277e21ae4410ac556d84cf196f1a082721b14af_6adc2062-1f69-4403-8e0a-aae08bdf3af5.webp?v=1714909837","width":2000},{"alt":null,"id":23893046984803,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/11be483d89e894b19f738086ea377d7b59e2bee9_00b90d8a-4272-48b4-95bd-b05cf23bd67c.webp?v=1714909839"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/11be483d89e894b19f738086ea377d7b59e2bee9_00b90d8a-4272-48b4-95bd-b05cf23bd67c.webp?v=1714909839","width":2000},{"alt":null,"id":23893047476323,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37fec668050029fbcc81a69fcf233d363129ddb6_9fdc4df6-14e3-451a-87ac-cce463c852a6.webp?v=1714909841"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37fec668050029fbcc81a69fcf233d363129ddb6_9fdc4df6-14e3-451a-87ac-cce463c852a6.webp?v=1714909841","width":2000},{"alt":null,"id":23893048492131,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01da2e622c074b10a182177460b01aeb27e7ad65_ffe6fe49-79ef-4ab1-bd71-ca5b841c5f89.webp?v=1714909844"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01da2e622c074b10a182177460b01aeb27e7ad65_ffe6fe49-79ef-4ab1-bd71-ca5b841c5f89.webp?v=1714909844","width":2000},{"alt":null,"id":23893048918115,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d2fe3fe46527800b8f7bc26e1d710e22ed95ea91_e7b60e26-6b05-4569-869a-d74e5f66e566.webp?v=1714909846"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d2fe3fe46527800b8f7bc26e1d710e22ed95ea91_e7b60e26-6b05-4569-869a-d74e5f66e566.webp?v=1714909846","width":2000},{"alt":null,"id":23893049376867,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f27ab22d6dbd650a57cf996300a2bb0d7adfa64_15c35155-d779-4982-a892-503d92978a61.webp?v=1714909849"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f27ab22d6dbd650a57cf996300a2bb0d7adfa64_15c35155-d779-4982-a892-503d92978a61.webp?v=1714909849","width":2000},{"alt":null,"id":23893049737315,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9cc86a253a4a94c3eef9fc46137c7a2e322cb987_526614bc-a385-42c1-948a-8ced16116e45.webp?v=1714909851"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9cc86a253a4a94c3eef9fc46137c7a2e322cb987_526614bc-a385-42c1-948a-8ced16116e45.webp?v=1714909851","width":2000},{"alt":null,"id":23893050425443,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a43dbb88a8a60e83e472173f4a12019f6023bcf_9bc63235-a2ac-4c22-afb5-cc18214fe627.webp?v=1714909853"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a43dbb88a8a60e83e472173f4a12019f6023bcf_9bc63235-a2ac-4c22-afb5-cc18214fe627.webp?v=1714909853","width":2000},{"alt":null,"id":23893050818659,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2248a2a406bc069754ca3c51ba32af669eb1e521_fb5107f0-8d2b-4d34-9f53-69e87800fe8b.webp?v=1714909856"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2248a2a406bc069754ca3c51ba32af669eb1e521_fb5107f0-8d2b-4d34-9f53-69e87800fe8b.webp?v=1714909856","width":2000},{"alt":null,"id":23893051474019,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/483f588e3b2ea452acb3e55ae3f70b5693763b9a_d0dcd3f7-d036-4591-9b27-dc41b75f18f9.webp?v=1714909858"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/483f588e3b2ea452acb3e55ae3f70b5693763b9a_d0dcd3f7-d036-4591-9b27-dc41b75f18f9.webp?v=1714909858","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910024372323,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-AF06","requires_shipping":true,"taxable":true,"featured_image":{"id":31487703613539,"product_id":7414927786083,"position":3,"created_at":"2024-05-05T19:50:41+08:00","updated_at":"2024-05-05T19:50:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37fec668050029fbcc81a69fcf233d363129ddb6_9fdc4df6-14e3-451a-87ac-cce463c852a6.webp?v=1714909841","variant_ids":[41910024372323]},"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-AF06","featured_media":{"alt":null,"id":23893047476323,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37fec668050029fbcc81a69fcf233d363129ddb6_9fdc4df6-14e3-451a-87ac-cce463c852a6.webp?v=1714909841"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910024372323,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-AF06","requires_shipping":true,"taxable":true,"featured_image":{"id":31487703613539,"product_id":7414927786083,"position":3,"created_at":"2024-05-05T19:50:41+08:00","updated_at":"2024-05-05T19:50:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37fec668050029fbcc81a69fcf233d363129ddb6_9fdc4df6-14e3-451a-87ac-cce463c852a6.webp?v=1714909841","variant_ids":[41910024372323]},"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-AF06","featured_media":{"alt":null,"id":23893047476323,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37fec668050029fbcc81a69fcf233d363129ddb6_9fdc4df6-14e3-451a-87ac-cce463c852a6.webp?v=1714909841"}},"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: "停產" }