There are 2 main categories in which there are goods. Goods have attributes (color, collection). How to make a link to the category with filtering by attribute in the product page?
Now i use:
public function getCategory()
{
$category = $this->categoryRepository->get(3, $this->storeManager->getStore()->getId());
return $category->getUrl();
}