Shopify.queue = []; $product = {"id":9527803722,"title":"Lightning to USB-A 充電線","handle":"lightning-cable","description":"\u003ch1 style=\"text-align: left;\"\u003e蘋果原廠MFi認證 Lightning to USB-A Cable 充電線\u003c\/h1\u003e\n\u003cdiv\u003e\u003cstrong\u003e1.2米編織充電線 建議售價:550元\u003cbr\u003e3米編織充電線 建議售價:790元\u003cbr\u003e\u003c\/strong\u003e\u003c\/div\u003e\n\u003cdiv\u003e1米充電線 建議售價:280元 \u003cbr\u003e2米充電線 建議售價:340元 \u003cbr\u003e3米充電線 建議售價:400元\u003c\/div\u003e\n\u003cdiv\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003c\/div\u003e\n\u003ch2\u003e蘋果原廠MFi認證 1.2米 \/ 3米編織線\u003c\/h2\u003e\n\u003cdiv style=\"text-align: left;\"\u003e■ Apple Mfi 認證\u003c\/div\u003e\n\u003cdiv style=\"text-align: left;\"\u003e■ 適用犀牛盾全系列手機殼\u003c\/div\u003e\n\u003cdiv style=\"text-align: left;\"\u003e■ 高強度尼龍編織技術,耐磨、不打結,且降低破損折斷機率,1條抵5條\u003c\/div\u003e\n\u003cdiv style=\"text-align: left;\"\u003e■ 增強雙尾連接處,耐拔插\u003c\/div\u003e\n\u003cdiv style=\"text-align: left;\"\u003e■ 陽極氧化鋁外殼設計\u003c\/div\u003e\n\u003cdiv style=\"text-align: left;\"\u003e■ 可供高達12 W(5 V \/ 2.4 A)的輸出功率\u003c\/div\u003e\n\u003cdiv style=\"text-align: left;\"\u003e■ 附贈束線帶,方便收納\u003c\/div\u003e\n\u003cdiv style=\"text-align: left;\"\u003e■ 支援USB 2.0數據傳輸,速度高達480 Mbps\u003c\/div\u003e\n\u003cdiv style=\"text-align: left;\"\u003e■ 顏色 - 鐵黑\u003c\/div\u003e\n\u003cdiv style=\"text-align: left;\"\u003e■ 規格:1.2M (3.9ft) \/ 3m(9.8ft)\u003c\/div\u003e\n\u003cdiv style=\"text-align: left;\"\u003e■ 建議售價:$550元 \/ $790元\u003c\/div\u003e\n\u003cdiv\u003e\u003c\/div\u003e","published_at":"2018-07-05T19:50:57+08:00","created_at":"2016-11-18T16:29:21+08:00","vendor":"犀牛盾有限公司","type":"行動週邊","tags":["20%","25%","30%","35%","40%","45%","50%","member","reseller","reseller-asus","Top50"],"price":18200,"price_min":18200,"price_max":51000,"available":true,"price_varies":true,"compare_at_price":null,"compare_at_price_min":0,"compare_at_price_max":0,"compare_at_price_varies":false,"variants":[{"id":12268469715060,"title":"1.2公尺編織線","option1":"1.2公尺編織線","option2":null,"option3":null,"sku":"MA0191","requires_shipping":true,"taxable":true,"featured_image":{"id":14696702574691,"product_id":9527803722,"position":10,"created_at":"2020-04-14T12:15:57+08:00","updated_at":"2020-04-14T12:16:10+08:00","alt":null,"width":2000,"height":2000,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/USB-A.png?v=1586837770","variant_ids":[12268469715060,39524902731875]},"available":true,"name":"Lightning to USB-A 充電線 - 1.2公尺編織線","public_title":"1.2公尺編織線","options":["1.2公尺編織線"],"price":33000,"weight":0,"compare_at_price":null,"inventory_quantity":-6141,"inventory_management":null,"inventory_policy":"deny","barcode":"4715517679224","featured_media":{"alt":null,"id":6853932548195,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/USB-A.png?v=1586837770"}}},{"id":39524902731875,"title":"3公尺編織線","option1":"3公尺編織線","option2":null,"option3":null,"sku":"MA01A7","requires_shipping":true,"taxable":true,"featured_image":{"id":14696702574691,"product_id":9527803722,"position":10,"created_at":"2020-04-14T12:15:57+08:00","updated_at":"2020-04-14T12:16:10+08:00","alt":null,"width":2000,"height":2000,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/USB-A.png?v=1586837770","variant_ids":[12268469715060,39524902731875]},"available":true,"name":"Lightning to USB-A 充電線 - 3公尺編織線","public_title":"3公尺編織線","options":["3公尺編織線"],"price":51000,"weight":0,"compare_at_price":null,"inventory_quantity":-324,"inventory_management":null,"inventory_policy":"deny","barcode":"","featured_media":{"alt":null,"id":6853932548195,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/USB-A.png?v=1586837770"}}},{"id":846002094100,"title":"1公尺充電線","option1":"1公尺充電線","option2":null,"option3":null,"sku":"MA0199","requires_shipping":true,"taxable":true,"featured_image":{"id":14687415795811,"product_id":9527803722,"position":6,"created_at":"2020-04-13T15:20:15+08:00","updated_at":"2020-04-14T12:16:10+08:00","alt":null,"width":2000,"height":2000,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/MA0199-1.png?v=1586837770","variant_ids":[846002094100,12755945324643]},"available":true,"name":"Lightning to USB-A 充電線 - 1公尺充電線","public_title":"1公尺充電線","options":["1公尺充電線"],"price":18200,"weight":0,"compare_at_price":null,"inventory_quantity":916987,"inventory_management":null,"inventory_policy":"deny","barcode":"4715517674007","featured_media":{"alt":null,"id":6844641247331,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/MA0199-1.png?v=1586837770"}}},{"id":846002126868,"title":"2公尺充電線","option1":"2公尺充電線","option2":null,"option3":null,"sku":"MA0198","requires_shipping":true,"taxable":true,"featured_image":{"id":14687415894115,"product_id":9527803722,"position":7,"created_at":"2020-04-13T15:20:15+08:00","updated_at":"2020-04-14T12:16:10+08:00","alt":null,"width":2000,"height":2000,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/MA0198-1.png?v=1586837770","variant_ids":[846002126868]},"available":true,"name":"Lightning to USB-A 充電線 - 2公尺充電線","public_title":"2公尺充電線","options":["2公尺充電線"],"price":20000,"weight":0,"compare_at_price":null,"inventory_quantity":99951854,"inventory_management":null,"inventory_policy":"continue","barcode":"","featured_media":{"alt":null,"id":6844641345635,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/MA0198-1.png?v=1586837770"}}},{"id":12755945324643,"title":"3公尺充電線 (售罄,不再販售)","option1":"3公尺充電線 (售罄,不再販售)","option2":null,"option3":null,"sku":"MA0197","requires_shipping":true,"taxable":true,"featured_image":{"id":14687415795811,"product_id":9527803722,"position":6,"created_at":"2020-04-13T15:20:15+08:00","updated_at":"2020-04-14T12:16:10+08:00","alt":null,"width":2000,"height":2000,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/MA0199-1.png?v=1586837770","variant_ids":[846002094100,12755945324643]},"available":false,"name":"Lightning to USB-A 充電線 - 3公尺充電線 (售罄,不再販售)","public_title":"3公尺充電線 (售罄,不再販售)","options":["3公尺充電線 (售罄,不再販售)"],"price":22000,"weight":0,"compare_at_price":null,"inventory_quantity":-10001,"inventory_management":"shopify","inventory_policy":"deny","barcode":"","featured_media":{"alt":null,"id":6844641247331,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/MA0199-1.png?v=1586837770"}}}],"images":["\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/lightning-cable.jpg?v=1586837770","\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/cable_1M.jpg?v=1586837770","\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/cable_2M.jpg?v=1586837770","\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/cable_3M.jpg?v=1586837770","\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/pr_cable-2m.png?v=1586837770","\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/MA0199-1.png?v=1586837770","\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/MA0198-1.png?v=1586837770","\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/MA0199-2.png?v=1586837770","\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/MA0198-2.png?v=1586837770","\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/USB-A.png?v=1586837770"],"featured_image":"\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/lightning-cable.jpg?v=1586837770","options":["Length"],"media":[{"alt":null,"id":181821931619,"position":1,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/lightning-cable.jpg?v=1586837770"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/lightning-cable.jpg?v=1586837770","width":1000},{"alt":null,"id":181821964387,"position":2,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/cable_1M.jpg?v=1586837770"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/cable_1M.jpg?v=1586837770","width":1000},{"alt":null,"id":181821997155,"position":3,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/cable_2M.jpg?v=1586837770"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/cable_2M.jpg?v=1586837770","width":1000},{"alt":null,"id":181822029923,"position":4,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/cable_3M.jpg?v=1586837770"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/cable_3M.jpg?v=1586837770","width":1000},{"alt":null,"id":181822160995,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/pr_cable-2m.png?v=1586837770"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/pr_cable-2m.png?v=1586837770","width":2000},{"alt":null,"id":6844641247331,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/MA0199-1.png?v=1586837770"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/MA0199-1.png?v=1586837770","width":2000},{"alt":null,"id":6844641345635,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/MA0198-1.png?v=1586837770"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/MA0198-1.png?v=1586837770","width":2000},{"alt":null,"id":6844641280099,"position":8,"preview_image":{"aspect_ratio":1.0,"height":750,"width":750,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/MA0199-2.png?v=1586837770"},"aspect_ratio":1.0,"height":750,"media_type":"image","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/MA0199-2.png?v=1586837770","width":750},{"alt":null,"id":6844641312867,"position":9,"preview_image":{"aspect_ratio":1.0,"height":750,"width":750,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/MA0198-2.png?v=1586837770"},"aspect_ratio":1.0,"height":750,"media_type":"image","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/MA0198-2.png?v=1586837770","width":750},{"alt":null,"id":6853932548195,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/USB-A.png?v=1586837770"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/USB-A.png?v=1586837770","width":2000}],"content":"\u003ch1 style=\"text-align: left;\"\u003e蘋果原廠MFi認證 Lightning to USB-A Cable 充電線\u003c\/h1\u003e\n\u003cdiv\u003e\u003cstrong\u003e1.2米編織充電線 建議售價:550元\u003cbr\u003e3米編織充電線 建議售價:790元\u003cbr\u003e\u003c\/strong\u003e\u003c\/div\u003e\n\u003cdiv\u003e1米充電線 建議售價:280元 \u003cbr\u003e2米充電線 建議售價:340元 \u003cbr\u003e3米充電線 建議售價:400元\u003c\/div\u003e\n\u003cdiv\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003c\/div\u003e\n\u003ch2\u003e蘋果原廠MFi認證 1.2米 \/ 3米編織線\u003c\/h2\u003e\n\u003cdiv style=\"text-align: left;\"\u003e■ Apple Mfi 認證\u003c\/div\u003e\n\u003cdiv style=\"text-align: left;\"\u003e■ 適用犀牛盾全系列手機殼\u003c\/div\u003e\n\u003cdiv style=\"text-align: left;\"\u003e■ 高強度尼龍編織技術,耐磨、不打結,且降低破損折斷機率,1條抵5條\u003c\/div\u003e\n\u003cdiv style=\"text-align: left;\"\u003e■ 增強雙尾連接處,耐拔插\u003c\/div\u003e\n\u003cdiv style=\"text-align: left;\"\u003e■ 陽極氧化鋁外殼設計\u003c\/div\u003e\n\u003cdiv style=\"text-align: left;\"\u003e■ 可供高達12 W(5 V \/ 2.4 A)的輸出功率\u003c\/div\u003e\n\u003cdiv style=\"text-align: left;\"\u003e■ 附贈束線帶,方便收納\u003c\/div\u003e\n\u003cdiv style=\"text-align: left;\"\u003e■ 支援USB 2.0數據傳輸,速度高達480 Mbps\u003c\/div\u003e\n\u003cdiv style=\"text-align: left;\"\u003e■ 顏色 - 鐵黑\u003c\/div\u003e\n\u003cdiv style=\"text-align: left;\"\u003e■ 規格:1.2M (3.9ft) \/ 3m(9.8ft)\u003c\/div\u003e\n\u003cdiv style=\"text-align: left;\"\u003e■ 建議售價:$550元 \/ $790元\u003c\/div\u003e\n\u003cdiv\u003e\u003c\/div\u003e"}; $bumper = null 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); }); } }); } $(function() { // switch device $('#select-device').on('change', function() { window.location.href = $(this).val(); }); // listen quantity changed $('input[name=quantity]').on('change', function() { var quantity = $(this).val(); }); // checkbox action $("input:checkbox").on('click', function() { // in the handler, 'this' refers to the box clicked on var $box = $(this); if ($box.is(":checked")) { // the name of the box is retrieved using the .attr() method // as it is assumed and expected to be immutable var group = "input:checkbox[name='" + $box.attr("name") + "']"; // the checked state of the group/box on the other hand will change // and the current value is retrieved using .prop() method $(group).prop("checked", false); $box.prop("checked", true); } else { $box.prop("checked", false); } }); // add to cart $("#AddToCart-product-template").click(function(e){ var elem; var addition = {}; Shopify.queue = []; e.preventDefault(); // elem = $(this); // $(elem).prop("disabled", true); var original_variant_id = $('.product-form').serialize().split('&')[0].split('=')[1]; var original_variant_quantity = $('.product-form').serialize().split('&')[1].split('=')[1]; addition.id = original_variant_id; addition.quantity = original_variant_quantity; Shopify.queue.push(addition); $.each($("input[name^='recommend[']:checked"), function(i, v) { var addition = {}; var name = $(this).attr('name'); var quantity = $('select[name="' + name + '"]').val(); addition.id = $(this).val(); addition.quantity = quantity; Shopify.queue.push(addition); }); Shopify.moveAlong(); }); Shopify.moveAlong = function() { // If we still have requests in the queue, let's process the next one. // console.log(Shopify.queue); if (Shopify.queue.length) { var request = Shopify.queue.shift(); Shopify.addItem(request.id, request.quantity, Shopify.moveAlong); } // If the queue is empty, take care of the main item else { $.getJSON('/cart.js', function(cart) { $('#CartCount').removeClass('hide'); $('#item-count').text(cart.item_count); toastr.options = { "closeButton": false, "debug": false, "newestOnTop": false, "progressBar": false, "positionClass": "toast-bottom-right", "preventDuplicates": false, "onclick": null, "showDuration": "300", "hideDuration": "1000", "timeOut": "5000", "extendedTimeOut": "1000", "showEasing": "swing", "hideEasing": "linear", "showMethod": "fadeIn", "hideMethod": "fadeOut" }; toastr["success"]("成功加入購物車"); }); } }; });
// 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: "停產" }