Example #1
0
     $visitor_registration = $data->getVisitorsAndRegistration();
     $visitor_registration['status'] = 200;
     echo Tools::jsonEncode($visitor_registration);
     break;
 case 'CUSTOMER_BY_LANGUAGE':
     $customers_by_language = $data->getCustomerByLanguage();
     $customers_by_language['status'] = 200;
     echo Tools::jsonEncode($customers_by_language);
     break;
 case 'CUSTOMER_BY_REGION':
     $customers_by_region = $data->getCustomerByRegion();
     $customers_by_region['status'] = 200;
     echo Tools::jsonEncode($customers_by_region);
     break;
 case 'CUSTOMER_BY_CURRENCY':
     $customers_by_currency = $data->getCustomerByCurrency();
     $customers_by_currency['status'] = 200;
     echo Tools::jsonEncode($customers_by_currency);
     break;
 case 'CUSTOMER_BY_TOPSTATS':
     $customers_topstats = $data->topStatisticsCustomer();
     $customers_topstats['status'] = 200;
     echo Tools::jsonEncode($customers_topstats);
     break;
 case 'TOTAL_TOP_ORDER':
     $total_customers_top_order = array();
     $customers_top_order = $data->topStatisticsOrder();
     $total_customers_top_order['data'] = array('total' => $customers_top_order['total'], 'percent' => $customers_top_order['percent'], 'sign' => $customers_top_order['sign']);
     $total_customers_top_order['status'] = 200;
     echo Tools::jsonEncode($total_customers_top_order);
     break;