tabutnas Posted June 1, 2013 Share Posted June 1, 2013 Hello, i am learning how override class by module, works if override some class on /prestashop/overrider/etc/etc.php but in module this don't work... thanks in advance Link to comment Share on other sites More sharing options...
Piotr Kaczor Posted June 1, 2013 Share Posted June 1, 2013 Hi, You need to delete file /cache/class_index.php, it will be regenerated and new added override files will start working. 1 Link to comment Share on other sites More sharing options...
tabutnas Posted June 1, 2013 Author Share Posted June 1, 2013 (edited) thanks i do it and works well , but i have some questions; why i need file index.php on all dirs? example modules/overriderTest/override/controllers/index.php modules/overriderTest/override/controllers/front/index.php modules/overriderTest/override/controllers/front/OrderController.php index.php -> content header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); header("Location: ../"); exit; And i can overrider .tpl files of theme/default? thanks in advance Edited June 1, 2013 by tabutnas (see edit history) Link to comment Share on other sites More sharing options...
Piotr Kaczor Posted June 1, 2013 Share Posted June 1, 2013 (edited) It's for security reason, when someone manually go to URI like http:// domain/modules/overriderTest/override/controllers/front/ index.php file will redirect him one folder back and again and again and again so that person dont see files on server but will be redirected to Home page That part will do that: header("Location: ../"); If you want to edit Default theme the best way is to create new one from default files. Go to BackOffice -> Preferences -> Themes -> Add New and check Copy files from default theme. Then set Your new theme as active. Edited June 1, 2013 by Piotr Kaczor (see edit history) 2 Link to comment Share on other sites More sharing options...
tabutnas Posted June 6, 2013 Author Share Posted June 6, 2013 i do it replacing $this->setTemplate(_PS_THEME_DIR_.'authentication.tpl'); for $this->setTemplate($_SERVER['DOCUMENT_ROOT'].__PS_BASE_URI__.'modules/module_test/template/authentication.tpl'); . My modification AuthController.php copy well on overrider/controller/front/... But prestashop not use my authController.php modification, prestashop use original AuthController.php :S. What i can do for prestashop use Authcontroller.php of dir /override/ ??? Code of override --> log.belvg.com/how-to-make-an-override-in-your-module.html thanks in advance Link to comment Share on other sites More sharing options...
tabutnas Posted June 6, 2013 Author Share Posted June 6, 2013 (edited) solved , like u said i need delete /cache/class_index.php mmm don't how mark solve post :/ Edited June 6, 2013 by tabutnas (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted June 6, 2013 Share Posted June 6, 2013 hello instructions here: Furthermore if you are the author of the topic for which a solution has been found, please edit your topic title to mark it as [sOLVED]. To mark a topic as [solved] : - Edit the first post of your topic by clicking on the "Edit" button, - Click on the "Use full editor" button, - Add the "[solved]" string at the beginning of your topic title and click on the "Submit Modified Post" button. i'm going to mark this thread as [solved] but if you will follow these steps in the future - we will be really grateful regards 1 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