I have a problem with my OpenCart Version 2.0.2.0
When I enter in admin panel and choose to Create product in links when I click on Category I have a drop-down menu with my categories and sub-categories but in this menu I have only one category and four sub-categories. In my site I have 8 categories and 24 sub-categories. What is the problem and how can I resolve it.
Thanks in advance.
Sorry for my bad English.
When I enter in admin panel and choose to Create product in links when I click on Category I have a drop-down menu with my categories and sub-categories but in this menu I have only one category and four sub-categories. In my site I have 8 categories and 24 sub-categories. What is the problem and how can I resolve it.
Thanks in advance.
Sorry for my bad English.
It's not problem.
Continue entering name category and you get next list with autocomplete
or
find the next code in admin\controller\catalog\product.php
and change limit
or
find the next code in admin\view\template\catalog\product_form.tpl
and replace it with
Continue entering name category and you get next list with autocomplete
or
find the next code in admin\controller\catalog\product.php
Code: Select all
if (isset($this->request->get['limit'])) {
$limit = $this->request->get['limit'];
} else {
$limit = 5;
}
or
find the next code in admin\view\template\catalog\product_form.tpl
Code: Select all
url: 'index.php?route=catalog/option/autocomplete&token=<?php echo $token; ?>&filter_name=' + encodeURIComponent(request),
Code: Select all
url: 'index.php?route=catalog/option/autocomplete&limit=10token=<?php echo $token; ?>&filter_name=' + encodeURIComponent(request),
sorry
note!!! &limit=10
Code: Select all
// Category
$('input[name=\'category\']').autocomplete({
'source': function(request, response) {
$.ajax({
url: 'index.php?route=catalog/category/autocomplete&limit=10&token=<?php echo $token; ?>&filter_name=' + encodeURIComponent(request),
dataType: 'json',
success: function(json) {
response($.map(json, function(item) {
return {
label: item['name'],
value: item['category_id']
}
}));
}
});
},
'select': function(item) {
$('input[name=\'category\']').val('');
$('#product-category' + item['value']).remove();
$('#product-category').append('<div id="product-category' + item['value'] + '"><i class="fa fa-minus-circle"></i> ' + item['label'] + '<input type="hidden" name="product_category[]" value="' + item['value'] + '" /></div>');
}
});
sorry No2 
admin\controller\catalog\category.php
May be
or

admin\controller\catalog\category.php
Code: Select all
public function autocomplete() {
$filter_data = array(
'filter_name' => $this->request->get['filter_name'],
'sort' => 'name',
'order' => 'ASC',
'start' => 0,
'limit' => 5
);
Code: Select all
$filter_data = array(
'filter_name' => $this->request->get['filter_name'],
'sort' => 'name',
'order' => 'ASC',
'start' => 0,
'limit' => 10
);
or
Code: Select all
$filter_data = array(
'filter_name' => $this->request->get['filter_name'],
'sort' => 'name',
'order' => 'ASC',
'start' => 0,
'limit' => isset($this->request->get['limit'])?$this->request->get['limit']:5
);
Who is online
Users browsing this forum: Amazon [Bot] and 23 guests