1/** 2 * Shipping Address 3 * 4 * @author motionSeed <[email protected]> 5 * @copyright 2018 motionSeed. All rights reserved. 6 * @license https://www.motionseed.com/en/license-module.html 7 */ 8var _0x80bf = ['replace', '[0-9]', '[A-Za-z]', 'append', 'error-zipcode', 'ajax', 'post', 'api-url', 'parse', 'success', '.select-address-dest', 'dest', 'modal', 'updateCart', 'dataset', 'error', 'slideDown', '#select-address-modal', '#select-address-modal\x20.alert', 'hide', '#submitShippingAddress', 'empty', 'preventDefault', '#select-address-address', 'length', 'address', 'val', '#select-address-country\x20option:selected', 'data', 'zipcode']; 9(function(_0x5946ac, _0x43a53a) { var _0x40e78e = function(_0x3a7163) { while (--_0x3a7163) { _0x5946ac['push'](_0x5946ac['shift']()); } }; 10 _0x40e78e(++_0x43a53a); }(_0x80bf, 0x6b)); 11var _0xf80b = function(_0x33a896, _0x126162) { _0x33a896 = _0x33a896 - 0x0; var _0x5db9b9 = _0x80bf[_0x33a896]; return _0x5db9b9; }; 12(function(_0x83e39f) { 13 _0x83e39f(function() { 14 _0x83e39f(_0xf80b('0x0'))['on']('show.bs.modal', function(_0x1a9085) { _0x83e39f(_0xf80b('0x1'))[_0xf80b('0x2')]()['empty'](); }); 15 _0x83e39f(_0xf80b('0x3'))['on']('click', function(_0x33f3e9) { 16 var _0x462be2 = _0x83e39f(this); 17 var _0x3d1dbb = _0x83e39f(_0xf80b('0x1'))[_0xf80b('0x2')]()[_0xf80b('0x4')](); 18 _0x462be2['blur'](); 19 _0x33f3e9[_0xf80b('0x5')](); 20 var _0x19258a = {}; 21 if (_0x83e39f(_0xf80b('0x6'))[_0xf80b('0x7')]) { _0x19258a[_0xf80b('0x8')] = _0x83e39f(_0xf80b('0x6'))[_0xf80b('0x9')](); } else { var _0x1f06f1 = _0x83e39f(_0xf80b('0xa')); var _0x3bb6ad = _0x83e39f('#select-address-postcode'); 22 _0x19258a['country'] = _0x1f06f1[_0xf80b('0x9')](); if (_0x3bb6ad[_0xf80b('0x7')]) { var _0x4451b1 = new RegExp('^' + _0x1f06f1[_0xf80b('0xb')](_0xf80b('0xc'))[_0xf80b('0xd')](/N/g, _0xf80b('0xe'))[_0xf80b('0xd')](/A/g, _0xf80b('0xf')) + '$'); if (!_0x4451b1['test'](_0x3bb6ad[_0xf80b('0x9')]())) { _0x3d1dbb[_0xf80b('0x10')](_0x3d1dbb[_0xf80b('0xb')](_0xf80b('0x11'))); 23 _0x3d1dbb['slideDown'](); return; } _0x19258a[_0xf80b('0xc')] = _0x3bb6ad[_0xf80b('0x9')](); } } _0x83e39f[_0xf80b('0x12')]({ 24 'type': _0xf80b('0x13'), 25 'cache': ![], 26 'url': _0x462be2[_0xf80b('0xb')](_0xf80b('0x14')), 27 'data': _0x19258a, 28 'success': function(_0x4ace01) { 29 var _0x4249b0 = JSON[_0xf80b('0x15')](_0x4ace01); 30 if (_0x4249b0[_0xf80b('0x16')]) { 31 _0x83e39f(_0xf80b('0x17'))['html'](_0x4249b0[_0xf80b('0x18')]); 32 _0x83e39f('#select-address-modal')[_0xf80b('0x19')](_0xf80b('0x2')); 33 /*prestashop['emit'](_0xf80b('0x1a'), { 'reason': _0x33f3e9['target'][_0xf80b('0x1b')] }); */ 34 35 // Mod ecomm 36 if (typeof _0x4ace01 == 'string') { 37 var url = JSON.parse(_0x4ace01); 38 window.location.href = url; 39 } else { 40 window.location.reload(true); 41 } 42 43 } else { 44 console.log(_0x4ace01); 45 if (typeof _0x4ace01 == 'string') { 46 var url = JSON.parse(_0x4ace01); 47 window.location.href = url; 48 } 49 50 51 _0x3d1dbb[_0xf80b('0x10')](_0x4249b0[_0xf80b('0x1c')]); 52 _0x3d1dbb[_0xf80b('0x1d')](); 53 } 54 } 55 }); 56 return ![]; 57 }); 58 }); 59}(jQuery)); 60function createCookie(name, value, days) { 61 if (days) { 62 var date = new Date(); 63 date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); 64 var expires = "; expires=" + date.toGMTString(); 65 } else { 66 var expires = ""; 67 } 68 document.cookie = name + "=" + value + expires + "; path=/"; 69} 70 71function readCookie(name) { 72 var nameEQ = name + "="; 73 var ca = document.cookie.split(';'); 74 for (var i = 0; i < ca.length; i++) { 75 var c = ca[i]; 76 while (c.charAt(0) == ' ') { 77 c = c.substring(1, c.length); 78 } 79 if (c.indexOf(nameEQ) == 0) { 80 return c.substring(nameEQ.length, c.length); 81 } 82 } 83 return null; 84} 85
86function eraseCookie(name) { 87 createCookie(name, "", -1); 88} 89 90$(document).ready(function(){ 91 setTimeout(function(){ 92 openLocationPopup(); 93 }, 400); 94 95}); 96 97function openLocationPopup(){ 98 if(!readCookie("show_location_popup")){ 99 $("#shippingaddress .select-address").click(); 100 createCookie("show_location_popup", 1, 999999); 101 } 102 /* Movemos el modal a la parte de abajo del body */ 103 $("#select-address-modal").appendTo("body"); 104}
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.