waldocosman Posted November 26, 2012 Share Posted November 26, 2012 (edited) Hi, I'm new to Prestashop, so that's why I'm asking this question: I would like to change the renderView function of the AdminCustomersController. I saw that there is an override function possibility, but I don't get it working. Is it possible to add the renderView function to the AdminCustomsersController (in the override folder), so it uses the regular view, but where you can add specific variables to the template? i.e. (this doesn't work but maybe you get my point) class AdminCustomersController extends AdminCustomersControllerCore { public function renderView() { parent::renderView(); $this->tpl_view_vars["var"] = "text or var"; return parent::renderView(); } } Thanks in advance Edited November 26, 2012 by waldocosman (see edit history) Link to comment Share on other sites More sharing options...
Alex Simonchik BelVG Posted November 26, 2012 Share Posted November 26, 2012 Hi, why did you overrided AdminController instead of AdminCustomersController? Also i think that you will have to duplicate the code from AdminCustomersController::renderView() but instead return parent::renderView() will use return AdminController::renderView() Regards Link to comment Share on other sites More sharing options...
waldocosman Posted November 26, 2012 Author Share Posted November 26, 2012 I made a typo indeed, it had to be AdminCustomersController instead of AdminController (is changed meanwhile). I also thought I had to duplicate the code, but forgot about to use the AdminController::renderView() instead of the parent. 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