Некодим© 2020-2026 Некодим
Готовые модификации для вашего сайта. Улучшайте функциональность и дизайн без программирования.
lang: window.t_delivery__lang.lang,
2817 var tCityFromGeo = sessionStorage.getItem('tCityFromGeo');2818 if (tCityFromGeo !== null) {2820 onDone(JSON.parse(tCityFromGeo));2828 var allRecords = document.getElementById('allrecords');2829 var tildaRootZone = allRecords.getAttribute('data-tilda-root-zone');2830 if (tildaRootZone) {2831 dataObj.rz = tildaRootZone;2833 dataObj = JSON.stringify(dataObj);2835 var xhr = new XMLHttpRequest();2836 xhr.onload = function () {2837 if (xhr.readyState === xhr.DONE && xhr.status === 200) {2839 sessionStorage.setItem('tCityFromGeo', xhr.responseText);2841 onDone(JSON.parse(xhr.responseText));2845 if (typeof onFail === 'function') {2846 const onError = function (error) {2847 xhr.isTimeout = error.type === 'timeout';2850 xhr.ontimeout = onError;2851 xhr.onerror = onError;2855 if (!that.endpointDelivery) {2856 that.endpointDelivery = '.tildacdn.com';2858 xhr.open('POST', 'https://geoserv' + that.endpointDelivery + '/api/detect-city/');2859 xhr.timeout = 30000;2863 /* Getting the payment types from the form and then saving them to the form */2864 getPayTypes: function () {2865 var customDelivery = document.getElementById('customdelivery');2868 if (customDelivery) {2869 paytypes = customDelivery.getAttribute('data-paytypes');2872 if (!customDelivery) return null;2876 paytypes = JSON.parse(paytypes);2882 if (!paytypes || (typeof paytypes != 'object' && typeof paytypes != 'function')) {2885 var paymentsystem = document.querySelectorAll('.t706 input[name=paymentsystem]');2886 Array.prototype.forEach.call(paymentsystem, function (el) {2887 if (el.value === 'cash') {2888 paytypes.cash = 'y';2889 } else if (el.value === 'banktransfer') {2890 paytypes.banktransfer = 'y';2892 paytypes.card = 'y';2896 if (!paytypes.card && !paytypes.cash && !paytypes.banktransfer) {2897 var paytype = document.querySelector('.t706').getAttribute('data-payment-system');2898 if (paytype == 'cash') {2899 paytypes.cash = 'y';2900 } else if (paytype == 'banktransfer') {