catalog/controller/product/manufacturer.php
(开头部分) 13KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
class ControllerProductManufacturer extends Controller {
public function index() {
$this->load->language('product/manufacturer');
$this->load->model('catalog/manufacturer');
$this->document->setTitle($this->language->get('heading_title'));
$data['breadcrumbs'] = array();
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/home')
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_brand'),
'href' => $this->url->link('product/manufacturer')
);
$this->load->model('tool/image');
$data['categories'] = array();
$results = $this->model_catalog_manufacturer->getManufacturers();
foreach ($results as $result) {
if (is_numeric(utf8_substr($result['name'], 0, 1))) {
$key = '0 - 9';
} else {
$key = utf8_substr(utf8_strtoupper($result['name']), 0, 1);
}
if (!isset($data['categories'][$key])) {
$data['categories'][$key]['name'] = $key;
}
$data['categories'][$key]['manufacturer'][] = array(
'name' => $result['name'],
'thumb' => $this->model_tool_image->resize($result['image']),
'href' => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $result['manufacturer_id'])
);
}
$data['continue'] = $this->url->link('common/home');
$data['column_left'] = $this->load->controller('common/column_left');
$data['column_right'] = $this->load->controller('common/column_right');
$data['content_top'] = $this->load->controller('common/content_top');
$data['content_bottom'] = $this->load->controller('common/content_bottom');
$data['footer'] = $this->load->controller('common/footer');
$data['header'] = $this->load->controller('common/header');
$this->response->setOutput($this->load->view('product/manufacturer_list', $data));
}
public function info() {
$this->load->language('product/manufacturer');
$this->load->model('catalog/manufacturer');
后面还有 308 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
