Post by fishthetiger » Thu Oct 28, 2010 3:40 pm

Hi there, as a relative novice to "development" who has dipped his toe into php, I was really happy when i stumbled across opencart. I felt like all my Xmas's came all at one. Good work guys, this platform definitely needs more recognition.

Just a quickie from me, I am currently developing a store which sells Heating Spares. These spares are mainly identified as a string of numbers as a model number. When I search a specific part number e.g. 3428, the results displays all products containing the "3428" string like, 5634284 and 342887443. This is great but is there a way that I can display the exact match first in the list of results?

It would be much appreciated if you could help, many thanks

@fishthetiger

opencart v 1.4.9.1
Clean install

Thanks again for your time.

Newbie

Posts

Joined
Thu Oct 28, 2010 3:27 pm

Post by fishthetiger » Mon Nov 01, 2010 3:05 pm

Hi there opencart community. As i'm not very confident with my php skills and really don't want to mess up a functioning store, I was wondering if anyone knows how to modify the search facility? Is there a way to have your search results display the exact match first in the list? Is this easy to do? Any help would be much appreciated.

Many thanks

Fishthetiger

v1.4.9.1

Newbie

Posts

Joined
Thu Oct 28, 2010 3:27 pm

Post by justinv » Mon Nov 01, 2010 4:08 pm

Hi Fishthetiger,

it's a good question. The search facility currently does not return results based on any sort of relevancy. The default order of results is the order in which they went into your database, basically.

Perhaps the easiest thing to do in your situation would be to create a pre-search that checks if there is an exact match on model number, and if so return only one result.

Let me know if that's a solution you'd consider. Otherwise you're welcome to wait for other (better) ideas!

Documentation: OpenCart User Guide
Mods: Total Import PRO | CSV Import PRO | Ecom Tracking | Any Feed | Autosuggest | OpenCart CDN
Image


Active Member

Posts

Joined
Tue Oct 12, 2010 1:24 pm

Post by Qphoria » Mon Nov 01, 2010 8:31 pm

I'd like to add more search options like the main stream search engines have.. like
"quotes" to only find exact matches
- (minus) to exclude items
etc

But at this time they are not in effect

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by justinv » Tue Nov 02, 2010 1:28 pm

It seems to me the search is doomed until it returns results based on relevance. Quotes and minuses are surely just workarounds to the fact that relevance isn't factored in?

Documentation: OpenCart User Guide
Mods: Total Import PRO | CSV Import PRO | Ecom Tracking | Any Feed | Autosuggest | OpenCart CDN
Image


Active Member

Posts

Joined
Tue Oct 12, 2010 1:24 pm
Who is online

Users browsing this forum: No registered users and 50 guests