I think I may be missing something very simple. I want the search engine to search descriptions by default, but can not find the place to turn this on. I have searched these forums and haven;t found any solutions for the latest version of opencart. I have seen reference to checking search descriptions, but have not found a place to make it search descriptions by default.
any help?
any help?
Michael Bielaczyc
http://www.aradanicostumes.com
http://www.aradani.com
1. EDIT: catalog/view/theme/YOURTHEME/template/common/header.tpl
2. FIND:
3. BEFORE ADD:
2. FIND:
Code: Select all
location = url;
Code: Select all
url += '&description=1';
that did the trick. thank you so much.
Michael Bielaczyc
http://www.aradanicostumes.com
http://www.aradani.com
Qphoria wrote:1. EDIT: catalog/view/theme/YOURTHEME/template/common/header.tpl
2. FIND:3. BEFORE ADD:Code: Select all
location = url;
Code: Select all
url += '&description=1';
Is there a way to enable to "model" as well?
Thanks in advance.
J
before anyone asks a stupid question about how to make it search "model" as well
After, the above, add:
After, the above, add:
Code: Select all
url += '&model=1';
where to add this exactly........ I am using 1.4.7
plz help
plz help
Qphoria wrote:1. EDIT: catalog/view/theme/YOURTHEME/template/common/header.tpl
2. FIND:3. BEFORE ADD:Code: Select all
location = url;
Code: Select all
url += '&description=1';
Hi,
Unfornatally there is no 'location = url;' in header.tpl at all at v1.3.3.
What's the trick in here?
Yes I know its an old version
Thanks!
Unfornatally there is no 'location = url;' in header.tpl at all at v1.3.3.
What's the trick in here?
Yes I know its an old version
Thanks!
I think I may have come across a ‘bug’ or glitch. I haven’t actually tried making the above changes yet but am really thinking about it.
I tried out of curiosity making various searches on my site to see what the differences were when choosing the ‘advanced search’ check boxes.
A strange thing occurred when choosing both 'search product description’ and ‘search product model’ at the same time.
The search revealed a hidden (disabled) product I had been using as a product template.
This product does not show under normal searches or indeed when chasing just one of the options above but only when both options are selected at the same time. Also this disabled product does not as far as i can see contain any of the search terms and show under any searches using the above double method.
I am also using the ‘advanced search’ add-on which doesn’t rely on keywords being next to each other.
Just wondering if this is a known problem, if it could be due to the add-on or if others experience it on a clean install?
I tried out of curiosity making various searches on my site to see what the differences were when choosing the ‘advanced search’ check boxes.
A strange thing occurred when choosing both 'search product description’ and ‘search product model’ at the same time.
The search revealed a hidden (disabled) product I had been using as a product template.
This product does not show under normal searches or indeed when chasing just one of the options above but only when both options are selected at the same time. Also this disabled product does not as far as i can see contain any of the search terms and show under any searches using the above double method.
I am also using the ‘advanced search’ add-on which doesn’t rely on keywords being next to each other.
Just wondering if this is a known problem, if it could be due to the add-on or if others experience it on a clean install?
In version 1.5.1 it's in the common.js file:
/catalog/view/javascript/common.js
in the first two functions (see comments):
/* Search */
$('.button-search').bind('click', function() {
url = 'index.php?route=product/search';
url += '&filter_description=true'; // add this to search descriptions
url += '&filter_sub_category=true'; // add this to search sub-categories
var filter_name = $('input[name=\'filter_name\']').attr('value')
if (filter_name) {
url += '&filter_name=' + encodeURIComponent(filter_name);
}
location = url;
});
$('#header input[name=\'filter_name\']').keydown(function(e) {
if (e.keyCode == 13) {
url = 'index.php?route=product/search';
url += '&filter_description=true'; // add this to search descriptions
url += '&filter_sub_category=true'; // add this to search sub-categories
var filter_name = $('input[name=\'filter_name\']').attr('value')
if (filter_name) {
url += '&filter_name=' + encodeURIComponent(filter_name);
}
location = url;
}
});
/catalog/view/javascript/common.js
in the first two functions (see comments):
/* Search */
$('.button-search').bind('click', function() {
url = 'index.php?route=product/search';
url += '&filter_description=true'; // add this to search descriptions
url += '&filter_sub_category=true'; // add this to search sub-categories
var filter_name = $('input[name=\'filter_name\']').attr('value')
if (filter_name) {
url += '&filter_name=' + encodeURIComponent(filter_name);
}
location = url;
});
$('#header input[name=\'filter_name\']').keydown(function(e) {
if (e.keyCode == 13) {
url = 'index.php?route=product/search';
url += '&filter_description=true'; // add this to search descriptions
url += '&filter_sub_category=true'; // add this to search sub-categories
var filter_name = $('input[name=\'filter_name\']').attr('value')
if (filter_name) {
url += '&filter_name=' + encodeURIComponent(filter_name);
}
location = url;
}
});
Is there any way of altering the common.js file to include the manufacteres name within th search. Ie if I search for gillette all of the products in that manufacturere show up.
Regards
Nigel
Regards
Nigel
You might want to try adding:
&filter_manufacturer=true
to the url (as per above post).
(But I have not tested this).
&filter_manufacturer=true
to the url (as per above post).
(But I have not tested this).
Thanks Kyle
I had already tried that, it doesn't work. I don't understand the search system well enough to be able to work out where it pulls the info from. It's doing my nut in.
thanks for responding though .
Nigel
I had already tried that, it doesn't work. I don't understand the search system well enough to be able to work out where it pulls the info from. It's doing my nut in.
thanks for responding though .
Nigel
(weird, I thought I posted a reply a couple of days ago - I guess it got lost in the ether.. )
Yes, I had a look at it. It won't work. The only reason the other ones worked, was because that functionality was already defined for use on the search results page.
To search by manufacturer you would need to write in that functionality - add it to the sql query and update the php in the model and controller. Not something I can figure out off the top of my head..
Maybe there's a plugin out there that does it?
Yes, I had a look at it. It won't work. The only reason the other ones worked, was because that functionality was already defined for use on the search results page.
To search by manufacturer you would need to write in that functionality - add it to the sql query and update the php in the model and controller. Not something I can figure out off the top of my head..
Maybe there's a plugin out there that does it?
Hi Kyle , thanks for that, thought it may be a bit more complex. Typical
I have looked for a plugin or mod but to no avail, not sure if I have the skills to sort it but will have to give it a go.
Cheers
Nigel
I have looked for a plugin or mod but to no avail, not sure if I have the skills to sort it but will have to give it a go.
Cheers
Nigel
Who is online
Users browsing this forum: No registered users and 319 guests