echo Tools::jsonEncode($total_visitors); break; case 'TOTAL_REGISTRATIONS': $total_registration = array(); $total_register = $data->getTotalRegistrations(); $total_registration['data'] = array('total' => $total_register['total'], 'percent' => $total_register['percent'], 'sign' => $total_register['sign']); $total_registration['status'] = 200; echo Tools::jsonEncode($total_registration); break; case 'TOTAL_CUSTOMERS': $total_customers = $data->getCustomers(); $total_customers['status'] = 200; echo Tools::jsonEncode($total_customers); break; case 'TOTAL_CUSTOMERS_BY_GENDER': $total_customers_by_gender = $data->getCustomersByGender(); $total_customers_by_gender['status'] = 200; echo Tools::jsonEncode($total_customers_by_gender); break; case 'VISITOR_AND_REGISTRATION': $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();