$product = {"id":7415993991267,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Look - 大自然的傑作(斯瓦爾巴冰川)","handle":"iphone-xs-max-mod-nx-printable-af10","description":null,"published_at":"2024-06-11T16:49:54+08:00","created_at":"2024-05-06T12:38:47+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-Look","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-look","device-iPhone XS Max","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-look","Top50","type-Mod NX Printable"],"price":90000,"price_min":90000,"price_max":90000,"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":41916312322147,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-AF10","requires_shipping":true,"taxable":true,"featured_image":{"id":31490939060323,"product_id":7415993991267,"position":8,"created_at":"2024-05-06T12:39:07+08:00","updated_at":"2024-05-06T12:39:07+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c41f2eaef6831f7d848556082bfd2f7a7af4a929_dddf487e-a90a-4091-9174-3fe962f3f115.webp?v=1714970347","variant_ids":[41916312322147]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Look - 大自然的傑作(斯瓦爾巴冰川) - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108624-AF10","featured_media":{"alt":null,"id":23896346132579,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c41f2eaef6831f7d848556082bfd2f7a7af4a929_dddf487e-a90a-4091-9174-3fe962f3f115.webp?v=1714970347"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90402da6f05e6e65b90870c4cf5bf431bf2e19d1_cad88d93-ba36-4b35-9636-72628b5ae209.webp?v=1714970330","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7508dcc7e51cc12aa3edbd0d580b7ec5c6cfe3ee_c307328a-851e-40a4-bad7-586093010bd3.webp?v=1714970332","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/364115ec42cd33c3b2f2b9af3fc3a003b77b3d9e_a7f0c5a1-943b-4e66-a0a6-5442a59cd909.webp?v=1714970335","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a79ff6cfd4a6e44a66670c609518d0c905fe4453_e9df8e4d-31ea-4d74-a59b-62a030571da7.webp?v=1714970337","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/81ac5baf922bf3d9d6a3cbe8b49aa76fd44183e3_2d1ce4a2-a653-48cb-965a-7b7b456e379e.webp?v=1714970340","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98f34184af19b7e52fcb13333518a04001e9f52c_1226e71f-4d7a-4e58-900e-0ad5af1d48ab.webp?v=1714970342","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ea98d21f159fa0a331f4cff77f3e43a980f39eb_6a95e397-51cd-449f-bbac-a70e33a6e36a.webp?v=1714970344","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c41f2eaef6831f7d848556082bfd2f7a7af4a929_dddf487e-a90a-4091-9174-3fe962f3f115.webp?v=1714970347","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc27ebc8c2c321b399345efe2fc40b6420d82178_12b4ca6e-b10f-4de4-9480-eb63888f94d4.webp?v=1714970350","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/222b6d34b5e02cd697cc864b3608b47ae54dc1fe_cfc5601d-e1d0-4fdb-b6e2-a1968f58f8ce.webp?v=1714970352"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90402da6f05e6e65b90870c4cf5bf431bf2e19d1_cad88d93-ba36-4b35-9636-72628b5ae209.webp?v=1714970330","options":["color"],"media":[{"alt":null,"id":23896341643363,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90402da6f05e6e65b90870c4cf5bf431bf2e19d1_cad88d93-ba36-4b35-9636-72628b5ae209.webp?v=1714970330"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90402da6f05e6e65b90870c4cf5bf431bf2e19d1_cad88d93-ba36-4b35-9636-72628b5ae209.webp?v=1714970330","width":2000},{"alt":null,"id":23896342397027,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7508dcc7e51cc12aa3edbd0d580b7ec5c6cfe3ee_c307328a-851e-40a4-bad7-586093010bd3.webp?v=1714970332"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7508dcc7e51cc12aa3edbd0d580b7ec5c6cfe3ee_c307328a-851e-40a4-bad7-586093010bd3.webp?v=1714970332","width":2000},{"alt":null,"id":23896342823011,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/364115ec42cd33c3b2f2b9af3fc3a003b77b3d9e_a7f0c5a1-943b-4e66-a0a6-5442a59cd909.webp?v=1714970335"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/364115ec42cd33c3b2f2b9af3fc3a003b77b3d9e_a7f0c5a1-943b-4e66-a0a6-5442a59cd909.webp?v=1714970335","width":2000},{"alt":null,"id":23896343347299,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a79ff6cfd4a6e44a66670c609518d0c905fe4453_e9df8e4d-31ea-4d74-a59b-62a030571da7.webp?v=1714970337"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a79ff6cfd4a6e44a66670c609518d0c905fe4453_e9df8e4d-31ea-4d74-a59b-62a030571da7.webp?v=1714970337","width":2000},{"alt":null,"id":23896344068195,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/81ac5baf922bf3d9d6a3cbe8b49aa76fd44183e3_2d1ce4a2-a653-48cb-965a-7b7b456e379e.webp?v=1714970340"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/81ac5baf922bf3d9d6a3cbe8b49aa76fd44183e3_2d1ce4a2-a653-48cb-965a-7b7b456e379e.webp?v=1714970340","width":2000},{"alt":null,"id":23896344756323,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98f34184af19b7e52fcb13333518a04001e9f52c_1226e71f-4d7a-4e58-900e-0ad5af1d48ab.webp?v=1714970342"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98f34184af19b7e52fcb13333518a04001e9f52c_1226e71f-4d7a-4e58-900e-0ad5af1d48ab.webp?v=1714970342","width":2000},{"alt":null,"id":23896345673827,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ea98d21f159fa0a331f4cff77f3e43a980f39eb_6a95e397-51cd-449f-bbac-a70e33a6e36a.webp?v=1714970344"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ea98d21f159fa0a331f4cff77f3e43a980f39eb_6a95e397-51cd-449f-bbac-a70e33a6e36a.webp?v=1714970344","width":2000},{"alt":null,"id":23896346132579,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c41f2eaef6831f7d848556082bfd2f7a7af4a929_dddf487e-a90a-4091-9174-3fe962f3f115.webp?v=1714970347"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c41f2eaef6831f7d848556082bfd2f7a7af4a929_dddf487e-a90a-4091-9174-3fe962f3f115.webp?v=1714970347","width":2000},{"alt":null,"id":23896347050083,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc27ebc8c2c321b399345efe2fc40b6420d82178_12b4ca6e-b10f-4de4-9480-eb63888f94d4.webp?v=1714970350"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc27ebc8c2c321b399345efe2fc40b6420d82178_12b4ca6e-b10f-4de4-9480-eb63888f94d4.webp?v=1714970350","width":2000},{"alt":null,"id":23896347770979,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/222b6d34b5e02cd697cc864b3608b47ae54dc1fe_cfc5601d-e1d0-4fdb-b6e2-a1968f58f8ce.webp?v=1714970352"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/222b6d34b5e02cd697cc864b3608b47ae54dc1fe_cfc5601d-e1d0-4fdb-b6e2-a1968f58f8ce.webp?v=1714970352","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41916312322147,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-AF10","requires_shipping":true,"taxable":true,"featured_image":{"id":31490939060323,"product_id":7415993991267,"position":8,"created_at":"2024-05-06T12:39:07+08:00","updated_at":"2024-05-06T12:39:07+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c41f2eaef6831f7d848556082bfd2f7a7af4a929_dddf487e-a90a-4091-9174-3fe962f3f115.webp?v=1714970347","variant_ids":[41916312322147]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Look - 大自然的傑作(斯瓦爾巴冰川) - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108624-AF10","featured_media":{"alt":null,"id":23896346132579,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c41f2eaef6831f7d848556082bfd2f7a7af4a929_dddf487e-a90a-4091-9174-3fe962f3f115.webp?v=1714970347"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41916312322147,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-AF10","requires_shipping":true,"taxable":true,"featured_image":{"id":31490939060323,"product_id":7415993991267,"position":8,"created_at":"2024-05-06T12:39:07+08:00","updated_at":"2024-05-06T12:39:07+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c41f2eaef6831f7d848556082bfd2f7a7af4a929_dddf487e-a90a-4091-9174-3fe962f3f115.webp?v=1714970347","variant_ids":[41916312322147]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Look - 大自然的傑作(斯瓦爾巴冰川) - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108624-AF10","featured_media":{"alt":null,"id":23896346132579,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c41f2eaef6831f7d848556082bfd2f7a7af4a929_dddf487e-a90a-4091-9174-3fe962f3f115.webp?v=1714970347"}},"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: "停產" }