tper Posted January 12, 2016 Share Posted January 12, 2016 (edited) Hi, I need to override this file: \modules\my_module\views\js\back.js Where do I need to create another back.js to make override? I tried: \themes\my_theme\js\modules\my_module\views\js\back.js - not working which is strange because for \modules\my_module\views\js\front.js - it works Edited January 12, 2016 by tper (see edit history) Link to comment Share on other sites More sharing options...
bellini13 Posted January 12, 2016 Share Posted January 12, 2016 this depends on how back.js is being added to the page header or html content. please show how the module adds back.js and compare that to how the module adds front.js Link to comment Share on other sites More sharing options...
tper Posted January 12, 2016 Author Share Posted January 12, 2016 Hi bellini13, thx for your replay. I searched module for back.js and front.js and only results are in \modules\livechatpro\livechatpro.php: For back.js: public function hookBackOfficeHeader($params){ ... $media .= '<script type="text/javascript">'.$this->context->smarty->fetch(dirname(__FILE__).'/views/js/assigned_vars_back.js').'</script> <script type="text/javascript">'.$this->context->smarty->fetch(dirname(__FILE__).'/views/templates/admin/translations.js.tpl').'</script> ';//<script src="'.$this->_path.'views/js/back.js"></script> $this->context->controller->addJS($this->_path.'views/js/back.js'); ... } public function syncChatDialog($plus_media = false, $display = false) { ... if ($plus_media == true) { $media .= '<script src="'.$this->_path.'views/js/back.js"></script>'; ... } ... } For front.js public function hookHeader() { ... $media .= '<script type="text/javascript">'.$this->context->smarty->fetch(dirname(__FILE__).'/views/js/assigned_vars_front.js').'</script> <script type="text/javascript">'.$this->context->smarty->fetch(dirname(__FILE__).'/views/templates/admin/translations.js.tpl').'</script> ';//<script src="'.$this->_path.'views/js/front.js"></script> $this->context->controller->addJS($this->_path.'views/js/front.js'); ... } public function syncFrontChatDialog($plus_media = false, $display = false) { ... $media .= '<script type="text/javascript">'.$this->context->smarty->fetch(dirname(__FILE__).'/views/js/assigned_vars_front.js').'</script> <script type="text/javascript">'.$this->context->smarty->fetch(dirname(__FILE__).'/views/templates/admin/translations.js.tpl').'</script> <script src="'.$this->_path.'views/js/front.js"></script> ... } Link to comment Share on other sites More sharing options...
bellini13 Posted January 12, 2016 Share Posted January 12, 2016 oh, i see. back.js is javascript used in the back office. You can't override this like you can for the front office. The back office does not load anything in the /themes folder Link to comment Share on other sites More sharing options...
tper Posted January 12, 2016 Author Share Posted January 12, 2016 Ok, thx for letting me know. Without that info I would be searching for solution to this, simply wasting time... I'm rather new to PS and this is strange behavior Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now