Ceased working after working with same version? Did you make custom changes of any type of upgrade anything?techhelp wrote:15.1.3.
Autocomplete function for all drop downs has ceased working such as featured, attributes, product serach etc. Is there a way of enabling this or installing over the original without effecting the store
This was just released. It will solve your issues by removing the auto complete:
http://www.opencart.com/index.php?route ... on_id=9366
http://www.opencart.com/index.php?route ... on_id=9366
I use version 1.5.5.1, after much search, finally this is working for me. Go to your directory folder open admin/model/catalog/product.php.
Now depending on the version you're using in my version on line 671 you will find
if (!empty($data['filter_name'])) {
$sql .= " AND pd.name LIKE ' " . $this->db->escape($data['filter_name']) . "%'";
}
Simply add symbol % between the single and double quotation mark immediately after LIKE.
BEFORE looks like this:
if (!empty($data['filter_name'])) {
$sql .= " AND pd.name LIKE ' " . $this->db->escape($data['filter_name']) . "%'";
}
AFTER looks like this:
if (!empty($data['filter_name'])) {
$sql .= " AND pd.name LIKE '%" . $this->db->escape($data['filter_name']) . "%'";
}
Save it back. It enhances the work of auto complete. GoodLuck.
Now depending on the version you're using in my version on line 671 you will find
if (!empty($data['filter_name'])) {
$sql .= " AND pd.name LIKE ' " . $this->db->escape($data['filter_name']) . "%'";
}
Simply add symbol % between the single and double quotation mark immediately after LIKE.
BEFORE looks like this:
if (!empty($data['filter_name'])) {
$sql .= " AND pd.name LIKE ' " . $this->db->escape($data['filter_name']) . "%'";
}
AFTER looks like this:
if (!empty($data['filter_name'])) {
$sql .= " AND pd.name LIKE '%" . $this->db->escape($data['filter_name']) . "%'";
}
Save it back. It enhances the work of auto complete. GoodLuck.
This helped me tonight. I was having trouble getting dashes and slashes to show up in the category list (eg. 1-8 scale or 1/8 scale). My change was in a different place, but the same idea. Thanks for posting this! I have just installed v1.5.4.
Line 211.
( I got the line number by searching for ".name LIKE" )
Before:
After: (the % just after the single quote after the LIKE)
Line 211.
( I got the line number by searching for ".name LIKE" )
Before:
Code: Select all
if (!empty($data['filter_name'])) {
$sql .= " AND cd2.name LIKE '%" . $this->db->escape($da$
}
Code: Select all
if (!empty($data['filter_name'])) {
$sql .= " AND cd2.name LIKE '%" . $this->db->escape($da$
}
After upgrade from 1.5.2.0 to 1.5.6.1 autocomplete was not working for me too (no related, no manufacturers, no categories, no options). My solution was this:
go to these files:
admin/model/catalog/product.php
admin/model/catalog/category.php
admin/model/catalog/manufacturer.php
admin/model/catalog/attribute.php
admin/model/catalog/download.php
admin/model/catalog/filter.php
admin/model/catalog/option.php
find code:
add % in quotes after LIKE.
Your code should look like this:
Please note, edit mentioned files.
In my opinion, this opencart autocomplete feature is not perfect and sometimes headache. Assigning product to manufacturer I should write case sensitive as You added manufacturer (for example, I added manufacturer Lego, so if I want asign product to this manufacturer and enter "le" it doesn't displays this manufacturer..).
go to these files:
admin/model/catalog/product.php
admin/model/catalog/category.php
admin/model/catalog/manufacturer.php
admin/model/catalog/attribute.php
admin/model/catalog/download.php
admin/model/catalog/filter.php
admin/model/catalog/option.php
find code:
Code: Select all
... name LIKE '" . $this->db->escape($data['filter_name']) . "%'"
Your code should look like this:
Code: Select all
... name LIKE '%" . $this->db->escape($data['filter_name']) . "%'"
In my opinion, this opencart autocomplete feature is not perfect and sometimes headache. Assigning product to manufacturer I should write case sensitive as You added manufacturer (for example, I added manufacturer Lego, so if I want asign product to this manufacturer and enter "le" it doesn't displays this manufacturer..).
Who is online
Users browsing this forum: Amazon [Bot], Semrush [Bot] and 27 guests