@zion
To add the "noindex" attribute to OpenCart filters, you need to modify the code in a couple of files. Here's a step-by-step guide:
- Open the file "catalog/controller/product/category.php" in a code editor.
- Locate the line of code that looks like this:
$this->document->setTitle($category_info['meta_title']);
- Below this line, add the following code:
if(isset($this->request->get['filter'])) {
$this->document->addMeta('robots', 'noindex');
}
This code checks if any filters are applied in the category page, and if so, adds the "noindex" attribute to the HTML meta tag.
- Save the file.
That's it! Now, when filters are applied, the category page will have the "noindex" attribute, preventing search engines from indexing those pages.
Note: Make sure to clear your OpenCart cache or refresh the modification cache for the changes to take effect.