Post by QenTox » Fri Jun 17, 2011 5:44 pm

I hope, I am not the only one, but there are some products, that have more than one common name. But you can not list all of them in the product name. Would be great to add a field, where you can actually enter all the other options as well. One example:

There is a game called Called of Duty 4: Modern Warfare

People are often searching for the game by typing only COD 4 or COD 4 MW. So would be really great and helpful to actually add somewhere in the admin area extra field, where you can list all the other common names for the products. Hopefully someone will at least read this and aprreciate it :-)

Newbie

Posts

Joined
Sun Aug 15, 2010 8:03 am

Post by rph » Fri Jun 17, 2011 5:52 pm

The easiest way to do that without any modding is to add those terms to product tags.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by QenTox » Fri Jun 17, 2011 6:01 pm

I was adding them to key words, but that way it wasn't working, will do it, thanks a lot rph for your help, hope it will work :-)

Newbie

Posts

Joined
Sun Aug 15, 2010 8:03 am

Post by QenTox » Sun Jun 19, 2011 4:37 am

Not working, if I add them to tags :-( Actually I am using ajax mod for search, so you only have to put the first few characters in the search field, and then it gives you suggestions of all available products...

Newbie

Posts

Joined
Sun Aug 15, 2010 8:03 am

Post by Xsecrets » Sun Jun 19, 2011 9:37 am

QenTox wrote:Not working, if I add them to tags :-( Actually I am using ajax mod for search, so you only have to put the first few characters in the search field, and then it gives you suggestions of all available products...
well then go talk to the person that wrote the ajax mod, because the default opencart search does search tags.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by funrider » Sun Jun 19, 2011 6:10 pm

Xsecrets wrote:
QenTox wrote:Not working, if I add them to tags :-( Actually I am using ajax mod for search, so you only have to put the first few characters in the search field, and then it gives you suggestions of all available products...
well then go talk to the person that wrote the ajax mod, because the default opencart search does search tags.
Indeed the advanced search can do that. However I think that the main search bar on the homepage should also search in text and tags besides the title instead of finding nothing and then go to advanced and tick off such options and then find the products. I already adjusted in my website but i think that should be standard in the main search bar feature.

OpenCart is the best Webshop tool! Congratulations with releasing version 1.5


New member

Posts

Joined
Thu Jun 10, 2010 9:19 pm
Location - Netherlands

Post by funrider » Mon Jun 27, 2011 10:30 pm

I received a request on this search feature in my PM so i thought i would post it here too. Credits are for someone else. I did find this in the forum somewhere a while ago.

This is the code as I'm using it in the catalog/view/theme/themename/template/common/header.tpl

Code: Select all

	<div id="search">
		
          <div class="div9">

		  <select id="filter_category_id">
              <option value="0"><?php echo $text_category; ?></option>
              <?php foreach ($categories as $category) { ?>
              <?php if ($category['category_id'] == $category_id) { ?>
              <option value="<?php echo $category['category_id']; ?>" selected="selected"><?php echo $category['name']; ?></option>
              <?php } else { ?>
              <option value="<?php echo $category['category_id']; ?>"><?php echo $category['name']; ?></option>
              <?php } ?>
              <?php } ?>
            </select>

			<?php if ($keyword) { ?>
            <input type="text" value="<?php echo $keyword; ?>" id="filter_keyword" />
            <?php } else { ?>
            <input type="text" value="<?php echo $text_keyword; ?>" id="filter_keyword" onclick="this.value = '';" onkeydown="this.style.color = '#000000'" style="color: #999;" />
            <?php } ?>

      <div class="div10"><a onclick="moduleSearch();" class="search_button"><?php echo $button_go; ?></a></div>

			</div>
    </div>
Another think you could do is change the advanced search page and always have all boxes ticked there.

The location of that is:
catalog/view/theme/themename/template/product/search.tpl

The changes in the code should be these two below and have them set on 'checked'

Code: Select all

id="description" checked="checked"
id="model" checked="checked"

OpenCart is the best Webshop tool! Congratulations with releasing version 1.5


New member

Posts

Joined
Thu Jun 10, 2010 9:19 pm
Location - Netherlands

Post by Xsecrets » Mon Jun 27, 2011 10:36 pm

funrider wrote:
Xsecrets wrote:
QenTox wrote:Not working, if I add them to tags :-( Actually I am using ajax mod for search, so you only have to put the first few characters in the search field, and then it gives you suggestions of all available products...
well then go talk to the person that wrote the ajax mod, because the default opencart search does search tags.
Indeed the advanced search can do that. However I think that the main search bar on the homepage should also search in text and tags besides the title instead of finding nothing and then go to advanced and tick off such options and then find the products. I already adjusted in my website but i think that should be standard in the main search bar feature.
You don't have to go to the advanced search to search in tags. There is no option on the advanced search page to search in tags. I think you are confusing it with model and description.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by uksitebuilder » Thu Jun 30, 2011 6:27 pm

-removed-
Last edited by uksitebuilder on Sat Jul 02, 2011 3:51 am, edited 4 times in total.

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by jarredrame » Fri Jul 01, 2011 5:00 pm

Im not 100% on this, but I do like the concept.
There are certainly a couple more details to take into consideration, But Good! :)

easy scholarship
Finding scholarships

Academic College Scholarships


Newbie

Posts

Joined
Fri Jul 01, 2011 3:48 pm

Post by wonderland » Fri Jul 01, 2011 9:53 pm

Thank you, thank you, thank you !

I'm so happy now that search works so much better ! It's great that you shared :)

It works good, but sometimes I get no results when searching "productname" but If I search "Brandname + productname" I get correct results.

Also I noticed that sometimes if I search for "Brandname + productname" I get "Wrongbrandname + productname"

Are there any suggestion on how to improve this a bit further.

I tag my propucts like this - Brandname, productcategory (which is usually part of productname)

New member

Posts

Joined
Wed Jun 15, 2011 8:25 pm

Post by uksitebuilder » Fri Jul 01, 2011 10:51 pm

Hi,

Could you PM me some examples and a link t you site so I can see what is happening, or not as the case may be.

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by uksitebuilder » Fri Jul 01, 2011 10:54 pm

jarredrame wrote:Im not 100% on this, but I do like the concept.
There are certainly a couple more details to take into consideration, But Good! :)
This was just a quick initial fix.

Certainly more can be done to expand the options for breaking down the search on the advanced search page.

I will also look into quitting the loop early if an exact match or matches are found for the whole search term.

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by uksitebuilder » Sat Jul 02, 2011 12:57 am

Updated my script above to solve problems when searching for terms containing diacritics (e.g. šķīdinātājs)

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by uksitebuilder » Sat Jul 02, 2011 2:07 am

One more update to the script above.

If the whole search term is found, the searching is quit and the results are returned for those matches.

If not then the search term is split in to single words and each word is searched for and all the results are shown.

This should help stop too many results being shown if a product or products exist that match the whole search term.

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom
Who is online

Users browsing this forum: No registered users and 7 guests