
hi
1. in /admin/controller/catalog/product.php insert after
protected function getList() {
this code
$this->load->model('catalog/category');
$filter_data = array(
'sort' => 'name',
'order' => 'ASC'
);
$data['categories'] = $this->model_catalog_category->getCategories($filter_data);
and replace line
$data['products'][] = array(
to
$category = $this->model_catalog_product->getProductCategories($result['product_id']);
$data['products'][] = array('category' => $category,
2. in /admin/view/template/catalog/product_list.tpl insert after
<td class="text-left"><?php echo $product['model']; ?></td>
this code
<td class="text-left">
<?php foreach ($categories as $category) { ?>
<?php if (in_array($category['category_id'], $product['category'])) { ?>
<?php echo $category['name'];?><br>
<?php } ?>
<?php } ?></td>
1. in /admin/controller/catalog/product.php insert after
protected function getList() {
this code
$this->load->model('catalog/category');
$filter_data = array(
'sort' => 'name',
'order' => 'ASC'
);
$data['categories'] = $this->model_catalog_category->getCategories($filter_data);
and replace line
$data['products'][] = array(
to
$category = $this->model_catalog_product->getProductCategories($result['product_id']);
$data['products'][] = array('category' => $category,
2. in /admin/view/template/catalog/product_list.tpl insert after
<td class="text-left"><?php echo $product['model']; ?></td>
this code
<td class="text-left">
<?php foreach ($categories as $category) { ?>
<?php if (in_array($category['category_id'], $product['category'])) { ?>
<?php echo $category['name'];?><br>
<?php } ?>
<?php } ?></td>
Who is online
Users browsing this forum: No registered users and 33 guests