Support forumCategory: Feature requestsChange filter order to 1. Service 2. location 3. worker
dbfischer asked 7 months ago

Hi Nikola,
how can I change the order of the filter in frontend?
The first filter must be “service“, because it makes no sense for a customer to select a location where the desired service is not available at all.
Best regards

1 Answers
Nikola Loncar Staff answered 7 months ago

Hi Dirk, this can be only done by altering template file of plugin atm.

Best regards,

edinet replied 5 months ago

Hi, I see that on wp-content/plugins/easy-appointments/src/ajax.php on line 659
you extract all connections and order them by id.
I made a custom change
$response = $this->models->get_all_rows(‘ea_connections’,[],array(‘location’ => ‘ASC’,’service’ => ‘ASC’,’worker’ => ‘ASC’));

or could be this one to be more flexible and fully customizable via theme
$response = $this->models->get_all_rows(‘ea_connections’,[],apply_filters(“ea_filter_orderby_list”,[]));

If you want to implement this change would be great.