Интеграция EU

by @leprestore
Интеграция EU
 Мы подготовили код для сайта https://leprestore.com/
<script> jQuery(document).ready(function() { jQuery('body').on('click', '[type="submit"]', function(){ var namea = jQuery('#customer_details').find('#billing_first_name').val(), nameb = jQuery('#customer_details').find('#billing_last_name').val(), name = namea + " " + nameb, email = jQuery('#customer_details').find('#billing_email').val(), country = jQuery('#customer_details').find('#select2-billing_country-container').text(), state = jQuery('#customer_details').find('#billing_state').val(), wheredid = jQuery('#customer_details').find('#billing_field_742').val(), phone = jQuery('#customer_details').find('#billing_phone').val(), comment = jQuery('#customer_details').find('#billing_field_236').val(), character = jQuery('#customer_details').find('#billing_field_556').val(), battletag = jQuery('#customer_details').find('#billing_field_594').val(), faction = jQuery('#customer_details').find('#select2-billing_field_355-container').text(), server = jQuery('#customer_details').find('#select2-billing_field_271-container').text(), sposob = jQuery('#customer_details').find('#select2-billing_field_807-container').text(), cifri = jQuery('#customer_details').find('#billing_field_298, #billing_field_17, #billing_field_181').val(), price =jQuery('[class="order-total"]').find('[class="woocommerce-Price-amount amount"]').text(); var count, article, goods = ''; var products = jQuery('[class*="cart_item"]'); for(var i = 0; i<products.length; i++){ article = jQuery(products[i]).find('td[class="product-name"]').text(); count = jQuery(products[i]).find('.product-quantity').text(); goods = goods + article + ' ' + count + ' '; } var visit = ''; if (typeof name == 'undefined') {name = '';} if (typeof email == 'undefined') {email = '';} if (typeof country == 'undefined') {country = '';} if (typeof state == 'undefined') {state = '';} if (typeof wheredid == 'undefined') {wheredid = '';} if (typeof phone == 'undefined') {phone = '';} if (typeof comment == 'undefined') {comment = '';} if (typeof character == 'undefined') {character = '';} if (typeof battletag == 'undefined') {battletag = '';} if (typeof faction == 'undefined') {faction = '';} if (typeof server == 'undefined') {server = '';} if (typeof sposob == 'undefined') {sposob = '';} if (typeof goods == 'undefined') {goods = '';} if (typeof price == 'undefined') {price = '';} if (typeof cifri == 'undefined') {cifri = '';} if (typeof WBK !== 'undefined') {visit = WBK.settings.visitId;} data = "name=" + encodeURIComponent(name) + "&phone=" + encodeURIComponent(phone) + "&email=" + encodeURIComponent(email) + "&country=" + encodeURIComponent(country) + "&state=" + encodeURIComponent(state) + "&comment=" + encodeURIComponent(comment) + "&character=" + encodeURIComponent(character) + "&battletag=" + encodeURIComponent(battletag) + "&faction=" + encodeURIComponent(faction) + "&sposob=" + encodeURIComponent(sposob) + "&server=" + encodeURIComponent(server) + "&goods=" + encodeURIComponent(goods) + "&price=" + encodeURIComponent(price) + "&cifri=" + encodeURIComponent(cifri) + "&visit=" + encodeURIComponent(visit) + "&url=" + encodeURIComponent(document.location.href); jQuery.ajax({ type: "GET", url: "https://sam.myenvy.ru/kr.uriy/dota/wof.php", data: data, cache: false, success: function(data) { console.log(data); } }); }) }) </script>
October 31, 2018