Beispiel #1
0
     $total_customers_top_profit = array();
     $customers_top_profit = $data->getProfitTop();
     $total_customers_top_profit['data'] = array('total' => $customers_top_profit['total'], 'percent' => $customers_top_profit['percent'], 'sign' => $customers_top_profit['sign']);
     $total_customers_top_profit['status'] = 200;
     echo Tools::jsonEncode($total_customers_top_profit);
     break;
 case 'TOTAL_TOP_REVENUE':
     $total_revenue = array();
     $revenue = $data->getRevenueTop();
     $total_revenue['data'] = array('total' => $revenue['total'], 'percent' => $revenue['percent'], 'sign' => $revenue['sign']);
     $total_revenue['status'] = 200;
     echo Tools::jsonEncode($total_revenue);
     break;
 case 'TOTAL_TOP_PRODUCT':
     $total_product = array();
     $product = $data->getProductTop();
     $total_product['data'] = array('total' => $product['total']);
     $total_product['status'] = 200;
     echo Tools::jsonEncode($total_product);
     break;
 case 'BEST_CATEGORIES':
     $best_categories = $data->getBestCategoriesPie();
     $best_categories['status'] = 200;
     echo Tools::jsonEncode($best_categories);
     break;
 case 'CUSTOMERS_REGISTERED':
     $data->setStart(Tools::getValue('start'));
     $data->setLimit(Tools::getValue('limit'));
     $get_sort = Tools::getValue('sort');
     $get_property = Tools::getValue('property');
     if (isset($get_property) && isset($get_sort)) {