Post by shahzadalikhan » Fri Aug 28, 2020 10:47 pm

Hello, I am using opencart 3.0.3.2 with Journal 3 theme, When I search any product name for example "bmw x5" and press enter at keyboard it does not find any product, but if I click on search icon at the search bar via mouse, then it shows the relevant product. I also have many broken tags links at Dashboard, people online and can see many links which are tags searched but not found, I have checked at product and tags are there. Can anyone help me fix the issue? my wesbite link is sigmacarstereo.com
Thanks in advance!


Posts

Joined
Thu Apr 09, 2020 11:13 pm

Post by IP_CAM » Sat Aug 29, 2020 5:46 pm

Journal is a commercial Extension, offered/sold 'outside' of
OpenCart.com only. You therefore better contact Journal Support
on such: https://support.journal-theme.com
Or then, get paid Support, by posting such in the commercial
Section of this Forum.

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by letxobnav » Sat Aug 29, 2020 8:02 pm

well, default OC uses this:

Code: Select all

	$('#search input[name=\'search\']').on('keydown', function(e) {
		if (e.keyCode == 13) {
			$('header #search input[name=\'search\']').parent().find('button').trigger('click');
		}
	});
your journal thought it best to override that with this:

Code: Select all

    $(document).bind('keypress', function(e) {
      if(e.keyCode==13){
          $('#button-filter').trigger('click');
       }
  });
followed by:

Code: Select all

$('#button-filter').on('click', function() {

  var url = window.location.href;
  var url2 = url.split( '&' )[0];

  var url3 = '';
  var url3 = url3+'index.php?route=product/category';

  if (url2 ==url3) {
    var url = url;
  }else{
    var url = 'index.php?route=product/search';
  }
  .............bla, bla bla
  location = url;
  });
  
I am pretty bad at js but I suspect that whenever you press enter it triggers your filter button and not your search button and there it does not take the search term with it and that is by ..... design.

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by JNeuhoff » Sat Aug 29, 2020 8:33 pm

As IP_CAM said, Journal3 is not supported by OpenCart. Journal3 is not a standard compliant proper web theme, hence your best bet is to get in touch with the Journal support, or post it on the commercial support section here.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by JNeuhoff » Sat Aug 29, 2020 9:07 pm

letxobnav wrote:
Sat Aug 29, 2020 8:02 pm
I am pretty bad at js but I suspect that whenever you press enter it triggers your filter button and not your search button and there it does not take the search term with it and that is by ..... design.
I can see these 3 keydown events for his <input name="search" type="text" ...> element:

Code: Select all

	$('#search input[name=\'search\']').on('keydown', function(e) {
		if (e.keyCode == 13) {
			$('heder #search input[name=\'search\']').parent().find('button').trigger('click');
		}
	});

Code: Select all

	$search.on('keydown', function (e) {
		if (e.keyCode === 13) {
			$('.search-button').trigger('click');
		}
	})

Code: Select all

	function() {
		return a.apply(b || this, e.concat(d.call(arguments)))
	}
Of these the first one looks wrong, there is no heder element! It should probably read header. And either the 1st or 2nd one is redundant. Journal3 has plenty of bloated Javascript.
Last edited by JNeuhoff on Sat Aug 29, 2020 9:20 pm, edited 1 time in total.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by khnaz35 » Sat Aug 29, 2020 9:11 pm

Did he modifed anything himself in the code?
On journal demo enter key is working properly.
https://www.journal-theme.com/8/

Got an urgent question that’s keeping you up at night? There might just be a magical inbox ready to help: khnaz35@gmail.com
Enjoy nature ;) :) :-*


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia

Post by letxobnav » Sat Aug 29, 2020 9:46 pm

I can see these 3 keydown events
on the search page maybe, not on the home page, that only has one.

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by letxobnav » Sat Aug 29, 2020 9:47 pm

Did he modifed anything himself in the code?
maybe it is part of that filter module which screws with the normal search.

in any event, 70% of all devices are touchscreen nowadays and they have no enter key so just let it go.

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan
Who is online

Users browsing this forum: No registered users and 6 guests