Post by amplifywebdesign » Sat Aug 22, 2009 4:47 am

Hi would it be possible to make opencart search in descriptions by default? Also, is there a way to include the category in where it searches?

Thanks O0

User avatar
New member

Posts

Joined
Sat Aug 22, 2009 1:56 am
Location - Sheffield & North Wales

Post by readyman » Sat Aug 22, 2009 12:13 pm

To search descriptions by default - You can place a hidden field in the top search box similar to
<input type="hidden" name="description" value="1">

Do you want to search the categories? The category descriptions? Or do you just want to list them if they contain products in them the meet the search criteria (a bit pointless) Or did you just want to sort them by category?
:-\

http://www.alreadymade.com
Follow me on twitter.com/alreadymade


User avatar
Global Moderator

Posts

Joined
Wed May 20, 2009 5:16 am
Location - Sydney

Post by amplifywebdesign » Sun Aug 23, 2009 2:10 am

Ah yes ofcourse! Thank you!

I just want to search in category names (although category descriptions would also be useful)

Cheers ;D

User avatar
New member

Posts

Joined
Sat Aug 22, 2009 1:56 am
Location - Sheffield & North Wales

Post by Qphoria » Sun Aug 23, 2009 2:55 am

it doesn't search in category names or descriptions. It searches "product" names and descriptions

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by amplifywebdesign » Mon Aug 24, 2009 3:59 am

Yes I was wondering if I could search in category names or descriptions as well?

Also I'm having problems with this search in descriptions checkbox. I tracked down the search module to (hopefully) the template/product/search.tpl and I added this:

Code: Select all

<div id="seach_tab"><?php echo $search; ?><input type="hidden"  name="description" id="description" checked="checked" /></div>
And it doesn't appear to work! Any help appreciated thanks!

User avatar
New member

Posts

Joined
Sat Aug 22, 2009 1:56 am
Location - Sheffield & North Wales

Post by Qphoria » Mon Aug 24, 2009 5:07 am

why not do exactly as readyman says?

change checked="checked" to value="1"

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by amplifywebdesign » Mon Aug 24, 2009 5:14 am

Qphoria wrote:why not do exactly as readyman says?

change checked="checked" to value="1"
Didn't see the value field

User avatar
New member

Posts

Joined
Sat Aug 22, 2009 1:56 am
Location - Sheffield & North Wales

Post by amplifywebdesign » Mon Aug 24, 2009 10:05 pm

Well I couldn't get it to work so I tried adding &description=1 onto the url.. and presto it worked :)


Just typing this for anyones future reference
Locate catalog/view/theme/{your-theme}/template/common/search.tpl
and replace the moduleSearch function with this:

Code: Select all

function moduleSearch() {
	location = 'index.php?route=product/search&keyword=' + encodeURIComponent($('#filter_keyword').attr('value')) + '&description=1';
}
Thanks for the help all ;)

User avatar
New member

Posts

Joined
Sat Aug 22, 2009 1:56 am
Location - Sheffield & North Wales

Post by daniel2008 » Sat Jul 24, 2010 11:15 pm

readyman wrote:To search descriptions by default - You can place a hidden field in the top search box similar to
<input type="hidden" name="description" value="1">

Do you want to search the categories? The category descriptions? Or do you just want to list them if they contain products in them the meet the search criteria (a bit pointless) Or did you just want to sort them by category?
:-\
Hi readyman & Qphoria,
Please specify where to find the file related to the 'Top search box'.
Do you mean the file of search.tpl in the fold cataloge\view\theme\default\template\prodcut,
or there is another for the 'Top search box'?
If using 'hidden' type in the 'Top search box', will it have some impact on the Advance Search?
Thanks.

http://www.smartebuy.com.au/ http://www.myleathers.com.au/ http://www.cctv4oz.com.au/ http://www.origreen.com.au/


Active Member

Posts

Joined
Wed Jul 07, 2010 8:54 pm

Post by funrider » Mon Jul 26, 2010 12:06 am

I also try to turn on quick searching and advanced searching within both product description and product model. So i want both to be standard checked when searching in the header or the advanced search. When I now search it doesn't use the description search and model search as a standard. I think that would be very helpful if this was adjustable.

I tried looking for it in:
catalog/view/theme/default/template/product/search.tpl

but I'm not that good within such scripts where I need to change it. And what. I can't find the previous text from a year ago that was suggested in this topic within that file to turn it to value '1'. I use version 1.4.8b.

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 preciousfoods » Mon Jul 26, 2010 12:21 am

Hello, I apologize in advance as I don't really know where to post this :
I am absolutely new to opencart, I have purchased a nice flower template and now I wanted to made the changes in the admin panel but whatever I modify, anywhere, does not affect the storefront... I have to admit I am really perplex!
Can someone please help me out?..
thanks!
Kevin

Active Member

Posts

Joined
Sat Jul 17, 2010 11:35 am

Post by Moggin » Mon Jul 26, 2010 12:46 am

Hi Kevin,
First, to help you out with using the forum:

1. To ask a question which does not follow on from a previous discussion, try and find a sub-forum which looks relevant, and post a new topic there (look for 'New Topic' button at the top). For example, this post probably belongs in 'Template Support'. Give it a good title (Bad choice: 'Help!!!' Good choice: 'Where is the place to edit xyz' ) LOL ;D

2. OK...you have a template, but nothing affects the storefront? Do you mean you have uploaded the template correctly, but you're still seeing the default? If so, the template needs to be selected in the admin panel: System > Settings> Store >Template.

But - if that's not the problem - please post again!

Active Member

Posts

Joined
Wed May 05, 2010 4:56 am

Post by preciousfoods » Mon Jul 26, 2010 1:02 am

thank you so much, how can I move this post to template support please?
yes, the maker of the template said it was correctly installed after looking on my admin panel, but it doesn t appear in System > Settings> Store >Flower Template!
What did I do wrong?
thanks!

Active Member

Posts

Joined
Sat Jul 17, 2010 11:35 am

Post by funrider » Mon Jul 26, 2010 3:23 am

Moggin or anyone else any idea how to solve the search issue that I and another person discussed in this topic?

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 preciousfoods » Mon Jul 26, 2010 3:57 am

is there some kind of a "move topic" function?

Active Member

Posts

Joined
Sat Jul 17, 2010 11:35 am

Post by Moggin » Mon Jul 26, 2010 3:58 am

funrider wrote:Moggin or anyone else any idea how to solve the search issue that I and another person discussed in this topic?
Sure, funrider - luckily, this is very easy. See this post by Qphoria: Re: Search Engine search descriptions by default- and see Q's post on the same page to search model as well. It's just a line of code or so.

Active Member

Posts

Joined
Wed May 05, 2010 4:56 am

Post by Moggin » Mon Jul 26, 2010 4:08 am

preciousfoods wrote:is there some kind of a "move topic" function?
Only the mods can move postings. And if you post the same topic elsewhere you get eaten for double posting ;D let's keep going for the moment..
So, when you go to settings > store, the only thing that appears in the template dropdown is the default?

Active Member

Posts

Joined
Wed May 05, 2010 4:56 am

Post by funrider » Mon Jul 26, 2010 4:33 am

Thank you for linking to that other post. I hadn't seen that one in the search. That solved the problem for the header (header.tpl changes) search and I also adjusted the advanced search (search.tpl) by adding also in the first line checked="checked":

Code: Select all

<input type="checkbox" name="description" id="description" checked="checked" />
  <?php } else { ?>
<input type="checkbox" name="description" id="description" checked="checked" />

Code: Select all

<input type="checkbox" name="model" id="model" checked="checked" />
  <?php } else { ?>
<input type="checkbox" name="model" 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 preciousfoods » Mon Jul 26, 2010 6:23 am

thank you for replying again... yes, there is only default :(

Active Member

Posts

Joined
Sat Jul 17, 2010 11:35 am

Post by preciousfoods » Mon Jul 26, 2010 11:21 pm

Could someone please give me some advice, I have to admit I'm not too sure about how to proceed :(
thanks!

Active Member

Posts

Joined
Sat Jul 17, 2010 11:35 am
Who is online

Users browsing this forum: Semrush [Bot] and 51 guests