How to display search results based on lat.long in search

More
9 years 3 months ago #52257 by rafah
Hi,

I have an address field in item.Based on this I am saving latitude and longitude in a table.Now based on location' latitude and longitude can we filter items in search results page.It should show nearest location items first.

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

More
9 years 3 months ago #52260 by micker
=> doesn't exist ... need to be dev

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

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

More
9 years 3 months ago #52263 by rafah
Hi,

Can you give any ideas for development

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

More
9 years 3 months ago #52265 by ggppdk
Hello

inside your custom "mydefault" FLEXIcontent template you can edit

items(_html5).php (ITEM view)
category_items(_html5).php (CATEGORY view)

and use:

www.flexicontent.org/documentati ... -type.html

Also we have this enhancement issue:
github.com/FLEXIcontent/flexico ... /issues/43

Code:
echo $v['lan']; echo $v['lon'];


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

More
9 years 3 months ago #52276 by rafah
Hi,

My question is how to put our custom query in search ie we are giving an input and getting search results in category.php.

For eg. I am using a location field as filter.So as user selects a location it filters it and displays it in category.php.
Similarly can I filter near by items in that location based on latitude and longitude.Where should I put the custom query for filtering?

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

More
9 years 3 months ago #52310 by ggppdk
Hello

the field is multi-property
-- and property array is PHP serialized before storing in DB

--> so you can filter be an SQL query



Our approach for multi-property fields
(for a future FLEXIcontent version)
-- would be to create extra 4 extra DB columns which every field can create up to 4 custom indexes to be used for this purpose


-- Now
1. you can only filter single-property fields, e.g. text field, date field, radio, checkbox, etc fields
2. we support doing this inside FLEXIcontent views and filtering module,

--> please try using FLEXIcontent views and module, if you want to do custom work, then you will need to be up to the challenge, custom code is too much to ask here, remember in some forum you cannot file bug reports for free !! and asking custom code is not done even for paying users


-- i could give you a snipset of code if you describe a small specific problem, that i can understand without having big knowledge of what you want to achieve

(about what you asked above is not easy with an SQL query)


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.319 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline