Jump to content

Edit History

theillo

theillo

Question for the Core Devs:

I'm upgrading from 1.6 to 1.7.

Previously I was able to send an Ajax request to the AuthController.

In 1.6 the AuthController had this useful bit of code in it:

       if ($this->ajax) {
            $return = array(
                'hasError' => !empty($this->errors),
                'errors' => $this->errors,
                'token' => Tools::getToken(false)
            );
            $this->ajaxDie(Tools::jsonEncode($return));
        }

This allowed me to make an Ajax request to the Auth Controller, and I'd receive back a Json Object with any errors that might have occurred during login. I could then handle the errors in whichever way I wanted. This worked just fine. Convenient, simple, and effective.

 

However, now there is no trace of this code in the 1.7 Auth Controller. 

 

What's the new process for Ajax calls to front controllers, specifically the Auth Controller?

theillo

theillo

Question for the Core Devs,

I'm upgrading from 1.6 to 1.7.

Previously I was able to send an Ajax request to the AuthController.

In 1.6 the AuthController had this useful bit of code in it:

       if ($this->ajax) {
            $return = array(
                'hasError' => !empty($this->errors),
                'errors' => $this->errors,
                'token' => Tools::getToken(false)
            );
            $this->ajaxDie(Tools::jsonEncode($return));
        }

This allowed me to make an Ajax request to the Auth Controller, and I'd receive back a Json Object with any errors that might have occurred during login. I could then handle the errors in whichever way I wanted. This worked just fine. Convenient, simple, and effective.

 

However, now there is no trace of this code in the 1.7 Auth Controller. 

 

What's the new process for Ajax calls to front controllers, specifically the Auth Controller?

×
×
  • Create New...