Preferred stores in search results

10 years 7 months ago #1868 by perini-ps
Preferred stores in search results was created by perini-ps
Hi guys,

Store Locator is working very well for us. I have been asked by the client if they can add one feature: to have certain stores in the system to appear first in the search results list. In a way, it's like the "Featured" function but without the "Featured" search filter, if that makes sense.

I assume that it would work something like this:

DB:
Stores are tagged (they could be tagged with the existing Featured flag)

Search:
System looks up entries based on proximity etc
Checks entries for any which are featured
Displays them first

Is that possible? I assume that we would need to write a routine for it (or hand it to yourselves :-)

Cheers,
Paul

Please Log in to join the conversation.

More
10 years 7 months ago #1869 by dontstop99
Replied by dontstop99 on topic Preferred stores in search results
Featured is just a word, you could use a Joomla language override and just make it display the word Preferred instead of featured, then just use the solution

www.sysgenmedia.com/forum/5-store-locato...ving-featured-to-top

to make sure you 'preferred; store are first in the list regardless of what search parameters you enable


Alternatively use one of the custom field. Set the custom field to 'PREFFERED' and just put a value of y in if they are preferred. Then in the menu option set the order of the results to be by that custom field first (descending).

Please Log in to join the conversation.

More
10 years 7 months ago #1875 by perini-ps
Replied by perini-ps on topic Preferred stores in search results
Hi there,

Thanks for your help. I have two further questions...

1. Is there a secondary order? If I select a custom field as Result Order, then those entries with a custom field appear first. But, what about the rest of the results? I'd like to order results by custom field and then distance.

2. How are custom fields ordered? I assumed that a store with custom field entry "A" would appear above a store with custom field entry "Z", but that doesn't seem to be the case.

Cheers,
Paul

Please Log in to join the conversation.

More
10 years 7 months ago #1876 by sysgenmedia
Replied by sysgenmedia on topic Preferred stores in search results
Hi Paul,

Currently you can only order by one field. If Z is appearing before A, then you can switch the sort direction, which is also found in the menu item parameters.
The following user(s) said Thank You: perini-ps

Please Log in to join the conversation.

More
10 years 7 months ago #1878 by perini-ps
Replied by perini-ps on topic Preferred stores in search results
Thanks - is it possible to write some code to have a secondary order... as in is there space for us to add some PHP code to facilitate that, do you think, or would it be too tricky to attempt?

Cheers,
Paul

Please Log in to join the conversation.

More
10 years 7 months ago #1881 by sysgenmedia
Replied by sysgenmedia on topic Preferred stores in search results
Following the link that dontstop99 posted above, that indicates where in the code you can add additional sorting fields.
The following user(s) said Thank You: perini-ps

Please Log in to join the conversation.

More