打开catalog/controller/common/header.php
右后
在新的一行行protected function index() {
把
$route = empty($this->request->get['route']) ? 'common/home' : $this->request->get['route'];
$css_file = str_replace('/', '_', $route) . '.css';
if(file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/stylesheet/' . $css_file)) {
$this->document->addStyle('catalog/view/theme/' . $this->config->get('config_template'). '/stylesheet/' . $css_file);
}
然后转到您当前的主题,并创建一个文件catalog/view/your-theme/stylesheet/
文件夹名为product_category.css
,并将你的风格放在t帽子。样式表工作过你的路线名称,除非你更换正斜杠为下划线其次.css
,即common/home
成为common_home.css
注意,是将要使用的替代方法,而不是更换默认样式
这肯定会加入核心代码是一件好事。 –