View only a provider’s services

11 views
Skip to first unread message

Camille de Selys

unread,
Apr 16, 2026, 5:30:37 AM (9 days ago) Apr 16
to Easy!Appointments - Support Group
Hello,
Thank you very much for your work! It’s simple and I was able to customize some things.
I installed the module on Joomla, for my son who works in two different places, on different days.
So I created 2 "providers", 2 categories (which have the names of workplaces) with each one the 5 benefits that my son offers.
For each "service provider", I selected only the services in the corresponding category.
But, when you follow the link of one of the "providers" to make an appointment, the selection displays all the services. Even those that are not checked for this provider.
Is that normal?

Another question: I created each service in a certain order so that they appear in this order in the selection, but this order is not respected. Any ideas?

thanks

Camille de Selys

unread,
Apr 16, 2026, 7:41:26 AM (9 days ago) Apr 16
to Easy!Appointments - Support Group
Hello,
Finally, I found and share the two solutions; it can help others.
1. To display only services associated with a given provider (URL ending with?provider=x):
Open the file /application/controllers/Booking.php
Replace lines 137 and 138
        $available_services = $this->services_model->get_available_services(true);
        $available_providers = $this->providers_model->get_available_providers(true);

by
$available_services = $this->services_model->get_available_services(true);
$available_providers = $this->providers_model->get_available_providers(true);

$selected_provider_id = request('provider');

if (!empty($selected_provider_id)) {
    $selected_provider_id = (int) $selected_provider_id;

    $selected_provider = null;

    foreach ($available_providers as $provider) {
        if ((int) $provider['id'] === $selected_provider_id) {
            $selected_provider = $provider;
            break;
        }
    }

    if ($selected_provider) {
        $provider_service_ids = $selected_provider['services'];

        $available_services = array_filter(
            $available_services,
            function ($service) use ($provider_service_ids) {
                return in_array($service['id'], $provider_service_ids);
            }
        );

            $available_services = array_values($available_services);
    }
}


2. Requires the service select to be sorted by id
In the /application/models/Services_model.php file
In the function public function get_available_services(bool $without_private = false): array, ligne 289, replace name by id in ->order_by('name ASC')
Reply all
Reply to author
Forward
0 new messages