$product = {"id":7415915053155,"title":"犀牛盾Mod NX手機殼 - iPhone XS - 史迪奇 - 搞怪系列-怪可愛","handle":"iphone-xs-mod-nx-printable-yf02","description":null,"published_at":"2024-06-11T16:47:50+08:00","created_at":"2024-05-06T12:23:58+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-史迪奇","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-stitch","device-iPhone XS","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-stitch","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":41915489419363,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108424-YF02","requires_shipping":true,"taxable":true,"featured_image":{"id":31490725314659,"product_id":7415915053155,"position":9,"created_at":"2024-05-06T12:24:23+08:00","updated_at":"2024-05-06T12:24:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5912c06564eb5bdf1c0d864db4b1600775a4dfff_fda10fbb-2adc-4c31-b7cd-60f1266ed0b8.webp?v=1714969463","variant_ids":[41915489419363]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS - 史迪奇 - 搞怪系列-怪可愛 - 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":"NPB0108424-YF02","featured_media":{"alt":null,"id":23896132092003,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5912c06564eb5bdf1c0d864db4b1600775a4dfff_fda10fbb-2adc-4c31-b7cd-60f1266ed0b8.webp?v=1714969463"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b441d41b185dcfd8431cfd342000584bad2597f_15d45b86-5943-4009-800a-fc85f4ca033a.webp?v=1714969441","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de8c0a2b36cf68bfd25e41cec57790d8d7febce5_004d33a0-5981-4888-8c1a-cd4f4eb0995e.webp?v=1714969443","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b819482453f49203edd8d03b77769d7351ae350f_1353a5d6-35f8-4cb5-8cff-536a3e7838e1.webp?v=1714969446","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fab8e2cf273a3a403561587c0a720c69209327b_c5ad806c-bc1b-46b9-82ff-6554797cd3c0.webp?v=1714969448","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/12dfb8749136f5c7bf07ee1b437eb491c2e00532_01132337-ac6e-446a-9623-f6f4f4c4fa93.webp?v=1714969451","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5232fc692b2c8a1f47125ac5cb096bddc088e68f_539c60ed-a6ec-4612-8f9a-616b5d3e0873.webp?v=1714969453","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2d1d748d2f9de9a07c17105db5e25f587972cea_81436523-35ef-45ee-b0fb-a30661271f7f.webp?v=1714969457","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf79c11b47c44bdab4431189fa7ec8a0d61aabb4_c97deb76-13a5-4e57-88e6-311b6ac830ef.webp?v=1714969460","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5912c06564eb5bdf1c0d864db4b1600775a4dfff_fda10fbb-2adc-4c31-b7cd-60f1266ed0b8.webp?v=1714969463","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32beede346f160543d12081a45f2bfcc44bdd04f_da92f05a-0319-48fb-9749-e04362952f1e.webp?v=1714969465"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b441d41b185dcfd8431cfd342000584bad2597f_15d45b86-5943-4009-800a-fc85f4ca033a.webp?v=1714969441","options":["color"],"media":[{"alt":null,"id":23896127144035,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b441d41b185dcfd8431cfd342000584bad2597f_15d45b86-5943-4009-800a-fc85f4ca033a.webp?v=1714969441"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b441d41b185dcfd8431cfd342000584bad2597f_15d45b86-5943-4009-800a-fc85f4ca033a.webp?v=1714969441","width":2000},{"alt":null,"id":23896127733859,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de8c0a2b36cf68bfd25e41cec57790d8d7febce5_004d33a0-5981-4888-8c1a-cd4f4eb0995e.webp?v=1714969443"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de8c0a2b36cf68bfd25e41cec57790d8d7febce5_004d33a0-5981-4888-8c1a-cd4f4eb0995e.webp?v=1714969443","width":2000},{"alt":null,"id":23896128487523,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b819482453f49203edd8d03b77769d7351ae350f_1353a5d6-35f8-4cb5-8cff-536a3e7838e1.webp?v=1714969446"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b819482453f49203edd8d03b77769d7351ae350f_1353a5d6-35f8-4cb5-8cff-536a3e7838e1.webp?v=1714969446","width":2000},{"alt":null,"id":23896129110115,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fab8e2cf273a3a403561587c0a720c69209327b_c5ad806c-bc1b-46b9-82ff-6554797cd3c0.webp?v=1714969448"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fab8e2cf273a3a403561587c0a720c69209327b_c5ad806c-bc1b-46b9-82ff-6554797cd3c0.webp?v=1714969448","width":2000},{"alt":null,"id":23896129634403,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/12dfb8749136f5c7bf07ee1b437eb491c2e00532_01132337-ac6e-446a-9623-f6f4f4c4fa93.webp?v=1714969451"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/12dfb8749136f5c7bf07ee1b437eb491c2e00532_01132337-ac6e-446a-9623-f6f4f4c4fa93.webp?v=1714969451","width":2000},{"alt":null,"id":23896130158691,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5232fc692b2c8a1f47125ac5cb096bddc088e68f_539c60ed-a6ec-4612-8f9a-616b5d3e0873.webp?v=1714969453"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5232fc692b2c8a1f47125ac5cb096bddc088e68f_539c60ed-a6ec-4612-8f9a-616b5d3e0873.webp?v=1714969453","width":2000},{"alt":null,"id":23896131043427,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2d1d748d2f9de9a07c17105db5e25f587972cea_81436523-35ef-45ee-b0fb-a30661271f7f.webp?v=1714969457"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2d1d748d2f9de9a07c17105db5e25f587972cea_81436523-35ef-45ee-b0fb-a30661271f7f.webp?v=1714969457","width":2000},{"alt":null,"id":23896131764323,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf79c11b47c44bdab4431189fa7ec8a0d61aabb4_c97deb76-13a5-4e57-88e6-311b6ac830ef.webp?v=1714969460"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf79c11b47c44bdab4431189fa7ec8a0d61aabb4_c97deb76-13a5-4e57-88e6-311b6ac830ef.webp?v=1714969460","width":2000},{"alt":null,"id":23896132092003,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5912c06564eb5bdf1c0d864db4b1600775a4dfff_fda10fbb-2adc-4c31-b7cd-60f1266ed0b8.webp?v=1714969463"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5912c06564eb5bdf1c0d864db4b1600775a4dfff_fda10fbb-2adc-4c31-b7cd-60f1266ed0b8.webp?v=1714969463","width":2000},{"alt":null,"id":23896132583523,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32beede346f160543d12081a45f2bfcc44bdd04f_da92f05a-0319-48fb-9749-e04362952f1e.webp?v=1714969465"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32beede346f160543d12081a45f2bfcc44bdd04f_da92f05a-0319-48fb-9749-e04362952f1e.webp?v=1714969465","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41915489419363,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108424-YF02","requires_shipping":true,"taxable":true,"featured_image":{"id":31490725314659,"product_id":7415915053155,"position":9,"created_at":"2024-05-06T12:24:23+08:00","updated_at":"2024-05-06T12:24:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5912c06564eb5bdf1c0d864db4b1600775a4dfff_fda10fbb-2adc-4c31-b7cd-60f1266ed0b8.webp?v=1714969463","variant_ids":[41915489419363]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS - 史迪奇 - 搞怪系列-怪可愛 - 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":"NPB0108424-YF02","featured_media":{"alt":null,"id":23896132092003,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5912c06564eb5bdf1c0d864db4b1600775a4dfff_fda10fbb-2adc-4c31-b7cd-60f1266ed0b8.webp?v=1714969463"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41915489419363,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108424-YF02","requires_shipping":true,"taxable":true,"featured_image":{"id":31490725314659,"product_id":7415915053155,"position":9,"created_at":"2024-05-06T12:24:23+08:00","updated_at":"2024-05-06T12:24:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5912c06564eb5bdf1c0d864db4b1600775a4dfff_fda10fbb-2adc-4c31-b7cd-60f1266ed0b8.webp?v=1714969463","variant_ids":[41915489419363]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS - 史迪奇 - 搞怪系列-怪可愛 - 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":"NPB0108424-YF02","featured_media":{"alt":null,"id":23896132092003,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5912c06564eb5bdf1c0d864db4b1600775a4dfff_fda10fbb-2adc-4c31-b7cd-60f1266ed0b8.webp?v=1714969463"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; $device_handle = null var sellingStatus if ($bumper) { $(document).ready(function() { var productImg = $product.images[0] var bumperVariants = $bumper.variants; var bumperColors = new Object(); var currentVariant = ''; var productType = ''; bumperVariants.forEach(variant => { bumperColors[`${variant.title.split(' (')[0].toLowerCase()}`] = variant.featured_image.src; }); if (productType === 'mod-nx-backplate' || productType === 'mod-backplate') { mergeImages( [productImg, bumperColors[currentVariant]], { crossOrigin: 'anonymous' } ).then(mergedImg => { $('.merged-img').attr('src', mergedImg); }); } else { mergeImages( [bumperColors[currentVariant], productImg], { crossOrigin: 'anonymous' } ).then(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: "停產" }