Hello.
I'd like to insert a new php function - method called getCategoryName.
This is the function:
public function getCategoryName( $id_category ){
$idLang = Context::getContext()->language->id;
$categoryObject = $this->getCategoryObject($id_category, $idLang);
return $categoryObject->name;
}
It happens that I don't know where to place it properly. I've actually placed it at the end of the classes/Link.php file. I think it is a mistake since it is part of the prestashop core and this method should be overridden.
Where should this method be overridden?