Hi,
In the product listing view, you can get the current category ID from the URL parameter using:
$category_id = hikaInput::get()->getInt('cid');
If you want to get the category object with its name:
if(!defined('DS')) define('DS',DIRECTORY_SEPARATOR);
if(!include_once(rtrim(JPATH_ADMINISTRATOR,DS).DS.'components'.DS.'com_hikashop'.DS.'helpers'.DS.'helper.php')) return;
$category_id = hikaInput::get()->getInt('cid');
if(!empty($category_id)) {
$categoryClass = hikashop_get('class.category');
$category = $categoryClass->get($category_id);
echo $category->category_name;
}Note that if you are in the context of a HikaShop view file (like a listing template), the category ID is often already available in the $this->pageInfo->filter->cid variable.