View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002088 | OXID eShop (all versions) | 2. ----- eShop backend (admin) ----- | public | 2010-09-08 16:18 | 2010-09-29 17:09 |
Reporter | aggrosoft | Assigned To | |||
Priority | high | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | no change required | ||
Product Version | 4.4.2 revision 29492 | ||||
Summary | 0002088: oxUtilsView::getTemplateDirs does not work correct in admin area | ||||
Description | While developing a special extension for backend orders a problem arises. When the E-Mail processor parses the mail template he will always use the template stored in the "basic" folder even if the shop runs a special sThisTemplate. I don't see any reason why the following if condition exists in oxUtilsView::getTemplateDirs() if ( !$this->isAdmin() ) { $this->setTemplateDir( $myConfig->getOutDir( true ) . $myConfig->getConfigParam( 'sTheme' ) . "/tpl/" ); } The if condition could be removed as far as I see this to overcome this limitation. Or is there any reason why this doesn't search for templates in the backend? | ||||
Tags | No tags attached. | ||||
Theme | |||||
Browser | All | ||||
PHP Version | any | ||||
Database Version | any | ||||
|
Workaround would be to do the following before sending the mails: //Dodge 0002088 $myConfig = oxConfig::getInstance(); if($myConfig->getConfigParam( 'sTheme' ) != ''){ $oUtilsView = oxUtilsView::getInstance(); $oUtilsView->setTemplateDir( $myConfig->getOutDir( true ) . $myConfig->getConfigParam( 'sTheme' ) . "/tpl/" ); } |
|
@Developers: please check from the source code side if this is the case as described and fix if so. |
|
When sending emails from admin (e.g. order email to shop owner), oxemail class uses $this->setBody( $oSmarty->fetch( $myConfig->getTemplatePath( $this->_sOrderOwnerTemplate, false ) ) ); for getting email body. $myConfig->getTemplatePath() returns path which includes custom theme dir name (which you set in config.inc.php: $this->sTheme). So for getting emails from custom theme in admin, use $myConfig->getTemplatePath( template_name, false ) |