diff --git a/app/code/community/Inchoo/Alternate/Helper/Data.php b/app/code/community/Inchoo/Alternate/Helper/Data.php index 42df124..eb35361 100644 --- a/app/code/community/Inchoo/Alternate/Helper/Data.php +++ b/app/code/community/Inchoo/Alternate/Helper/Data.php @@ -14,5 +14,15 @@ public function rewrittenProductUrl($productId, $categoryId, $storeId) $coreUrl->loadByIdPath($idPath); return $coreUrl->getRequestPath(); } + + public function rewrittenCategoryUrl($categoryId, $storeId) + { + $coreUrl = Mage::getModel('core/url_rewrite'); + $idPath = sprintf('category/%d', $categoryId); + $coreUrl->setStoreId($storeId); + $coreUrl->loadByIdPath($idPath); + + return $coreUrl->getRequestPath(); + } }