15 lines
406 B
PHP
15 lines
406 B
PHP
<?php
|
|
class ControllerProductSearch extends Controller {
|
|
public function index() {
|
|
$this->load->model('catalog/category');
|
|
|
|
$categories = $this->model_catalog_category->getCategories(0);
|
|
|
|
if ($categories) {
|
|
$this->response->redirect($this->url->link('product/category', 'path=' . $categories[0]['category_id']));
|
|
} else {
|
|
$this->response->redirect($this->url->link('common/home'));
|
|
}
|
|
}
|
|
}
|