1function sendStockAlert(form = null){ 2 let dataForm = jQuery('form#product_addtocart_form'); 3 if(form) { 4 dataForm = jQuery('#' + form); 5 } 6 7 if (dataForm.find("input[name='email']").val()) { 8 var param = dataForm.serialize(); 9 $.ajax({ 10 url: `${BASE_URL}stockalert/ajax/subscribe`, 11 data: param, 12 type: "POST", 13 beforeSend: function () { 14 jQuery('body').trigger('processStart'); // start loader 15 } 16 }).done(function (data) { 17 switch(`${STORE_CODE}`) { 18 case 'es': 19 var successText = 'Te avisaremos'; 20 break; 21 case 'uk': 22 var successText = 'We will let you know'; 23 break; 24 case 'default': 25 var successText = 'Wir geben dir Bescheid'; 26 break; 27 default: 28 var successText = 'We will let you know'; 29 } 30 jQuery('body').trigger('processStop'); 31 dataForm.find('#stock-alert-subscribe-btn').addClass('success') 32 dataForm.find('#stock-alert-subscribe-btn .button-text').text(successText) 33 dataForm.find("#name").val(""); 34 dataForm.find('.fa-envelope').removeClass('fa-envelope').addClass('fa-check') 35 window.dispatchEvent(new CustomEvent("reload-customer-section-data")); 36 return true; 37 }); 38 } 39}
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.