public function categoryDataAccess($params, &$smarty)
    {
        $categoryId = $this->getRequest()->get('category_id');

        if ($categoryId === null) {
            $productId = $this->getRequest()->get('product_id');

            if ($productId !== null) {
                if (null !== $product = ProductQuery::create()->findPk($productId)) {
                    $categoryId = $product->getDefaultCategoryId();
                }
            }
        }

        if ($categoryId !== null) {
            return $this->dataAccessWithI18n(
                "Category",
                $params,
                CategoryQuery::create()->filterByPrimaryKey($categoryId)
            );
        }

        return '';
    }