Open catalog/controller/common/header.php
Immediately after the line protected function index() { on a new line, put
$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); }
Then go to the current theme and create a file in the catalog/view/your-theme/stylesheet/ folder called product_category.css and put your styles in it. Style sheets work with your route name, except that you replace the slash with an underscore and then .css , i.e. common/home becomes common_home.css
Note that this will use the override method instead of replacing your default stylesheet
source share