$product = {"id":7408425500771,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - Batman - Logo","handle":"iphone-12-mini-mod-nx-printable-sb16","description":null,"published_at":"2024-06-11T16:36:53+08:00","created_at":"2024-05-03T15:24:20+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-Batman","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-batman","device-iPhone 12 mini","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-batman","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":41885344432227,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-SB16","requires_shipping":true,"taxable":true,"featured_image":{"id":31472247013475,"product_id":7408425500771,"position":11,"created_at":"2024-05-03T15:24:46+08:00","updated_at":"2024-05-03T15:24:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d22cf748c337dfe5f9759d102a7b31c3d9c6e57_b2ae6081-66b2-4d87-9c38-30d46471097f.webp?v=1714721086","variant_ids":[41885344432227]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - Batman - Logo - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-SB16","featured_media":{"alt":null,"id":23877163221091,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d22cf748c337dfe5f9759d102a7b31c3d9c6e57_b2ae6081-66b2-4d87-9c38-30d46471097f.webp?v=1714721086"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a6aadec60bc37820ac80f88341ed68bce30b7bc1_c2812def-91b6-442d-b44b-5c8906966e78.webp?v=1714721062","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b432dc34e9c8374c609036c25a3daa0b885044d_2d0d96e9-40e0-438f-9215-99a8a5380220.webp?v=1714721065","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e977f5df485133c1bc40e5f637a43eedfec439fa_5d831c47-0b2f-46c5-97d6-abdc13c7ac38.webp?v=1714721067","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c71130bd5ac555540e1282e865fb2534ae02903_93179025-7991-4b34-8f21-776e17545ffd.webp?v=1714721069","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e801c62b25069e0714c4ab919dd5d14396b533b_2db6fdea-e81c-4232-8175-6ab36033a6b4.webp?v=1714721072","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e0fbc76bc25ecf5148159f51d42d8ab10cdbd88_c2093630-e2dc-4a92-a74d-c8d40aa1a029.webp?v=1714721074","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3980f81bb424ff53dfb5bd11cd6c49fe0d14516e_f2838ad1-f787-4c23-b718-9d693212b0a0.webp?v=1714721077","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2008bd594d8760c8e2cd50b5786bb9de448b7825_2296f015-55ce-4310-8c5b-e693edeb2038.webp?v=1714721079","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0d11545561d8b3c9a59fa435f6ada7fb0d8d4af_df08b980-1529-4cba-8d71-98674ffef8ae.webp?v=1714721081","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/082e0c20755a0fbfa1095155defea81f3565718b_6f9df17e-8e5d-47ef-bfc6-a6d86dfae94f.webp?v=1714721084","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d22cf748c337dfe5f9759d102a7b31c3d9c6e57_b2ae6081-66b2-4d87-9c38-30d46471097f.webp?v=1714721086"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a6aadec60bc37820ac80f88341ed68bce30b7bc1_c2812def-91b6-442d-b44b-5c8906966e78.webp?v=1714721062","options":["color"],"media":[{"alt":null,"id":23877158174819,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a6aadec60bc37820ac80f88341ed68bce30b7bc1_c2812def-91b6-442d-b44b-5c8906966e78.webp?v=1714721062"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a6aadec60bc37820ac80f88341ed68bce30b7bc1_c2812def-91b6-442d-b44b-5c8906966e78.webp?v=1714721062","width":2000},{"alt":null,"id":23877158666339,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b432dc34e9c8374c609036c25a3daa0b885044d_2d0d96e9-40e0-438f-9215-99a8a5380220.webp?v=1714721065"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b432dc34e9c8374c609036c25a3daa0b885044d_2d0d96e9-40e0-438f-9215-99a8a5380220.webp?v=1714721065","width":2000},{"alt":null,"id":23877159092323,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e977f5df485133c1bc40e5f637a43eedfec439fa_5d831c47-0b2f-46c5-97d6-abdc13c7ac38.webp?v=1714721067"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e977f5df485133c1bc40e5f637a43eedfec439fa_5d831c47-0b2f-46c5-97d6-abdc13c7ac38.webp?v=1714721067","width":2000},{"alt":null,"id":23877159911523,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c71130bd5ac555540e1282e865fb2534ae02903_93179025-7991-4b34-8f21-776e17545ffd.webp?v=1714721069"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c71130bd5ac555540e1282e865fb2534ae02903_93179025-7991-4b34-8f21-776e17545ffd.webp?v=1714721069","width":2000},{"alt":null,"id":23877160501347,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e801c62b25069e0714c4ab919dd5d14396b533b_2db6fdea-e81c-4232-8175-6ab36033a6b4.webp?v=1714721072"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e801c62b25069e0714c4ab919dd5d14396b533b_2db6fdea-e81c-4232-8175-6ab36033a6b4.webp?v=1714721072","width":2000},{"alt":null,"id":23877161058403,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e0fbc76bc25ecf5148159f51d42d8ab10cdbd88_c2093630-e2dc-4a92-a74d-c8d40aa1a029.webp?v=1714721074"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e0fbc76bc25ecf5148159f51d42d8ab10cdbd88_c2093630-e2dc-4a92-a74d-c8d40aa1a029.webp?v=1714721074","width":2000},{"alt":null,"id":23877161353315,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3980f81bb424ff53dfb5bd11cd6c49fe0d14516e_f2838ad1-f787-4c23-b718-9d693212b0a0.webp?v=1714721077"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3980f81bb424ff53dfb5bd11cd6c49fe0d14516e_f2838ad1-f787-4c23-b718-9d693212b0a0.webp?v=1714721077","width":2000},{"alt":null,"id":23877161844835,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2008bd594d8760c8e2cd50b5786bb9de448b7825_2296f015-55ce-4310-8c5b-e693edeb2038.webp?v=1714721079"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2008bd594d8760c8e2cd50b5786bb9de448b7825_2296f015-55ce-4310-8c5b-e693edeb2038.webp?v=1714721079","width":2000},{"alt":null,"id":23877162205283,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0d11545561d8b3c9a59fa435f6ada7fb0d8d4af_df08b980-1529-4cba-8d71-98674ffef8ae.webp?v=1714721081"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0d11545561d8b3c9a59fa435f6ada7fb0d8d4af_df08b980-1529-4cba-8d71-98674ffef8ae.webp?v=1714721081","width":2000},{"alt":null,"id":23877162860643,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/082e0c20755a0fbfa1095155defea81f3565718b_6f9df17e-8e5d-47ef-bfc6-a6d86dfae94f.webp?v=1714721084"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/082e0c20755a0fbfa1095155defea81f3565718b_6f9df17e-8e5d-47ef-bfc6-a6d86dfae94f.webp?v=1714721084","width":2000},{"alt":null,"id":23877163221091,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d22cf748c337dfe5f9759d102a7b31c3d9c6e57_b2ae6081-66b2-4d87-9c38-30d46471097f.webp?v=1714721086"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d22cf748c337dfe5f9759d102a7b31c3d9c6e57_b2ae6081-66b2-4d87-9c38-30d46471097f.webp?v=1714721086","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41885344432227,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-SB16","requires_shipping":true,"taxable":true,"featured_image":{"id":31472247013475,"product_id":7408425500771,"position":11,"created_at":"2024-05-03T15:24:46+08:00","updated_at":"2024-05-03T15:24:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d22cf748c337dfe5f9759d102a7b31c3d9c6e57_b2ae6081-66b2-4d87-9c38-30d46471097f.webp?v=1714721086","variant_ids":[41885344432227]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - Batman - Logo - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-SB16","featured_media":{"alt":null,"id":23877163221091,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d22cf748c337dfe5f9759d102a7b31c3d9c6e57_b2ae6081-66b2-4d87-9c38-30d46471097f.webp?v=1714721086"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41885344432227,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-SB16","requires_shipping":true,"taxable":true,"featured_image":{"id":31472247013475,"product_id":7408425500771,"position":11,"created_at":"2024-05-03T15:24:46+08:00","updated_at":"2024-05-03T15:24:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d22cf748c337dfe5f9759d102a7b31c3d9c6e57_b2ae6081-66b2-4d87-9c38-30d46471097f.webp?v=1714721086","variant_ids":[41885344432227]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - Batman - Logo - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-SB16","featured_media":{"alt":null,"id":23877163221091,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d22cf748c337dfe5f9759d102a7b31c3d9c6e57_b2ae6081-66b2-4d87-9c38-30d46471097f.webp?v=1714721086"}},"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: "停產" }