AJAX requests in Magento

AJAX is a great technology that is used to improve user experience and avoid page reloads, but how can you use it in your own Magento modules? Let’s explore…

1) You should either create a controller, for example: Namespace/YourModule/controllers/AjaxController.php or create a new action in an existing controller