$product = {"id":4766864703587,"title":"犀牛盾 iPad Air 耐衝擊平板螢幕保護貼","handle":"ipad-air-screen-protector","description":"","published_at":"2020-12-30T14:56:08+08:00","created_at":"2020-12-30T14:56:12+08:00","vendor":"Rhinoshieldtaiwan","type":"耐衝擊保護貼","tags":["20%","2023-tagsAdd-reseller-PL","20240304-reseller-\u003ereplace_to-","25%","30%","35%","40%","45%","50%","addition","addtion","bundle-addition","discountable-item","dropdownDevice-Apple iPad air","member","quickbuy","reseller","reseller-asus","reseller-ipad","Top50"],"price":68000,"price_min":68000,"price_max":68000,"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":40728216797283,"title":"正面 [10.9吋] - iPad Air 第5代","option1":"正面 [10.9吋] - iPad Air 第5代","option2":null,"option3":null,"sku":"SP0125701","requires_shipping":true,"taxable":true,"featured_image":{"id":30394413842531,"product_id":4766864703587,"position":4,"created_at":"2023-09-13T10:19:23+08:00","updated_at":"2023-09-13T10:19:23+08:00","alt":null,"width":1024,"height":1024,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/SP0125701_54616153-c4a2-45fd-94f3-97d1ea0fc795.png?v=1694571563","variant_ids":[40728216797283]},"available":true,"name":"犀牛盾 iPad Air 耐衝擊平板螢幕保護貼 - 正面 [10.9吋] - iPad Air 第5代","public_title":"正面 [10.9吋] - iPad Air 第5代","options":["正面 [10.9吋] - iPad Air 第5代"],"price":68000,"weight":590,"compare_at_price":null,"inventory_quantity":-69,"inventory_management":null,"inventory_policy":"deny","barcode":null,"featured_media":{"alt":null,"id":22754414297187,"position":4,"preview_image":{"aspect_ratio":1.0,"height":1024,"width":1024,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/SP0125701_54616153-c4a2-45fd-94f3-97d1ea0fc795.png?v=1694571563"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":39805581656163,"title":"正面 [10.9吋] - iPad Air 第4代","option1":"正面 [10.9吋] - iPad Air 第4代","option2":null,"option3":null,"sku":"SP0125701","requires_shipping":true,"taxable":true,"featured_image":{"id":30394413875299,"product_id":4766864703587,"position":5,"created_at":"2023-09-13T10:19:23+08:00","updated_at":"2023-09-13T10:19:23+08:00","alt":null,"width":1024,"height":1024,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/SP0120201-1_f18649f9-7c06-425b-801a-feda6bab8221.png?v=1694571563","variant_ids":[39805581656163]},"available":true,"name":"犀牛盾 iPad Air 耐衝擊平板螢幕保護貼 - 正面 [10.9吋] - iPad Air 第4代","public_title":"正面 [10.9吋] - iPad Air 第4代","options":["正面 [10.9吋] - iPad Air 第4代"],"price":68000,"weight":590,"compare_at_price":null,"inventory_quantity":-35,"inventory_management":null,"inventory_policy":"deny","barcode":null,"featured_media":{"alt":null,"id":22754414329955,"position":5,"preview_image":{"aspect_ratio":1.0,"height":1024,"width":1024,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/SP0120201-1_f18649f9-7c06-425b-801a-feda6bab8221.png?v=1694571563"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40728216830051,"title":"抗藍光 [10.9吋] - iPad Air 第5代","option1":"抗藍光 [10.9吋] - iPad Air 第5代","option2":null,"option3":null,"sku":"SP012570S","requires_shipping":true,"taxable":true,"featured_image":{"id":30394413908067,"product_id":4766864703587,"position":6,"created_at":"2023-09-13T10:19:23+08:00","updated_at":"2023-09-13T10:19:23+08:00","alt":null,"width":1024,"height":1024,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/ipad-screen-SP0125701.png?v=1694571563","variant_ids":[40728216830051]},"available":true,"name":"犀牛盾 iPad Air 耐衝擊平板螢幕保護貼 - 抗藍光 [10.9吋] - iPad Air 第5代","public_title":"抗藍光 [10.9吋] - iPad Air 第5代","options":["抗藍光 [10.9吋] - iPad Air 第5代"],"price":68000,"weight":453,"compare_at_price":null,"inventory_quantity":-1,"inventory_management":null,"inventory_policy":"deny","barcode":"4711366129644","featured_media":{"alt":null,"id":22754414362723,"position":6,"preview_image":{"aspect_ratio":1.0,"height":1024,"width":1024,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/ipad-screen-SP0125701.png?v=1694571563"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40728216862819,"title":"抗藍光 [10.9吋] - iPad Air 第4代","option1":"抗藍光 [10.9吋] - iPad Air 第4代","option2":null,"option3":null,"sku":"SP012570S","requires_shipping":true,"taxable":true,"featured_image":{"id":30394413940835,"product_id":4766864703587,"position":7,"created_at":"2023-09-13T10:19:23+08:00","updated_at":"2023-09-13T10:19:23+08:00","alt":null,"width":1024,"height":1024,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/ipad-screen-SP0125701_9e78330c-fdcd-417d-ac2d-252aba94299a.png?v=1694571563","variant_ids":[40728216862819]},"available":true,"name":"犀牛盾 iPad Air 耐衝擊平板螢幕保護貼 - 抗藍光 [10.9吋] - iPad Air 第4代","public_title":"抗藍光 [10.9吋] - iPad Air 第4代","options":["抗藍光 [10.9吋] - iPad Air 第4代"],"price":68000,"weight":453,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"4711366129644","featured_media":{"alt":null,"id":22754414395491,"position":7,"preview_image":{"aspect_ratio":1.0,"height":1024,"width":1024,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/ipad-screen-SP0125701_9e78330c-fdcd-417d-ac2d-252aba94299a.png?v=1694571563"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/SP0125701.png?v=1651629310","\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/SP0120201-1.png?v=1634699826","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ipad-screen-SP0125701_9e78330c-fdcd-417d-ac2d-252aba94299a.png?v=1694568592","\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/SP0125701_54616153-c4a2-45fd-94f3-97d1ea0fc795.png?v=1694571563","\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/SP0120201-1_f18649f9-7c06-425b-801a-feda6bab8221.png?v=1694571563","\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/ipad-screen-SP0125701.png?v=1694571563","\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/ipad-screen-SP0125701_9e78330c-fdcd-417d-ac2d-252aba94299a.png?v=1694571563"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/SP0125701.png?v=1651629310","options":["Title"],"media":[{"alt":null,"id":21465766625379,"position":1,"preview_image":{"aspect_ratio":1.0,"height":1024,"width":1024,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/SP0125701.png?v=1651629310"},"aspect_ratio":1.0,"height":1024,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/SP0125701.png?v=1651629310","width":1024},{"alt":null,"id":20924539928675,"position":2,"preview_image":{"aspect_ratio":1.0,"height":1024,"width":1024,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/SP0120201-1.png?v=1634699826"},"aspect_ratio":1.0,"height":1024,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/SP0120201-1.png?v=1634699826","width":1024},{"alt":null,"id":22754398208099,"position":3,"preview_image":{"aspect_ratio":1.0,"height":1024,"width":1024,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ipad-screen-SP0125701_9e78330c-fdcd-417d-ac2d-252aba94299a.png?v=1694568592"},"aspect_ratio":1.0,"height":1024,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ipad-screen-SP0125701_9e78330c-fdcd-417d-ac2d-252aba94299a.png?v=1694568592","width":1024},{"alt":null,"id":22754414297187,"position":4,"preview_image":{"aspect_ratio":1.0,"height":1024,"width":1024,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/SP0125701_54616153-c4a2-45fd-94f3-97d1ea0fc795.png?v=1694571563"},"aspect_ratio":1.0,"height":1024,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/SP0125701_54616153-c4a2-45fd-94f3-97d1ea0fc795.png?v=1694571563","width":1024},{"alt":null,"id":22754414329955,"position":5,"preview_image":{"aspect_ratio":1.0,"height":1024,"width":1024,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/SP0120201-1_f18649f9-7c06-425b-801a-feda6bab8221.png?v=1694571563"},"aspect_ratio":1.0,"height":1024,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/SP0120201-1_f18649f9-7c06-425b-801a-feda6bab8221.png?v=1694571563","width":1024},{"alt":null,"id":22754414362723,"position":6,"preview_image":{"aspect_ratio":1.0,"height":1024,"width":1024,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/ipad-screen-SP0125701.png?v=1694571563"},"aspect_ratio":1.0,"height":1024,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/ipad-screen-SP0125701.png?v=1694571563","width":1024},{"alt":null,"id":22754414395491,"position":7,"preview_image":{"aspect_ratio":1.0,"height":1024,"width":1024,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/ipad-screen-SP0125701_9e78330c-fdcd-417d-ac2d-252aba94299a.png?v=1694571563"},"aspect_ratio":1.0,"height":1024,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/ipad-screen-SP0125701_9e78330c-fdcd-417d-ac2d-252aba94299a.png?v=1694571563","width":1024}],"requires_selling_plan":false,"selling_plan_groups":[],"content":""}; $bumper = null; $variants = [{"id":40728216797283,"title":"正面 [10.9吋] - iPad Air 第5代","option1":"正面 [10.9吋] - iPad Air 第5代","option2":null,"option3":null,"sku":"SP0125701","requires_shipping":true,"taxable":true,"featured_image":{"id":30394413842531,"product_id":4766864703587,"position":4,"created_at":"2023-09-13T10:19:23+08:00","updated_at":"2023-09-13T10:19:23+08:00","alt":null,"width":1024,"height":1024,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/SP0125701_54616153-c4a2-45fd-94f3-97d1ea0fc795.png?v=1694571563","variant_ids":[40728216797283]},"available":true,"name":"犀牛盾 iPad Air 耐衝擊平板螢幕保護貼 - 正面 [10.9吋] - iPad Air 第5代","public_title":"正面 [10.9吋] - iPad Air 第5代","options":["正面 [10.9吋] - iPad Air 第5代"],"price":68000,"weight":590,"compare_at_price":null,"inventory_quantity":-69,"inventory_management":null,"inventory_policy":"deny","barcode":null,"featured_media":{"alt":null,"id":22754414297187,"position":4,"preview_image":{"aspect_ratio":1.0,"height":1024,"width":1024,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/SP0125701_54616153-c4a2-45fd-94f3-97d1ea0fc795.png?v=1694571563"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":39805581656163,"title":"正面 [10.9吋] - iPad Air 第4代","option1":"正面 [10.9吋] - iPad Air 第4代","option2":null,"option3":null,"sku":"SP0125701","requires_shipping":true,"taxable":true,"featured_image":{"id":30394413875299,"product_id":4766864703587,"position":5,"created_at":"2023-09-13T10:19:23+08:00","updated_at":"2023-09-13T10:19:23+08:00","alt":null,"width":1024,"height":1024,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/SP0120201-1_f18649f9-7c06-425b-801a-feda6bab8221.png?v=1694571563","variant_ids":[39805581656163]},"available":true,"name":"犀牛盾 iPad Air 耐衝擊平板螢幕保護貼 - 正面 [10.9吋] - iPad Air 第4代","public_title":"正面 [10.9吋] - iPad Air 第4代","options":["正面 [10.9吋] - iPad Air 第4代"],"price":68000,"weight":590,"compare_at_price":null,"inventory_quantity":-35,"inventory_management":null,"inventory_policy":"deny","barcode":null,"featured_media":{"alt":null,"id":22754414329955,"position":5,"preview_image":{"aspect_ratio":1.0,"height":1024,"width":1024,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/SP0120201-1_f18649f9-7c06-425b-801a-feda6bab8221.png?v=1694571563"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40728216830051,"title":"抗藍光 [10.9吋] - iPad Air 第5代","option1":"抗藍光 [10.9吋] - iPad Air 第5代","option2":null,"option3":null,"sku":"SP012570S","requires_shipping":true,"taxable":true,"featured_image":{"id":30394413908067,"product_id":4766864703587,"position":6,"created_at":"2023-09-13T10:19:23+08:00","updated_at":"2023-09-13T10:19:23+08:00","alt":null,"width":1024,"height":1024,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/ipad-screen-SP0125701.png?v=1694571563","variant_ids":[40728216830051]},"available":true,"name":"犀牛盾 iPad Air 耐衝擊平板螢幕保護貼 - 抗藍光 [10.9吋] - iPad Air 第5代","public_title":"抗藍光 [10.9吋] - iPad Air 第5代","options":["抗藍光 [10.9吋] - iPad Air 第5代"],"price":68000,"weight":453,"compare_at_price":null,"inventory_quantity":-1,"inventory_management":null,"inventory_policy":"deny","barcode":"4711366129644","featured_media":{"alt":null,"id":22754414362723,"position":6,"preview_image":{"aspect_ratio":1.0,"height":1024,"width":1024,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/ipad-screen-SP0125701.png?v=1694571563"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40728216862819,"title":"抗藍光 [10.9吋] - iPad Air 第4代","option1":"抗藍光 [10.9吋] - iPad Air 第4代","option2":null,"option3":null,"sku":"SP012570S","requires_shipping":true,"taxable":true,"featured_image":{"id":30394413940835,"product_id":4766864703587,"position":7,"created_at":"2023-09-13T10:19:23+08:00","updated_at":"2023-09-13T10:19:23+08:00","alt":null,"width":1024,"height":1024,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/ipad-screen-SP0125701_9e78330c-fdcd-417d-ac2d-252aba94299a.png?v=1694571563","variant_ids":[40728216862819]},"available":true,"name":"犀牛盾 iPad Air 耐衝擊平板螢幕保護貼 - 抗藍光 [10.9吋] - iPad Air 第4代","public_title":"抗藍光 [10.9吋] - iPad Air 第4代","options":["抗藍光 [10.9吋] - iPad Air 第4代"],"price":68000,"weight":453,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"4711366129644","featured_media":{"alt":null,"id":22754414395491,"position":7,"preview_image":{"aspect_ratio":1.0,"height":1024,"width":1024,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/ipad-screen-SP0125701_9e78330c-fdcd-417d-ac2d-252aba94299a.png?v=1694571563"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":40728216797283,"title":"正面 [10.9吋] - iPad Air 第5代","option1":"正面 [10.9吋] - iPad Air 第5代","option2":null,"option3":null,"sku":"SP0125701","requires_shipping":true,"taxable":true,"featured_image":{"id":30394413842531,"product_id":4766864703587,"position":4,"created_at":"2023-09-13T10:19:23+08:00","updated_at":"2023-09-13T10:19:23+08:00","alt":null,"width":1024,"height":1024,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/SP0125701_54616153-c4a2-45fd-94f3-97d1ea0fc795.png?v=1694571563","variant_ids":[40728216797283]},"available":true,"name":"犀牛盾 iPad Air 耐衝擊平板螢幕保護貼 - 正面 [10.9吋] - iPad Air 第5代","public_title":"正面 [10.9吋] - iPad Air 第5代","options":["正面 [10.9吋] - iPad Air 第5代"],"price":68000,"weight":590,"compare_at_price":null,"inventory_quantity":-69,"inventory_management":null,"inventory_policy":"deny","barcode":null,"featured_media":{"alt":null,"id":22754414297187,"position":4,"preview_image":{"aspect_ratio":1.0,"height":1024,"width":1024,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/SP0125701_54616153-c4a2-45fd-94f3-97d1ea0fc795.png?v=1694571563"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; 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 storedData = sessionStorage.getItem('sellingStatusData'); try { sellingStatusData = JSON.parse(storedData) } catch (error) { console.error('JSON.parse Error', error) sellingStatusData = null } $(document).ready(function() { handleSellingStatus($defaultVariant.sku, sellingStatusData); }); function handleSellingStatus(currentSku, sellingStatusData) { var sellingStatusElement = document.getElementById('selling-status') var addToCartButton = document.getElementById('AddToCart-product-template') var currentProductSkus = (currentSku.split('+')).map(sku => sku.replace(/-(.*)$/, '-')) if ($variants) { var withSellingStatusProduct = sellingStatusData.filter(product => { return currentProductSkus.find(sku => sku === product.sku) }); if (withSellingStatusProduct.length > 0) { var pendingproduct = withSellingStatusProduct.find(product => product.status === 'pending') const matchDate = withSellingStatusProduct[0].date sellingStatus = pendingproduct ? "缺貨中" : "預購完成出貨日:" + 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() handleSellingStatus(currentSku, sellingStatusData) }); });
// 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: "停產" }