I am trying to call magento ajax call request but not success.
I have one .phtml custom page and its contains category when i click on any category need to display category products on slider with ajax .
When i click on any category my ajax call is like below.
jQuery('#mytest').click(function(){
jQuery.ajax({
url: "/groupedajax/ajax/products",
type: "POST",
data: "id=30",
success: function(data) {
// alert(data);
jQuery('#results').html(data);
}
});
});
And Then create controller at : Account/Groupedajax/controllers/AjaxController.php
class Account_Groupedajax_AjaxController extends Mage_Core_Controller_Front_Action {
public function indexAction() { // landing page
$this->loadLayout();
$this->renderLayout();
}
}
Then create config.xml
0.1.0
standard
Account_Groupedajax
groupedajax
groupedajax.xml
Then, layout/groupedajax.php
In groupedajax.phtml
echo "this is test";
exit;
?>
Is's not working, Please help.