SEO-URLS für Produktkategorien

Hallo,

[B]kann mir bitte jemand sagen, in welcher Tabelle die fixierten SEO-URLS für die Produktkategorien gespeichert sind?[/B] Ich habe bei den meissten Kategorien eine feste URL vergeben. Nur schreibt mir irgendwas immer die SEO-URLs um. Aus irgendeinem Grund wird dann hinter das Verzeichnis ein Ordner mit Zahl (vermutlich Anzahl der Seiten in der Kategorie) gehangen. Wenn ich es überschreibe nimmt er es erst mal an. Bin ich das nächste Mal im Admin, hängt wieder die Zahl dran. Dadurch stimmt dann die erzeugte sitemap nicht. :frowning:

Hi,

so wie hier?
http://www.erotik-toys.de/dildos/3/

Gruß

Jetzt kommt 1000 € Frage: Wer hat sich auf der Beispielseite von Marco URL angeschaut? :slight_smile:

[QUOTE=Marco Steinhaeuser;116541]Hi,

so wie hier?
http://www.erotik-toys.de/dildos/3/

Gruß[/QUOTE]

Nein, das soll ja da so sein. Er macht es im Admin unter Reiter SEO bei der fixierten URL der jeweiligen Kategorie. Und dann natürlich auch in der erzeugten Sitemap für google. Statt die erste Seite dann zu listen, erscheint dann z.B. www.domain.de/kategorie/2/

evtl https://bugs.oxid-esales.com/view.php?id=3776

[QUOTE=leofonic;116701]evtl https://bugs.oxid-esales.com/view.php?id=3776[/QUOTE]

Klingt passend. Mir ist nur nicht klar, was ich jetzt genau machen muss. Kann mir bitte jemand kurz sagen wie ich das beheben kann? Wo muss ich was ändern?

updaten?

Auf welcher Version stehst Du denn gerade?

Ich kann leider nicht updaten. Wir haben zuviel geändert.

Hier mal meine der vielleicht betreffende Abschnitt in der oxseoencoder.php:

/**
 * check if seo url exist and is fixed
 *
 * @param string $sType               object type
 * @param string $sId                 object identifier
 * @param int    $iLang               active language id
 * @param mixed  $iShopId             active shop id
 * @param string $sParams             additional seo params. optional (mostly used for db indexing)
 * @param bool   $blStrictParamsCheck strict parameters check
 *
 * @access protected
 *
 * @return bool
 */
protected function _isFixed( $sType, $sId, $iLang, $iShopId = null, $sParams = null, $blStrictParamsCheck = true)
{
    $oDb = oxDb::getDb( true );
    if ( $iShopId === null ) {
        $iShopId = $this->getConfig()->getShopId();
    }

    $iLang = (int) $iLang;

    $sQ = "select oxfixed from oxseo where oxtype = ".$oDb->quote( $sType )."
           and oxobjectid = ".$oDb->quote( $sId ) ." and oxshopid = ".$oDb->quote( $iShopId )." and oxlang = '{$iLang}'";

    $sParams = $sParams ? $sParams : '';
    if ( $sParams && $blStrictParamsCheck ) {
        $sQ .= " and oxparams = '{$sParams}'";
    } else {
        $sQ .= " order by oxparams = '{$sParams}' desc";
    }
    $sQ .= " limit 1";

    return (bool) $oDb->getOne( $sQ );
}

/**
 * _loadFromDb loads data from oxseo table if exists
 * returns oxseo url
 *
 * @param string $sType               object type
 * @param string $sId                 object identifier
 * @param int    $iLang               active language id
 * @param mixed  $iShopId             active shop id
 * @param string $sParams             additional seo params. optional (mostly used for db indexing)
 * @param bool   $blStrictParamsCheck strict parameters check
 *
 * @access protected
 *
 * @return string || false
 */
protected function _loadFromDb( $sType, $sId, $iLang, $iShopId = null, $sParams = null, $blStrictParamsCheck = true)
{
    $oDb = oxDb::getDb( true );
    if ( $iShopId === null ) {
        $iShopId = $this->getConfig()->getShopId();
    }

    $iLang = (int) $iLang;

    $sQ = "select oxfixed, oxseourl, oxexpired, oxtype from oxseo where oxtype = ".$oDb->quote( $sType )."
           and oxobjectid = ".$oDb->quote( $sId ) ." and oxshopid = ".$oDb->quote( $iShopId )." and oxlang = '{$iLang}'";

    $sParams = $sParams ? $sParams : '';
    if ( $sParams && $blStrictParamsCheck ) {
        $sQ .= " and oxparams = '{$sParams}'";
    } else {
        $sQ .= " order by oxparams = '{$sParams}' desc";
    }
    $sQ .= " limit 1";

    // caching to avoid same queries..
    $sIdent = md5($sQ);
    if ( isset( $this->_aSeoCache[$sIdent] ) ) {
        return $this->_aSeoCache[$sIdent];
    }

    $sSeoUrl = false;
    $oRs = $oDb->execute( $sQ );
    if ( $oRs && $oRs->recordCount() > 0 && !$oRs->EOF ) {
        // moving expired static urls to history ..
        if ( $oRs->fields['oxexpired'] && ( $oRs->fields['oxtype'] == 'static' || $oRs->fields['oxtype'] == 'dynamic' ) ) {
            // if expired - copying to history, marking as not expired
            $this->_copyToHistory( $sId, $iShopId, $iLang );
            $oDb->execute( "update oxseo set oxexpired = 0 where oxobjectid = ".$oDb->quote( $sId )." and oxlang = '{$iLang}'" );
            $sSeoUrl = $oRs->fields['oxseourl'];
        } elseif ( !$oRs->fields['oxexpired'] || $oRs->fields['oxfixed'] ) {
            // if seo url is available and is valid
            $sSeoUrl = $oRs->fields['oxseourl'];
        }

        // store cache
        $this->_aSeoCache[$sIdent] = $sSeoUrl;
    }
    return $sSeoUrl;
}