public function AllowDisplayInShop()
    {
        $bShowCat = false;

        $oShop = TdbShop::GetInstance();
        if (!is_null($oShop) && !$oShop->fieldShowEmptyCategories) {
            $bShowCat = ($this->GetNumberOfArticlesInCategory(true) > 0);
        } else {
            $bShowCat = true;
        }

        if (false == $this->fieldActive || false == $this->fieldTreeActive) {
            $bShowCat = false;
        }

        $targetPage = $this->getTargetPage();
        if (null === $targetPage || false === $targetPage) {
            return true;
        }
        // show only if the user has access to the category target page
        if (false === $targetPage->AllowAccessByCurrentUser()) {
            return false;
        }

        return $bShowCat;
    }