This is my OpenCart code I don't know what the problem in this code is, but it cant return the value from php ajax page. I tried many ways it wont work so please help me for this problem .
Here is my ajax in OpenCart:
<script type="text/javascript">
$('.list-group-item').on('click', function () {
    var href = $(this).attr("href");
    var arr = href.split('path=');
    var cat_id = arr[1];
    //alert("hai");
    $.ajax({
        type: 'post',
        url: 'index.php?route=ajax/ajaxcat/index',
        data: format_data,
        dataType: 'json',
        success: function (json) {
            if (json['success']) {
                //$('#messages').html(json['success']);
                alert(json['success']);
            }
        }
    });
});
</script>
Here is my php code:
 <?php
  class ControllerAjaxAjaxcat extends Controller {
    function index() {
      $json['success'] = 'This is the returned results color_adjust.php';
      $this->response->setOutput(json_encode($json));
    } 
  }
 ?>
I don't know what is wrong with that code it cant return the value.
 
    