src/ShopBundle/objects/WebModules/MTShopPageMetaCore/MTShopPageMetaCore.class.php
protected function GetMetaCanonical()
    {
        $sCanonical = '';
        $shopService = $this->getShopService();
        $oShopItem = $shopService->getActiveProduct();
        /** @var $oShopItem TdbShopArticle */
        if ($oShopItem) {
            $oCat = $oShopItem->GetPrimaryCategory();
            $iCat = '';
            if ($oCat) {
                $iCat = $oCat->id;
            }
            $sCanonical = $oShopItem->GetDetailLink(true, $iCat);
        } else {
            $category = $shopService->getActiveCategory();
            if ($category) {
                $currentPage = $this->getInputFilterUtil()->getFilteredInput(TdbShopArticleList::URL_LIST_CURRENT_PAGE, 0);
                $additionalParam = array();
                if (0 !== $currentPage) {
                    $additionalParam = array(TdbShopArticleList::URL_LIST_CURRENT_PAGE => $currentPage);
                }
                $activePage = $this->getActivePageService()->getActivePage();

                return $activePage->GetRealURLPlain($additionalParam, true);
            }
            $sCanonical = parent::GetMetaCanonical();
        }

        return $sCanonical;
    }
protected function GetMetaCanonical()
    {
        $sCanonical = '';
        $shopService = $this->getShopService();
        $oShopItem = $shopService->getActiveProduct();
        /** @var $oShopItem TdbShopArticle */
        if ($oShopItem) {
            $oCat = $oShopItem->GetPrimaryCategory();
            $iCat = '';
            if ($oCat) {
                $iCat = $oCat->id;
            }
            $sCanonical = $oShopItem->GetDetailLink(true, $iCat);
        } else {
            $category = $shopService->getActiveCategory();
            if ($category) {
                $currentPage = $this->getInputFilterUtil()->getFilteredInput(TdbShopArticleList::URL_LIST_CURRENT_PAGE, 0);
                $additionalParam = array();
                if (0 !== $currentPage) {
                    $additionalParam = array(TdbShopArticleList::URL_LIST_CURRENT_PAGE => $currentPage);
                }
                $activePage = $this->getActivePageService()->getActivePage();

                return $activePage->GetRealURLPlain($additionalParam, true);
            }
            $sCanonical = parent::GetMetaCanonical();
        }

        return $sCanonical;
    }
protected function GetMetaCanonical ( ) { $ sCanonical = '' ; $ shopService = $ this -> getShopService ( ) ; $ oShopItem = $ shopService -> getActiveProduct ( ) ; /** @var $oShopItem TdbShopArticle */ if ( $ oShopItem ) { $ oCat = $ oShopItem -> GetPrimaryCategory ( ) ; $ iCat = '' ; if ( $ oCat ) { $ iCat = $ oCat -> id ; } $ sCanonical = $ oShopItem -> GetDetailLink ( true , $ iCat ) ; } else { $ category = $ shopService -> getActiveCategory ( ) ; if ( $ category ) { $ currentPage = $ this -> getInputFilterUtil ( ) -> getFilteredInput ( TdbShopArticleList :: URL_LIST_CURRENT_PAGE , 0 ) ; $ additionalParam = array ( ) ; if ( 0 !== $ currentPage ) { $ additionalParam = array ( TdbShopArticleList :: URL_LIST_CURRENT_PAGE => $ currentPage ) ; } $ activePage = $ this -> getActivePageService ( ) -> getActivePage ( ) ; return $ activePage -> GetRealURLPlain ( $ additionalParam , true ) ; } $ sCanonical = parent :: GetMetaCanonical ( ) ; } return $ sCanonical ; }
return the canonical URL for the page.

@return string
return the canonical URL for the page .