View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000826 | OXID eShop (all versions) | 4.09. SEO, SEO URL | public | 2009-04-24 08:27 | 2012-12-10 13:35 |
Reporter | dainius.bigelis | Assigned To | |||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 4.1.1 revision 18442 | ||||
Fixed in Version | 4.1.2 revision 18998 | ||||
Summary | 0000826: Parent-article title is not inherited for variant for SEO links generating | ||||
Description | Currently the SEO links for variant-articles are generated using the product ID, like: http://demoshop.oxid-esales.com/professional-edition/Geschenke/Wohnen/2077-01-orange.html This is due to parent-article is not inherited for variant in SEO urls generating. Please fix it so the title of parent-article also would be used for variant-articles SEO urls. | ||||
Tags | No tags attached. | ||||
Theme | |||||
Browser | All | ||||
PHP Version | 5.2.6 | ||||
Database Version | 5.0.33 | ||||
|
New urls now looks like: Parent: http://shop/Geschenke/Wohnen/Tischlampe-SPHERE.html Variants: http://shop/Geschenke/Wohnen/Tischlampe-SPHERE-orange.html http://shop/Geschenke/Wohnen/Tischlampe-SPHERE-rot.html http://shop/Geschenke/Wohnen/Tischlampe-SPHERE-violett.html Change in oxSeoEncoderArticle: /** * Product parent title cache * * @var array */ protected static $_aTitleCache = array(); /** * Returns seo title for current article (if oxtitle field is empty, oxartnum is used). * Additionally - if oxvarselect is set - title is appended with its value * * @param oxarticle $oArticle article object * * @return string */ protected function _prepareArticleTitle( $oArticle ) { $sTitle = ''; // create title part for uri if ( !( $sTitle = $oArticle->oxarticles__oxtitle->value ) ) { // taking parent article title if ( ( $sParentId = $oArticle->oxarticles__oxparentid->value ) ) { // looking in cache .. if ( !isset( self::$_aTitleCache[$sParentId] ) ) { $sQ = "select oxtitle from oxarticles where oxid = '{$sParentId}'"; self::$_aTitleCache[$sParentId] = oxDb::getDb()->getOne( $sQ ); } $sTitle = self::$_aTitleCache[$sParentId]; } } // variant has varselect value if ( $oArticle->oxarticles__oxvarselect->value ) { $sTitle .= ( $sTitle ? ' ' : '' ).$oArticle->oxarticles__oxvarselect->value . ' '; } // in case nothing was found - looking for number if ( !$sTitle ) { $sTitle .= $oArticle->oxarticles__oxartnum->value; } return $this->_prepareTitle( $sTitle . '.html' ); } |