source/Core/SeoDecoder.php
protected function _getSeoUrl($sObjectId, $iLang, $iShopId)
    {
        $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb(\OxidEsales\Eshop\Core\DatabaseProvider::FETCH_MODE_ASSOC);
        $aInfo = $oDb->getRow("select oxseourl, oxtype from oxseo where oxobjectid =  " . $oDb->quote($sObjectId) . " and oxlang =  " . $oDb->quote($iLang) . " and oxshopid = " . $oDb->quote($iShopId) . " order by oxparams limit 1");
        if ('oxarticle' == $aInfo['oxtype']) {
            $sMainCatId = $oDb->getOne("select oxcatnid from " . getViewName("oxobject2category") . " where oxobjectid = " . $oDb->quote($sObjectId) . " order by oxtime");
            if ($sMainCatId) {
                $sUrl = $oDb->getOne("select oxseourl from oxseo where oxobjectid =  " . $oDb->quote($sObjectId) . " and oxlang =  " . $oDb->quote($iLang) . " and oxshopid = " . $oDb->quote($iShopId) . " and oxparams = " . $oDb->quote($sMainCatId) . "  order by oxexpired");
                if ($sUrl) {
                    return $sUrl;
                }
            }
        }

        return $aInfo['oxseourl'];
    }
protected function _getSeoUrl($sObjectId, $iLang, $iShopId)
    {
        $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb(\OxidEsales\Eshop\Core\DatabaseProvider::FETCH_MODE_ASSOC);
        $aInfo = $oDb->getRow("select oxseourl, oxtype from oxseo where oxobjectid =  " . $oDb->quote($sObjectId) . " and oxlang =  " . $oDb->quote($iLang) . " and oxshopid = " . $oDb->quote($iShopId) . " order by oxparams limit 1");
        if ('oxarticle' == $aInfo['oxtype']) {
            $sMainCatId = $oDb->getOne("select oxcatnid from " . getViewName("oxobject2category") . " where oxobjectid = " . $oDb->quote($sObjectId) . " order by oxtime");
            if ($sMainCatId) {
                $sUrl = $oDb->getOne("select oxseourl from oxseo where oxobjectid =  " . $oDb->quote($sObjectId) . " and oxlang =  " . $oDb->quote($iLang) . " and oxshopid = " . $oDb->quote($iShopId) . " and oxparams = " . $oDb->quote($sMainCatId) . "  order by oxexpired");
                if ($sUrl) {
                    return $sUrl;
                }
            }
        }

        return $aInfo['oxseourl'];
    }
protected function _getSeoUrl ( $ sObjectId , $ iLang , $ iShopId ) { $ oDb = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: FETCH_MODE_ASSOC ) ; $ aInfo = $ oDb -> getRow ( "select oxseourl, oxtype from oxseo where oxobjectid =  " . $ oDb -> quote ( $ sObjectId ) . " and oxlang =  " . $ oDb -> quote ( $ iLang ) . " and oxshopid = " . $ oDb -> quote ( $ iShopId ) . " order by oxparams limit 1" ) ; if ( 'oxarticle' == $ aInfo [ 'oxtype' ] ) { $ sMainCatId = $ oDb -> getOne ( "select oxcatnid from " . getViewName ( "oxobject2category" ) . " where oxobjectid = " . $ oDb -> quote ( $ sObjectId ) . " order by oxtime" ) ; if ( $ sMainCatId ) { $ sUrl = $ oDb -> getOne ( "select oxseourl from oxseo where oxobjectid =  " . $ oDb -> quote ( $ sObjectId ) . " and oxlang =  " . $ oDb -> quote ( $ iLang ) . " and oxshopid = " . $ oDb -> quote ( $ iShopId ) . " and oxparams = " . $ oDb -> quote ( $ sMainCatId ) . "  order by oxexpired" ) ; if ( $ sUrl ) { return $ sUrl ; } } } return $ aInfo [ 'oxseourl' ] ; }
retrieve SEO url by its object id
normally used for getting the redirect url from seo history

@param string $sObjectId object id
@param int    $iLang     language to fetch
@param int    $iShopId   shop id

@return string
retrieve SEO url by its object id normally used for getting the redirect url from seo history