Catalog filter on geocoordinates
Hi
I have added the cataloggeocoordfield extension to my catalog module, and I want now the catalog filter to find items nearby the location entered by the user in the search box. What should I do ? I know the sql query but I don't know where to set it.
What should I change in the catalog module ?
Thank you in advance
Re: Catalog filter on geocoordinates
Hi
I'm really stuck.
Is there a HOOK to change the filter query ?
Re: Catalog filter on geocoordinates
Hi
I'm suprised that this extension has no support, while it seems so widely used !
I try to figure out how I can catch the filter query before its execution. Is it possible ? What is the best solution to change the filter condition just before its execution ?
Please help
Re: Catalog filter on geocoordinates
For people who might be interested :
I implemented the HOOK "filterCatalog" and modify the "settings" array that stores the form search values :
Code:
$settings['procedure']['where'][0] .= " OR city=?";
$settings['values']['where'][] = $row['city];
where $row['city'] is the result of an sql query that gets the cities nearby the searched location.(https://developers.google.com/maps/a...fr#findnearsql )