protected function prepareTargetPath(array $category)
    {

        // query whether or not, the category is the root category
        if ($this->isRootCategory($category)) {
            $targetPath = sprintf('catalog/product/view/id/%d', $this->entityId);
        } else {
            $targetPath = sprintf('catalog/product/view/id/%d/category/%d', $this->entityId, $category[MemberNames::ENTITY_ID]);
        }

        // return the target path
        return $targetPath;
    }