Page 1 of 1
Autocomplete fields not working in Admin
Posted: Mon Nov 07, 2011 6:14 am
by madorangepanda
Hello,
None of the autocomplete fields are working for me in my admin interface. For instance in adding related products.
The following errors are showing though I am unsure as to what steps I should take next to correct this.
index.php:876 Uncaught TypeError: Object [object Object] has no method 'autocomplete'
index.php:933 Uncaught TypeError: Cannot read property 'autocomplete' of undefined
index.php:983 Uncaught TypeError: Object [object Object] has no method 'catcomplete'
index.php:1240 Uncaught TypeError: Object [object Object] has no method 'datepicker'
index.php:950 Uncaught TypeError: Object [object Object] has no method 'catcomplete'
Thanks in advance for any help.
Edit:Version 1.5.1.3 and it is upgraded not a clean install.
Re: Autocomplete fields not working in Admin
Posted: Mon Nov 07, 2011 7:07 am
by madorangepanda
Solved, for some reason my header.tpl was pointing to
view/javascript/jquery/ui/jquery-ui-1.8.9.custom.min.js
view/javascript/jquery/ui/themes/ui-lightness/jquery-ui-1.8.9.custom.css
When it should of been
view/javascript/jquery/ui/jquery-ui-1.8.16.custom.min.js
view/javascript/jquery/ui/themes/ui-lightness/jquery-ui-1.8.16.custom.css
Re: Autocomplete fields not working in Admin
Posted: Wed Jan 25, 2012 7:46 am
by milky
Thanks for coming back and posting the solution. Worked for me.
Re: Autocomplete fields not working in Admin
Posted: Mon May 14, 2012 3:37 pm
by platypuspuzzles
Any other suggests? This didn't work for me as my header.tpl already contains 1.8.16
Re: Autocomplete fields not working in Admin
Posted: Mon Jun 11, 2012 12:44 pm
by lmw1
Mine says 1.8.16 and isn't working either. Does anyone have any advice on how to get autocomplete to working, it's halting my progress.
Respectfully,
Len
Re: Autocomplete fields not working in Admin
Posted: Thu Jul 12, 2012 7:04 pm
by futurestudios
Hey Len,
Did you get this sorted I have the same and its bugging me to death .. I assume its a clash of js somewhere from an installed module .. I will keep looking .. maybe if we both list what mods we are using we might find some clues ?
Richie
Re: Autocomplete fields not working in Admin
Posted: Thu Jul 12, 2012 7:30 pm
by futurestudios
Len,
Sometimes I miss the simple things looking for the really complex things ..
I now find when I imported my CSV of products (client supplied) into opencart ALL their product names had a space in front of them .. if I type [space] in the autocomplete field ... BOOM all my products are there.
I hope this post helps !!
All the Best
Richie
Re: Autocomplete fields not working in Admin
Posted: Fri Aug 31, 2012 4:29 am
by fabiobesouro
Hi! First sorry for my english! I will try to comunicate!
The solution made here don´t work with me. No space or theme problems!
I have de 1.5.2.1 version.
In a moment they work on my cellphone, but now don´t work in any device or browser! :/
Re: Autocomplete fields not working in Admin
Posted: Thu Nov 08, 2012 7:07 pm
by carbon-uk
Same problem here opencart 1.5.1.3
Firebug Info this happens on every kepresss:
Code: Select all
Uncaught TypeError: Cannot read property 'length' of null jquery-1.6.1.min.js:16
e.extend.map jquery-1.6.1.min.js:16
jQuery.ajax.success index.php:704
e.resolveWith jquery-1.6.1.min.js:16
w jquery-1.6.1.min.js:18
d
header.tpl
Code: Select all
<script type="text/javascript" src="view/javascript/jquery/ui/jquery-ui-1.8.16.custom.min.js"></script>
<script type="text/javascript" src="view/javascript/jquery/jquery-1.6.1.min.js"></script>
<link rel="stylesheet" type="text/css" href="view/javascript/jquery/ui/themes/ui-lightness/jquery-ui-1.8.16.custom.css" />
<script type="text/javascript" src="view/javascript/jquery/ui/external/jquery.bgiframe-2.1.2.js"></script>
<script type="text/javascript" src="view/javascript/jquery/tabs.js"></script>
<script type="text/javascript" src="view/javascript/jquery/superfish/js/superfish.js"></script>
<?php foreach ($scripts as $script) { ?>
<script type="text/javascript" src="<?php echo $script; ?>"></script>
<?php } ?>
<script type="text/javascript">
Products will not autocomplete throughout site. I'm guess this is a jquery conflict but any help would be appreciated.
Thanks.
Re: Autocomplete fields not working in Admin[FIX]
Posted: Tue Nov 13, 2012 4:20 pm
by carbon-uk
Further to this I found a solution for my problem although I haven't sorted the root of the problem yet.
The problem is in admin/controller/catalog/product/product.php
The problem is loading the json library so if you change the end of the file to this:
Code: Select all
}
echo json_encode($json);
//$this->load->library('json');
//$this->response->setOutput(Json::encode($json));
}
}
?>
The json is returned and the feature works.
Hope this helps somebody and if anybody can help why the json library is not working that would be great.
Re: Autocomplete fields not working in Admin
Posted: Fri Dec 21, 2012 5:48 am
by subdivide
You should set this to:
Code: Select all
$this->response->setOutput(json_encode($json));
Re: Autocomplete fields not working in Admin
Posted: Thu Jun 13, 2013 1:17 pm
by storyresources
I have 1.5.5.1 installed and having the same trouble I have checked and do have the code above, so any other ideas would be great please
Carolyn
Re: Autocomplete fields not working in Admin
Posted: Mon Oct 28, 2013 3:38 pm
by iNuxx
my autocomplete did not work in admin and fronted. hope to get some help.
Have gone through the above.
Re: Autocomplete fields not working in Admin
Posted: Sat Dec 28, 2013 3:38 am
by RNRF
Someone ? Im on 1.5.1.3.1 :S
Re: Autocomplete fields not working in Admin
Posted: Fri Feb 28, 2014 12:01 pm
by redsushi
The trouble is that the limit of items displayed in the autocomplete box is 20. You can change that value to whatever you want by edit the following php file :
/ admin / controller / catalog / category.php
Change the 20 value to whatever you need (E.G. 30)
public function autocomplete() {
$json = array();
if (isset($this->request->get['filter_name'])) {
$this->load->model('catalog/category');
$data = array(
'filter_name' => $this->request->get['filter_name'],
'start' => 0,
'limit' => 30
Re: Autocomplete fields not working in Admin
Posted: Tue Mar 11, 2014 6:19 am
by tomjy
When i try to classify some products to their categories in Links, my problem is some categories can not be auto-completed and filtered out when entering the first character, but some can.
Firstly, I think maybe it's caused by too small 'limit', but it's helpless when i changed it to be bigger as 130.
At last, I came to know it's caused by there is one blank space at the beginning of the Category name.
Once I remove this blank space, all categories can be auto completed.
cheers
tom
Re: Autocomplete fields not working in Admin
Posted: Mon May 21, 2018 12:39 pm
by motion2082
Thank you you're a superstar
