Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Frontend search returns No results - Fix
#1
Search returns no results at "index.php?route=product/search" (frontend).

Solution:
Open "catalog\view\theme\default\template\product\search.tpl"

Line 161 (omit the quotes): 
"var search = $('#content input[name=\'search\']').attr('value');"
Change to (omit the quotes):
"var search = $('#content input[name=\'search\']').prop('value');"

Line 170 (omit the quotes):
"var category_id = $('#content select[name=\'category_id\']').attr('value');"
Change to (omit the quotes):
"var category_id = $('#content select[name=\'category_id\']').prop('value');"

And the issue is fixed...
Reply
#2
(06-10-2018, 08:09 PM)Sp1ke Wrote: Search returns no results at "index.php?route=product/search" (frontend).

Solution:
Open "catalog\view\theme\default\template\product\search.tpl"

Line 161 (omit the quotes): 
"var search = $('#content input[name=\'search\']').attr('value');"
Change to (omit the quotes):
"var search = $('#content input[name=\'search\']').prop('value');"

Line 170 (omit the quotes):
"var category_id = $('#content select[name=\'category_id\']').attr('value');"
Change to (omit the quotes):
"var category_id = $('#content select[name=\'category_id\']').prop('value');"

And the issue is fixed...

@Sp1ke It's better to post all bug reports on GitHub, as it's easier for the developer to check and fix them.

Thanks!
Reply
#3
I have now made the changes on Github.

Thanks
OpenCart Overclocked Edition Lead developer
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)