Jump to content

[SOLVED] Prestashop 1.7 ajax from tpl


Recommended Posts


I'm trying to call a php file (from tpl file) with ajax but I always get a not found.
I have to go wrong with the friendly URLs.

In my hook tpl file I've

<SCRIPT type="text/javascript">
function setGroup() {
		url: 'modules/advancedregistration/ajax-call.php',
		type: 'GET',
		data: 'ajax=true&clientgroups='+ $("#clientgroups").val(),
		cache: false,
		success: function(data) {
		return false;

and them in my-ajax.php


public function get_group(){

In Chrome console I see the link with parameters but the code is always 404.

So, what am I doing wrong in this url? Thank you

Edited by 2of7 (see edit history)
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...