1jQuery(document).ready(function ($) { 2 if($("body").hasClass("term-powerlok")){ 3 $("#content-area .woocommerce-products-header").after('<div class="et_pb_button_module_wrapper et_pb_button_1_wrapper et_pb_button_alignment_left et_pb_module "> <a class="et_pb_button et_pb_button_1 et_pb_bg_layout_light" href="/selector/">PDU Selector</a></div>') 4 } 5 $(document).on('click', '.product #add_cart', function (e) { 6 e.preventDefault() 7 var id=$("#left-area .product.type-product").attr('id').split("-")[1] 8 console.log(id) 9 // window.location.href = "/cart/?add-to-cart="+id+"&quantity=1"; 10 jQuery.ajax({ 11 type: 'POST', 12 dataType: 'json', 13 url: ajaxurl, 14 data: { 15 action: "add_to_cart", 16 product_id: id, 17 }, 18 success: function (response) { 19 window.location.href = "/cart/"; 20 console.log('ok') 21 } 22 }) 23 }); 24 $(document).on('click', '.cus_add_to_cart .single_add_to_cart_button ', function (e) { 25 e.preventDefault() 26 var id=$(this).attr("value") 27 var qty=$(".cus_add_to_cart .cart .qty ").val() 28 console.log(id) 29 // window.location.href = "/cart/?add-to-cart="+id+"&quantity=1"; 30 jQuery.ajax({ 31 type: 'POST', 32 dataType: 'json', 33 url: ajaxurl, 34 data: { 35 action: "add_to_cart", 36 product_id: id, 37 qty: qty, 38 }, 39 success: function (response) { 40 window.location.href = "/cart/"; 41 console.log('ok') 42 } 43 }) 44 }); 45 $(document).on('click', '.cart_page.selector .form_container .table_item .button_container .new_search', function (e) { 46 $(this).toggleClass("active") 47 $(this).find("ul").slideToggle() 48 }) 49})
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.