Back to PhocacartCategoryMultiple class

Method getCurrentCategoryId

public static
getCurrentCategoryId
()

Method getCurrentCategoryId - Source code

public static function getCurrentCategoryId()
{
    $app = Factory::getApplication();
    $id = $app->input->get('id', 0, 'int');
    $catid = $app->input->get('catid', 0, 'int');
    $view = $app->input->get('view', '', 'string');
    $option = $app->input->get('option', '', 'string');
    if ($option == 'com_phocacart' && $view == 'category') {
        return $id;
    } else {
        if ($option == 'com_phocacart' && $view == 'item') {
            return $catid;
        }
    }
    return 0;
}