Post by Johnno73 » Wed Apr 02, 2014 3:12 pm

Wondering if someone can help me with this.

I've searched the forums and all results (such as this: http://forum.opencart.com/viewtopic.php ... box#p28138) don't appear to be relevant for the latest version of OpenCart.

Some of the suggests I've found refer to the search.tpl file however no such file exists anymore as far as I can tell in catalog/view/theme/default/template/common

Newbie

Posts

Joined
Mon Mar 31, 2014 4:07 pm

Post by dimul » Wed Apr 02, 2014 7:34 pm

open common.js in catalog\view\javascript replace 'index.php?route=product/search' with 'index.php?route=product/search&description=true'

Regards,

Dian M Tanjung


New member

Posts

Joined
Sat Feb 01, 2014 5:01 pm
Location - Indonesia

Post by Johnno73 » Thu Apr 03, 2014 9:29 am

Thanks for the reply. I have edited the file, and there were two entries that I changed so my common.js now looks like so:

Code: Select all

$(document).ready(function() {
	/* Search */
	$('.button-search').bind('click', function() {
		url = $('base').attr('href') + 'index.php?route=product/search&description=true';
				 
		var search = $('input[name=\'search\']').attr('value');
		
		if (search) {
			url += '&search=' + encodeURIComponent(search);
		}
		
		location = url;
	});
	
	$('#header input[name=\'search\']').bind('keydown', function(e) {
		if (e.keyCode == 13) {
			url = $('base').attr('href') + 'index.php?route=product/search&description=true';
			 
			var search = $('input[name=\'search\']').attr('value');
			
			if (search) {
				url += '&search=' + encodeURIComponent(search);
			}
			
			location = url;
		}
	});
However it's still not working.

When the search returns nothing, if I check the "search in product descriptions" I do find the products though - so the information is there.

I should have mentioned from the outset that I have just installed the very latest version of OC 1.5.6.1 if that makes a different. I am also using another theme other than the default, but since the common.js file is not in one of the theme directories this shouldn't be an issue should it?

Any other ideas what might be going wrong?

Newbie

Posts

Joined
Mon Mar 31, 2014 4:07 pm

Post by dimul » Thu Apr 03, 2014 10:21 am

ctrl + f5 your browser (several times), may be still store in browser's chace. i'm use OC 1.5.6.1. if you search in home, url should contain '&description=true'.

Regards,

Dian M Tanjung


New member

Posts

Joined
Sat Feb 01, 2014 5:01 pm
Location - Indonesia

Post by Johnno73 » Thu Apr 03, 2014 10:23 am

That fixed it. Thanks very much for your help.

Newbie

Posts

Joined
Mon Mar 31, 2014 4:07 pm

Post by akincicakabey » Sat Feb 10, 2018 7:19 pm

merhabalar

opencart 1551 defult tema kullanıyorum arama seo url tag bir türlü yapamadım bana bu konuda yardım edebilecek arkadaşlar varmı

Newbie

Posts

Joined
Sat Feb 10, 2018 7:07 pm
Who is online

Users browsing this forum: No registered users and 119 guests