Page 1 of 1
Autocomplete limit - Edit Product > Links > Categories
Posted: Mon Mar 09, 2015 4:20 pm
by jasonc310771
I am trying to increase the autocomplete list for the categories when I add/edit a product. I tried to create a vqmod, and this changed the limit in admin/controller/catalog/product.php but this did not show more in the list, still only 5. I them completely removed the lines...
Code: Select all
if (isset($this->request->get['limit'])) {
$limit = $this->request->get['limit'];
} else {
$limit = 5;
}
and replaced with
as the code suggested that something in the first part was 'set' and meant that my limit was not increased at all. But still it is not increasing. Is there another admin option to change this without needing to use vqmod. ?
Firstly is this the right file to vqmod to increase the limit for the categories I add to a product ?
And if it is, what am I doing wrong ?
Also out of interest, where is the script that does the actual filtering of categories as I would like to alter this too at some point.
Re: Autocomplete limit - Edit Product > Links > Categories
Posted: Mon Mar 09, 2015 4:39 pm
by jasonc310771
I have a feeling that the filter is not working as I thought it would. I am only getting a few options 2 or three to choose from so the limit may not be the issue with this. But still want to increase it anyway.
I am wanting to add multiple categories to products, like so...
categories...
Blue Heeler
Mens
Safety
Blue Heeler > Mens
Mens > Blue Heeler
Blue Heeler > Safety
Safety > Blue Heeler
Mens > Safety
All of these are present in the categories list.
But when I try to add...
Safety > Mens
it does not show in teh autocomplete list.
Mens with the parent of Safety is in the categories but never shows up.
I type in Safety and get just three of whats already in the list.
I type in Mens and get 5 of the other categories some of which are already in the list.
I currently have 8 categories for this product. and wish to add the 9th.
What could I be doing wrong ?
Re: Autocomplete limit - Edit Product > Links > Categories
Posted: Thu Feb 04, 2016 11:22 am
by paveldiaz1
Dear,
Having the same problem, did you find any solution?
Re: Autocomplete limit - Edit Product > Links > Categories
Posted: Wed Feb 10, 2016 1:42 am
by dazoosh
You need to edit this value in /admin/controller/catalog/filter.php not product.php.
Re: Autocomplete limit - Edit Product > Links > Categories
Posted: Fri Mar 25, 2016 11:28 pm
by Rezman
I had this and I had to modify the
/admin/controller/catalog/category.php file.
Lint 589
Code: Select all
$filter_data = array(
'filter_name' => $this->request->get['filter_name'],
'sort' => 'name',
'order' => 'ASC',
'start' => 0,
'limit' => 5 // Increase this to get more results in the autocomplete dropdown. 25 seems like a better value.
);
Re: Autocomplete limit - Edit Product > Links > Categories
Posted: Fri Mar 25, 2016 11:50 pm
by OSWorX
A quick search in the extension store, will bring you all that free module:
Admin List Limit
The limit is based on the value you define for admins in the system settings.
Re: Autocomplete limit - Edit Product > Links > Categories
Posted: Thu Oct 20, 2016 2:26 pm
by trendigo
The solution posted by Rezman worked for me in OpenCart 2.2.0.0. Thanks for posting!
Re: Autocomplete limit - Edit Product > Links > Categories
Posted: Mon Nov 11, 2019 1:39 pm
by Vector224
Rezman wrote: ↑Fri Mar 25, 2016 11:28 pm
I had this and I had to modify the
/admin/controller/catalog/category.php file.
Lint 589
Code: Select all
$filter_data = array(
'filter_name' => $this->request->get['filter_name'],
'sort' => 'name',
'order' => 'ASC',
'start' => 0,
'limit' => 5 // Increase this to get more results in the autocomplete dropdown. 25 seems like a better value.
);
Finally! Thanks a lot!