Shopify.queue = []; $product = {"id":1432685871203,"title":"犀牛盾SolidSuit防摔背蓋手機殼 - iPhone 7\/8\/SE2\/SE3系列","handle":"iphone-8-solidsuit","description":"","published_at":"2018-10-07T00:16:04+08:00","created_at":"2018-09-26T00:27:03+08:00","vendor":"愛進化科技股份有限公司","type":"SolidSuit","tags":["20%","25%","30%","35%","40%","45%","45degree","50%","brand-Apple","dropdownCollection-SolidSuit","dropdownDevice-Apple iPhone 7\/8\/SE2\/SE3","dropdownDevice-Apple iPhone SE","iPhone 7\/8\/SE","iPhone 8","member","quickbuy","reseller","reseller-asus","Top50"],"price":73000,"price_min":73000,"price_max":98000,"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":12609878458467,"title":"橡木紋","option1":"橡木紋","option2":null,"option3":null,"sku":"SSA0105458","requires_shipping":true,"taxable":true,"featured_image":{"id":3963487846499,"product_id":1432685871203,"position":1,"created_at":"2019-09-22T01:29:56+08:00","updated_at":"2019-09-22T01:29:56+08:00","alt":null,"width":1500,"height":1500,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/oak_i8.png?v=1569086996","variant_ids":[12609878458467]},"available":true,"name":"犀牛盾SolidSuit防摔背蓋手機殼 - iPhone 7\/8\/SE2\/SE3系列 - 橡木紋","public_title":"橡木紋","options":["橡木紋"],"price":98000,"weight":100,"compare_at_price":null,"inventory_quantity":-1247,"inventory_management":null,"inventory_policy":"deny","barcode":null,"featured_media":{"alt":null,"id":967283671139,"position":1,"preview_image":{"aspect_ratio":1.0,"height":1500,"width":1500,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/oak_i8.png?v=1569086996"}}},{"id":12609878556771,"title":"皮革黑","option1":"皮革黑","option2":null,"option3":null,"sku":"SSA0105461","requires_shipping":true,"taxable":true,"featured_image":{"id":15007653134435,"product_id":1432685871203,"position":2,"created_at":"2020-05-20T17:04:14+08:00","updated_at":"2020-05-20T17:04:14+08:00","alt":null,"width":1500,"height":1500,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/leather_i8_ba302a8b-9b8c-40a9-9edb-b26dd7ba24e1.png?v=1589965454","variant_ids":[12609878556771]},"available":true,"name":"犀牛盾SolidSuit防摔背蓋手機殼 - iPhone 7\/8\/SE2\/SE3系列 - 皮革黑","public_title":"皮革黑","options":["皮革黑"],"price":98000,"weight":100,"compare_at_price":null,"inventory_quantity":-349,"inventory_management":null,"inventory_policy":"deny","barcode":null,"featured_media":{"alt":null,"id":7165074767971,"position":2,"preview_image":{"aspect_ratio":1.0,"height":1500,"width":1500,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/leather_i8_ba302a8b-9b8c-40a9-9edb-b26dd7ba24e1.png?v=1589965454"}}},{"id":12609878589539,"title":"碳纖維","option1":"碳纖維","option2":null,"option3":null,"sku":"SSA0105449","requires_shipping":true,"taxable":true,"featured_image":{"id":3963487191139,"product_id":1432685871203,"position":3,"created_at":"2019-09-22T01:29:56+08:00","updated_at":"2019-09-22T01:29:56+08:00","alt":null,"width":1500,"height":1500,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/0330-20_solidsuit-8-04.png?v=1569086996","variant_ids":[12609878589539]},"available":true,"name":"犀牛盾SolidSuit防摔背蓋手機殼 - iPhone 7\/8\/SE2\/SE3系列 - 碳纖維","public_title":"碳纖維","options":["碳纖維"],"price":83000,"weight":100,"compare_at_price":null,"inventory_quantity":-2520,"inventory_management":null,"inventory_policy":"deny","barcode":null,"featured_media":{"alt":null,"id":967283474531,"position":3,"preview_image":{"aspect_ratio":1.0,"height":1500,"width":1500,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/0330-20_solidsuit-8-04.png?v=1569086996"}}},{"id":12609878622307,"title":"經典黑","option1":"經典黑","option2":null,"option3":null,"sku":"SSA0105452","requires_shipping":true,"taxable":true,"featured_image":{"id":3963486994531,"product_id":1432685871203,"position":4,"created_at":"2019-09-22T01:29:56+08:00","updated_at":"2019-09-22T01:29:56+08:00","alt":null,"width":1500,"height":1500,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/0330-20_solidsuit-8-02.png?v=1569086996","variant_ids":[12609878622307]},"available":true,"name":"犀牛盾SolidSuit防摔背蓋手機殼 - iPhone 7\/8\/SE2\/SE3系列 - 經典黑","public_title":"經典黑","options":["經典黑"],"price":73000,"weight":100,"compare_at_price":null,"inventory_quantity":-4021,"inventory_management":null,"inventory_policy":"deny","barcode":null,"featured_media":{"alt":null,"id":967283376227,"position":4,"preview_image":{"aspect_ratio":1.0,"height":1500,"width":1500,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/0330-20_solidsuit-8-02.png?v=1569086996"}}},{"id":12609878655075,"title":"櫻花粉","option1":"櫻花粉","option2":null,"option3":null,"sku":"SSA0105457","requires_shipping":true,"taxable":true,"featured_image":{"id":15007653167203,"product_id":1432685871203,"position":5,"created_at":"2020-05-20T17:04:14+08:00","updated_at":"2020-05-20T17:04:14+08:00","alt":null,"width":600,"height":600,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/SSA0108457_grande_grande_8906581c-2cf0-4034-b646-50502f963daa.png?v=1589965454","variant_ids":[12609878655075]},"available":true,"name":"犀牛盾SolidSuit防摔背蓋手機殼 - iPhone 7\/8\/SE2\/SE3系列 - 櫻花粉","public_title":"櫻花粉","options":["櫻花粉"],"price":73000,"weight":100,"compare_at_price":null,"inventory_quantity":-1216,"inventory_management":null,"inventory_policy":"deny","barcode":null,"featured_media":{"alt":null,"id":7165074800739,"position":5,"preview_image":{"aspect_ratio":1.0,"height":600,"width":600,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/SSA0108457_grande_grande_8906581c-2cf0-4034-b646-50502f963daa.png?v=1589965454"}}},{"id":12609878720611,"title":"經典白","option1":"經典白","option2":null,"option3":null,"sku":"SSA0105453","requires_shipping":true,"taxable":true,"featured_image":{"id":3963486928995,"product_id":1432685871203,"position":6,"created_at":"2019-09-22T01:29:56+08:00","updated_at":"2019-09-22T01:29:56+08:00","alt":null,"width":1500,"height":1500,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/0330-20_solidsuit-8-01.png?v=1569086996","variant_ids":[12609878720611]},"available":true,"name":"犀牛盾SolidSuit防摔背蓋手機殼 - iPhone 7\/8\/SE2\/SE3系列 - 經典白","public_title":"經典白","options":["經典白"],"price":73000,"weight":100,"compare_at_price":null,"inventory_quantity":-762,"inventory_management":null,"inventory_policy":"deny","barcode":null,"featured_media":{"alt":null,"id":967283343459,"position":6,"preview_image":{"aspect_ratio":1.0,"height":1500,"width":1500,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/0330-20_solidsuit-8-01.png?v=1569086996"}}},{"id":12609878786147,"title":"髮絲紋","option1":"髮絲紋","option2":null,"option3":null,"sku":"SSA0105468","requires_shipping":true,"taxable":true,"featured_image":{"id":28709353783395,"product_id":1432685871203,"position":12,"created_at":"2021-12-08T17:39:28+08:00","updated_at":"2021-12-08T17:39:28+08:00","alt":null,"width":1500,"height":1500,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/0330-20_solidsuit-8-05_70d48cc7-b2ec-4fc2-8ecf-f9727161eddf.png?v=1638956368","variant_ids":[12609878786147]},"available":true,"name":"犀牛盾SolidSuit防摔背蓋手機殼 - iPhone 7\/8\/SE2\/SE3系列 - 髮絲紋","public_title":"髮絲紋","options":["髮絲紋"],"price":98000,"weight":100,"compare_at_price":null,"inventory_quantity":-678,"inventory_management":null,"inventory_policy":"deny","barcode":null,"featured_media":{"alt":null,"id":21032624848995,"position":12,"preview_image":{"aspect_ratio":1.0,"height":1500,"width":1500,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/0330-20_solidsuit-8-05_70d48cc7-b2ec-4fc2-8ecf-f9727161eddf.png?v=1638956368"}}},{"id":39537943937123,"title":"海軍藍","option1":"海軍藍","option2":null,"option3":null,"sku":"SSA01054J5","requires_shipping":true,"taxable":true,"featured_image":{"id":28519084195939,"product_id":1432685871203,"position":10,"created_at":"2021-09-06T11:35:22+08:00","updated_at":"2021-09-06T11:35:22+08:00","alt":null,"width":1999,"height":1500,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/new-bumper-back-45degree-SSA01054J5.png?v=1630899322","variant_ids":[39537943937123]},"available":true,"name":"犀牛盾SolidSuit防摔背蓋手機殼 - iPhone 7\/8\/SE2\/SE3系列 - 海軍藍","public_title":"海軍藍","options":["海軍藍"],"price":73000,"weight":100,"compare_at_price":null,"inventory_quantity":-282,"inventory_management":null,"inventory_policy":"deny","barcode":null,"featured_media":{"alt":null,"id":20831977668707,"position":10,"preview_image":{"aspect_ratio":1.333,"height":1500,"width":1999,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/new-bumper-back-45degree-SSA01054J5.png?v=1630899322"}}},{"id":39533871038563,"title":"暗夜綠","option1":"暗夜綠","option2":null,"option3":null,"sku":"SSA01054K8","requires_shipping":true,"taxable":true,"featured_image":{"id":28509377626211,"product_id":1432685871203,"position":11,"created_at":"2021-09-02T17:20:49+08:00","updated_at":"2021-09-02T17:20:49+08:00","alt":null,"width":1999,"height":1500,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/SSA-iPhone_8_Space_Gray-7_8__Back45_SSA_Dark_Teal-Dark_Teal-Button_dcee7333-0f24-4f12-a4a0-98c7fef8a9ed.png?v=1630574449","variant_ids":[39533871038563]},"available":true,"name":"犀牛盾SolidSuit防摔背蓋手機殼 - iPhone 7\/8\/SE2\/SE3系列 - 暗夜綠","public_title":"暗夜綠","options":["暗夜綠"],"price":73000,"weight":100,"compare_at_price":null,"inventory_quantity":-176,"inventory_management":null,"inventory_policy":"deny","barcode":null,"featured_media":{"alt":null,"id":20821808939107,"position":11,"preview_image":{"aspect_ratio":1.333,"height":1500,"width":1999,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/SSA-iPhone_8_Space_Gray-7_8__Back45_SSA_Dark_Teal-Dark_Teal-Button_dcee7333-0f24-4f12-a4a0-98c7fef8a9ed.png?v=1630574449"}}}],"images":["\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/oak_i8.png?v=1569086996","\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/leather_i8_ba302a8b-9b8c-40a9-9edb-b26dd7ba24e1.png?v=1589965454","\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/0330-20_solidsuit-8-04.png?v=1569086996","\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/0330-20_solidsuit-8-02.png?v=1569086996","\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/SSA0108457_grande_grande_8906581c-2cf0-4034-b646-50502f963daa.png?v=1589965454","\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/0330-20_solidsuit-8-01.png?v=1569086996","\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/0330-20_solidsuit-8-06_5b435d4d-1231-4070-a7bb-151e2dd61abf.png?v=1569086996","\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/iPhone7_Black_8e5fae5f-257a-48b5-9710-393c732d2f65.png?v=1624932496","\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/iPhone7_Black_505bc9c9-62b4-468e-a5c7-7ab0dc5f3aa6.png?v=1624932496","\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/new-bumper-back-45degree-SSA01054J5.png?v=1630899322","\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/SSA-iPhone_8_Space_Gray-7_8__Back45_SSA_Dark_Teal-Dark_Teal-Button_dcee7333-0f24-4f12-a4a0-98c7fef8a9ed.png?v=1630574449","\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/0330-20_solidsuit-8-05_70d48cc7-b2ec-4fc2-8ecf-f9727161eddf.png?v=1638956368"],"featured_image":"\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/oak_i8.png?v=1569086996","options":["Color"],"media":[{"alt":null,"id":967283671139,"position":1,"preview_image":{"aspect_ratio":1.0,"height":1500,"width":1500,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/oak_i8.png?v=1569086996"},"aspect_ratio":1.0,"height":1500,"media_type":"image","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/oak_i8.png?v=1569086996","width":1500},{"alt":null,"id":7165074767971,"position":2,"preview_image":{"aspect_ratio":1.0,"height":1500,"width":1500,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/leather_i8_ba302a8b-9b8c-40a9-9edb-b26dd7ba24e1.png?v=1589965454"},"aspect_ratio":1.0,"height":1500,"media_type":"image","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/leather_i8_ba302a8b-9b8c-40a9-9edb-b26dd7ba24e1.png?v=1589965454","width":1500},{"alt":null,"id":967283474531,"position":3,"preview_image":{"aspect_ratio":1.0,"height":1500,"width":1500,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/0330-20_solidsuit-8-04.png?v=1569086996"},"aspect_ratio":1.0,"height":1500,"media_type":"image","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/0330-20_solidsuit-8-04.png?v=1569086996","width":1500},{"alt":null,"id":967283376227,"position":4,"preview_image":{"aspect_ratio":1.0,"height":1500,"width":1500,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/0330-20_solidsuit-8-02.png?v=1569086996"},"aspect_ratio":1.0,"height":1500,"media_type":"image","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/0330-20_solidsuit-8-02.png?v=1569086996","width":1500},{"alt":null,"id":7165074800739,"position":5,"preview_image":{"aspect_ratio":1.0,"height":600,"width":600,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/SSA0108457_grande_grande_8906581c-2cf0-4034-b646-50502f963daa.png?v=1589965454"},"aspect_ratio":1.0,"height":600,"media_type":"image","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/SSA0108457_grande_grande_8906581c-2cf0-4034-b646-50502f963daa.png?v=1589965454","width":600},{"alt":null,"id":967283343459,"position":6,"preview_image":{"aspect_ratio":1.0,"height":1500,"width":1500,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/0330-20_solidsuit-8-01.png?v=1569086996"},"aspect_ratio":1.0,"height":1500,"media_type":"image","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/0330-20_solidsuit-8-01.png?v=1569086996","width":1500},{"alt":null,"id":967283540067,"position":7,"preview_image":{"aspect_ratio":1.0,"height":1500,"width":1500,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/0330-20_solidsuit-8-06_5b435d4d-1231-4070-a7bb-151e2dd61abf.png?v=1569086996"},"aspect_ratio":1.0,"height":1500,"media_type":"image","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/0330-20_solidsuit-8-06_5b435d4d-1231-4070-a7bb-151e2dd61abf.png?v=1569086996","width":1500},{"alt":null,"id":20664829214819,"position":8,"preview_image":{"aspect_ratio":1.333,"height":1500,"width":1999,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/iPhone7_Black_8e5fae5f-257a-48b5-9710-393c732d2f65.png?v=1624932496"},"aspect_ratio":1.333,"height":1500,"media_type":"image","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/iPhone7_Black_8e5fae5f-257a-48b5-9710-393c732d2f65.png?v=1624932496","width":1999},{"alt":null,"id":20664829247587,"position":9,"preview_image":{"aspect_ratio":1.333,"height":1500,"width":1999,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/iPhone7_Black_505bc9c9-62b4-468e-a5c7-7ab0dc5f3aa6.png?v=1624932496"},"aspect_ratio":1.333,"height":1500,"media_type":"image","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/iPhone7_Black_505bc9c9-62b4-468e-a5c7-7ab0dc5f3aa6.png?v=1624932496","width":1999},{"alt":null,"id":20831977668707,"position":10,"preview_image":{"aspect_ratio":1.333,"height":1500,"width":1999,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/new-bumper-back-45degree-SSA01054J5.png?v=1630899322"},"aspect_ratio":1.333,"height":1500,"media_type":"image","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/new-bumper-back-45degree-SSA01054J5.png?v=1630899322","width":1999},{"alt":null,"id":20821808939107,"position":11,"preview_image":{"aspect_ratio":1.333,"height":1500,"width":1999,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/SSA-iPhone_8_Space_Gray-7_8__Back45_SSA_Dark_Teal-Dark_Teal-Button_dcee7333-0f24-4f12-a4a0-98c7fef8a9ed.png?v=1630574449"},"aspect_ratio":1.333,"height":1500,"media_type":"image","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/SSA-iPhone_8_Space_Gray-7_8__Back45_SSA_Dark_Teal-Dark_Teal-Button_dcee7333-0f24-4f12-a4a0-98c7fef8a9ed.png?v=1630574449","width":1999},{"alt":null,"id":21032624848995,"position":12,"preview_image":{"aspect_ratio":1.0,"height":1500,"width":1500,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/0330-20_solidsuit-8-05_70d48cc7-b2ec-4fc2-8ecf-f9727161eddf.png?v=1638956368"},"aspect_ratio":1.0,"height":1500,"media_type":"image","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/1082\/7110\/products\/0330-20_solidsuit-8-05_70d48cc7-b2ec-4fc2-8ecf-f9727161eddf.png?v=1638956368","width":1500}],"content":""}; $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: "停產" }