Reputation: 992
When I am making an ajax request to my magento controller, I am getting 302 found. Why is this happening? My ajax request:
var sim_id = $(this).prev().children().first().attr('id');
var parent_id = $("#image").attr("data-value");
$.get
(
baseUrl+'/index.php/admin/similar/save/pid/'+parent_id+'/sid/'+sim_id,
function(j) {
}
);
My magneto controller is this:
public function saveAction() {
Mage::log("inside controller",null,"system.log",true);
$params = $this->getRequest()->getParams();
/*$simImage = Mage::getModel('similar/blogpost');
$simImage->setProductId($this->getRequest()->getParam('pid'););
$simImage->setSimimageid($this->getRequest()->getParam('sid'););
$simImage->save();
// $blogpost = Mage::getModel('leads/blogpost');
//$blogpost->load($params['id']);
$data = $simImage->getData();
var_dump($data);*/
return;
}
The request is not even hitting the controller. Whats the reason for this?
Upvotes: 1
Views: 479
Reputation: 992
The form key was not being sent, hence it was not getting inside admin controller
Upvotes: 1