Komano Posted October 6, 2013 Share Posted October 6, 2013 I was wondering about modifying the default prestashop theme and i actually am not sure how i can add custom php files. Basically if the user clicks login i want it to be redirected to login.php and such for other pages also. How do i do this? Link to comment Share on other sites More sharing options...
vekia Posted October 7, 2013 Share Posted October 7, 2013 hello if you want to edit theme you don't have to edit php files just edit .tpl files located in your theme directory the same with modules customization - just edit .tpl files (not core php) Link to comment Share on other sites More sharing options...
Martin Uker K Posted October 7, 2013 Share Posted October 7, 2013 Depends all on the level of application you want to edit Komano, the logic can be edited in the Controllers (By doing an override), the view can be edited by doing and override in your theme or by editing the view itself. Model can be edited by overriding the class. Prestashop is in MVC design, with an override feature. I would also like to point and insist on what Darth Vekia said : NEVER (that's a dark side way of using Prestashop) edit the core php file. Martin Link to comment Share on other sites More sharing options...
Komano Posted October 7, 2013 Author Share Posted October 7, 2013 I see. So if i want to change the layout of certain pages all i have to edit are the tpl files and not add any additional php files is that what you are saying? Link to comment Share on other sites More sharing options...
Martin Uker K Posted October 7, 2013 Share Posted October 7, 2013 Layout (HTML): TPL, yeah. Changing the way to load data (PHP) : Controller. Data object : Model. Martin Link to comment Share on other sites More sharing options...
vekia Posted October 8, 2013 Share Posted October 8, 2013 I see. So if i want to change the layout of certain pages all i have to edit are the tpl files and not add any additional php files is that what you are saying? that's correct, if you want to change appearance of your page - only tpl and css files, nothin more 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