00001 <?php
00002
00006 class Manufacturer_Seo extends Object_Seo
00007 {
00008 public function render()
00009 {
00010 $this->_aViewData['blShowSuffixEdit'] = true;
00011 $this->_aViewData['blShowSuffix'] = $this->_getObject( oxConfig::getParameter( 'oxid' ) )->oxmanufacturers__oxshowsuffix->value;
00012
00013 return parent::render();
00014 }
00015
00025 protected function _getSeoDataSql( $oObject, $iShopId, $iLang )
00026 {
00027 return parent::_getSeoDataSql( $oObject, $iShopId, $iLang )." and oxparams = '' ";
00028 }
00029
00037 protected function _getSeoUrl( $oManufacturer )
00038 {
00039 oxSeoEncoderManufacturer::getInstance()->getManufacturerUrl( $oManufacturer );
00040 return parent::_getSeoUrl( $oManufacturer );
00041 }
00042
00048 protected function _getType()
00049 {
00050 return 'oxmanufacturer';
00051 }
00052
00058 public function save()
00059 {
00060 if ( $sOxid = oxConfig::getParameter( 'oxid' ) ) {
00061 $oManufacturer = oxNew( 'oxbase' );
00062 $oManufacturer->init( 'oxmanufacturers' );
00063 if ( $oManufacturer->load( $sOxid ) ) {
00064 $oManufacturer->oxmanufacturers__oxshowsuffix = new oxField( (int) oxConfig::getParameter( 'blShowSuffix' ) );
00065 $oManufacturer->save();
00066
00067
00068 oxSeoEncoderManufacturer::getInstance()->markAsExpired( $sOxid, $this->getConfig()->getShopId(), 1, $this->_iEditLang, "oxparams != '' " );
00069 }
00070 }
00071
00072 return parent::save();
00073 }
00074 }