Sort list of employee in front-end

More
8 years 7 months ago #67925 by Paul
Hello,
I want to sort the list of employee in the booking form by alphabetical order. Is it possible ? How ?
If not, how the list is now sorted ?



Thank you
Attachments:

Please Log in or Create an account to join the conversation.

More
8 years 7 months ago #68224 by Paul
Replied by Paul on topic Sort list of employee in front-end
Pre-sales support is faster than post-sales supports...

Please Log in or Create an account to join the conversation.

More
8 years 7 months ago #68225 by Mr. Dam
Replied by Mr. Dam on topic Sort list of employee in front-end
Hi Paul,
Sorry for late response, in next time, please use Ticket system, any questions will be answered within 24 hours in working days and 48 hours in weekend or holiday.
By the way, to sort employees by name, please follow these steps
1. Open file:
components > com_osservicesbooking > helpers > common.php
2. Find
Code:
$db->setQuery("Select a.* from #__app_sch_employee as a inner join #__app_sch_employee_service as b on a.id = b.employee_id where a.published = '1' and b.service_id = '$sid' and b.".$day." = '1' and a.id NOT IN (Select eid from #__app_sch_employee_rest_days where rest_date <= '$day1' and rest_date_to >= '$day1') $vidSql $employeeSql order by b.ordering");

and change it to
Code:
$db->setQuery("Select a.* from #__app_sch_employee as a inner join #__app_sch_employee_service as b on a.id = b.employee_id where a.published = '1' and b.service_id = '$sid' and b.".$day." = '1' and a.id NOT IN (Select eid from #__app_sch_employee_rest_days where rest_date <= '$day1' and rest_date_to >= '$day1') $vidSql $employeeSql order by a.employee_name");

Good luck
Dam

Please Log in or Create an account to join the conversation.

Moderators: Mr. Dam