View Issue Details

IDProjectCategoryView StatusLast Update
0002866OXID eShop (all versions)4.07. Source code, Testpublic2012-12-10 13:44
Reportertjungcl Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version4.5.0 revision 34568 
Fixed in Version4.5.6 revision 40808 
Summary0002866: cachekey not configurable without extending every existing view
Descriptionif you modify the shop with a module that uses more cache-relevant parameters that those that already exist now, it is very hard to extend the ViewId without overwriting oxubase.php.
(To do so, you would have to extends every frontend view.)

So the getViewId function should include a user configurable logic (e.g. by calling a function from functions.php)
TagsNo tags attached.
ThemeBoth
BrowserAll
PHP Versionany
Database Versionany

Activities

tjungcl

2011-05-11 11:43

reporter   ~0004543

Last edited: 2011-05-11 11:45

suggested realization:
the getViewId function in oxubase.php could end

  [...]
  if (function_exists("extendViewId")) $this->_sViewId .= extendViewId();
  return $this->_sViewId;
}

Now every module can easily extend the view id by defining extendViewId in the user functions, e.g.:

function extendViewId(){
  $oDb = getdb();
  $sUserID = $oDb->quote(oxSession::getVar( 'usr' ));
  $aRow = $oDb->getRow("select something from oxuser where oxid = $sUserID");
  return "|" . $aRow[0];
}

birute_meilutyte

2011-05-12 13:33

reporter   ~0004550

@developers: check from source code side if such issue exist and if offered solution can be useful

mindaugas.rimgaila

2011-12-19 14:54

reporter   ~0005511

For adding custom ViewId text for all views, create function "customGetViewId" in modules/functions.php file.