Created
January 4, 2018 15:34
-
-
Save KristianH/8190345bc4b228f09683f6435de721be to your computer and use it in GitHub Desktop.
Override oxid eshop standard smarty plugins
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use OxidEsales\Eshop\Core\Registry; | |
// fill d3/modulename/Core/Smarty/Plugin/ with plugins like function.oxprice.php, function.oxcontent.php etc. | |
class d3_oxutilsview_modulename extends d3_oxutilsview_modulename_parent | |
{ | |
/** | |
* @param Smarty $oSmarty | |
* | |
* @return null|void | |
* @throws \OxidEsales\EshopCommunity\Core\oxFileException | |
*/ | |
protected function _fillCommonSmartyProperties($oSmarty) | |
{ | |
parent::_fillCommonSmartyProperties($oSmarty); | |
// add before current plugins directory: | |
array_unshift( | |
$oSmarty->plugins_dir, | |
Registry::getConfig()->getActiveView()->getViewConfig()->getModulePath('modulename') | |
. 'Core/Smarty/Plugin' | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment