protected function _redirectToSubcategory(&$seoParams) { if ($this->_schema->getRedirectToSubcategory() && isset($seoParams['cat'])) { if (in_array($this->_routePath, array('catalog/category/view', 'cms/index/index'))) { $this->_routePath = 'catalog/category/view'; $this->_routeParams['id'] = $seoParams['cat']['category_id']; $this->_pageType = $this->_getPageType($this->_routePath); $this->_suffix = $this->_pageType->getCurrentSuffix(); $this->_pageUrlKey = $this->_pageType->getUrlKey($this); unset($seoParams['cat']); } } return $this; }
/** * @param Mana_Seo_Model_ParsedUrl $token * @param int $categoryId * @return bool */ protected function _setCategoryFilter($token, $categoryId) { $cParameterAlreadyMet = Mana_Seo_Model_ParsedUrl::CORRECT_PARAMETER_ALREADY_MET; $cRedirectToSubcategory = Mana_Seo_Model_ParsedUrl::CORRECT_REDIRECT_TO_SUBCATEGORY; if ($this->_schema->getRedirectToSubcategory() && $token->getIsRedirectToSubcategoryPossible()) { $token->removeParameter('id')->addParameter('id', $categoryId); return $this->_redirect($token, $cRedirectToSubcategory, __LINE__, $token->getText()); } if ($token->hasQueryParameter('cat')) { return $this->_correct($token, $cParameterAlreadyMet, __LINE__, 'cat'); } $token->addQueryParameter('cat', $categoryId); return true; }