I know this is old, but this is for helping all the people who might have this problem
You have to add an extra parameter ('json') to the $.post method call like this:
$.post(url,data_in,function(data_out){ your_code here },'json');
for those who don't know, your PHP must output something like this at the end of all processing:
die(json_encode(array("RESPONSE"=>"OK","MYMESSAGE"=>"THIS IS SUCCESSFULL")));
Also there is an alternative for HTML output instead of JSON:
$.post(url,data_in,function(data_out){ your_code here },'html');
then your responding PHP must output this:
echo "<div id=\"RESPONSE\">OK</div>";
echo "<div id=\"MYMESSAGE\">THIS IS SUCCESSFULL</div>";
die();
So to respond the original question, the code must be like this:
$.post("order.php", { product: product_id, coupon: coupon }, function(data) {
$("#price").html("$" + data.price);
$("#discount").html("$" + data.discount);
$("#total").html("$" + data.total);
},'json');