potski205 Posted February 8, 2010 Share Posted February 8, 2010 Hi,I wonder if anybody can help. In Internet Explorer, I keep getting the 'done but with errors on page' javascript syntax error. Having already searched the forum for a solution, I did find out that this is due to a problem with the autocomplete not being found for the JavaScript search function and the fact that I have transplanted the quicksearch module to the left column from the header. It is not an option for me to put it back to the top of page as the design requires it be in the left column. I also tried the solution posted here:http://www.prestashop.com/forums/viewthread/41777/configuring___using_prestashop/solved___search_query_dot_autocomplete_is_not_a_function_but inserting this script into the header.tpl did not fix the error.I would be really grateful if anybody could help me fix the Javascript error so I can keep the quicksearch in the left column and not have any errors appear in the IE. I think this is the troublesome code (error line starred): [removed] function formatSearch(row) { return row[2] + ' > ' + row[1]; } function redirectSearch(event, data, formatted) { $('#search_query').val(data[1]); document.location.href = data[3]; } $('document').ready( function() { $("#search_query").autocomplete( '/search.php', { minChars: 3, max:10, width:500, scroll: false, formatItem:formatSearch, ******** extraParams:{ajaxSearch:1,id_lang:} ***************** }).result(redirectSearch) }); [removed] I am not very experienced with JavaScript or Prestashop so any help with fixing this would be much appreciated. Thanks in advance. Link to comment Share on other sites More sharing options...
rocky Posted February 9, 2010 Share Posted February 9, 2010 There is a bug in the "v1.1 theme compatibility" that causes this problem. You need to add the following code after line 182 of init.php: 'cookie' => $cookie, Link to comment Share on other sites More sharing options...
potski205 Posted February 9, 2010 Author Share Posted February 9, 2010 Thank you so much, it worked. This has been driving me crazy for ages so your help is very much appreciated. Link to comment Share on other sites More sharing options...
BillyD Posted May 17, 2010 Share Posted May 17, 2010 There is a bug in the "v1.1 theme compatibility" that causes this problem. You need to add the following code after line 182 of init.php: 'cookie' => $cookie, I get this same error but only on my index page. I have added an extra hook to a top navbar that has a working search with autocomplete on all other pages. Link to comment Share on other sites More sharing options...
chetwyn Posted June 27, 2012 Share Posted June 27, 2012 (edited) I'm getting this error and I have know idea what's going on, it only happens in IE. Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; GTB6.6; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; LEN2; Alexa Toolbar) Timestamp: Wed, 27 Jun 2012 04:31:12 UTC Message: 'jQuery' is undefined Line: 1 Char: 1 Code: 0 URI: http://localhost/ico...autocomplete.js My config. Both are set to NO. Ajax search Yes No Enable ajax search for your visitors. With ajax search, the first 10 products matching the user query will appear in real time below the input field. Instant search: Yes No Enable instant search for your visitors. With instant search, the results will appear immediately as the user writes a query. It's happening on search_top Edited June 27, 2012 by chetwyn (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now