r00t3r Posted May 12, 2018 Share Posted May 12, 2018 guys today i install modules for version 1.7.X on my prestashop store, my prestashop version is correct 1.7.X but if i try to open modules in browser developer console i found this error : http://motokayak.eu/modules/econt/ajax.php?ajax_function=get_cities_by_name&q=dsad&limit=10×tamp=1526125310888 404 (Not Found) My file is in folder but prestashop not founded and if i try to open this link http://motokayak.eu/modules/econt/ajax.php in my browser site return 404 not found why ? Link to comment Share on other sites More sharing options...
r00t3r Posted May 12, 2018 Author Share Posted May 12, 2018 21 minutes ago, ndiaga said: You can not open a .php file from browser like that, use a controller instead. Okey but module not work how to fixed ? If try to load a city he not founded ajax.php and ofc not load a city ...... Link to comment Share on other sites More sharing options...
r00t3r Posted May 12, 2018 Author Share Posted May 12, 2018 (edited) This function not work And in dev console i have this not found error function getOfficeByOfficeCode(office_code) { if (parseInt(office_code)) { $.ajax({ url: '{/literal}{$this_path}{literal}ajax.php?ajax_function=get_office_by_office_code', type: 'POST', data: 'office_code=' + parseInt(office_code) + '&delivery_type=to_office', dataType: 'json', success: function(data) { if (!data.error) { $('#office_city_id').val(data.city_id); html = '<option value="0">{/literal}{l s=' --- Моля, изберете --- ' mod='econt'}{literal}</option>'; for (i = 0; i < data.offices.length; i++) { html += '<option '; if (data.offices[i]['office_id'] == data.office_id) { html += 'selected="selected"'; } html += 'value="' + data.offices[i]['office_id'] + '">' + data.offices[i]['office_code'] + ', ' + data.offices[i]['name'] + ', ' + data.offices[i]['address'] + '</option>'; } $('#office_id').html(html); $('#office_id').trigger('change'); } } }); } } {/literal} Edited May 12, 2018 by r00t3r (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now