Showing results for 
Search instead for 
Did you mean: 

Ajax not returning json response for cart


Ajax not returning json response for cart

I am stuck with what seems tobe a core issue to me.


When placing an order, no matter which module I use, the server accepts the order it s placed and created but the json response is never returned, in fact the server sends no response at all, not even a code. I dont understand why its not working because I can verify the result is being set with an error log statement but, no matter what I try I cannot get the server to respond. All three modules have similar functionality and the same function names. The other ajax functions IE saveBilling, etc work as expected, just placeOrder fails for some reason. even though they all use the same function to display the results.




Any help or hints to get me looking in the right place would be greatly appreciated.



Magento CE



Stock 1 page


One Step Checkout

public function placeOrderAction(){
ini_set("error_reporting", E_ALL);
error_log("place order");

* a bunch of code depending on the module


//$result["success"] = true;
error_log("MESSAGES: ".json_encode($result));
//return $this;


Tags (3)

Re: Ajax not returning json response for cart

$result is not defined when you comment those code out, you can init it as

$result = array('success' => true, 'error'=> false);

for testing if this is what the fronend expect.


what do you mean by no response at all? not event 200 or 400 response code? request status is always pending in chorme developer tool net work tab?

Re: Ajax not returning json response for cart

$result is defined and properly set I can confirm that with the error_log statement


No response code not 200 not 500 not anything, firebug it just stays grey, chrome displays the no response page no headers no anything but the code executes properly, the order is created and paid for, emails are sent

Re: Ajax not returning json response for cart

can you run that place order url in browser directly?  maybe infinite redirect or timeout?

Re: Ajax not returning json response for cart

I can't place it in the browser directly because it must be POST, and I dont really know how, but curl -vvv from the command line sent this back:


< HTTP/1.1 100 Continue
* Empty reply from server
* Connection #0 to host left intact
curl: (52) Empty reply from server

Re: Ajax not returning json response for cart

I am not exactly sure why, but apparently cursing did the trick.


$result = array('success' => "f%^&%^ You", 'error'=> "Mutha f&654#4");

I recieved an error response and check out has worked fine ever since...............