hali6sic6 Posted January 26, 2013 Share Posted January 26, 2013 Hi, everyone I am searching for a nice prestashop template tutorial! Until know I was creating new themes by copying the default theme and modifying it.. And know I would like to know exactly how a prestashop theme works and how to create one from scratch (empty folder).. Can someone help me out? I would like something like this: http://www.techietip...p-13-theme.html (unfortunately it's for version 1.3 and i would like one for version 1.5.5) PS: I'm willing to write the tutorial my self is someone can at least explain what are the essential parts and hooks needed to create a basic theme. Link to comment Share on other sites More sharing options...
El Patron Posted January 26, 2013 Share Posted January 26, 2013 start here with 1.4 tutorial http://doc.prestashop.com/display/PS14/Coding+a+theme then review impacts with 1.5 http://doc.prestashop.com/display/PS15/Changes+in+version+1.5+which+impact+theme+development 2 Link to comment Share on other sites More sharing options...
hali6sic6 Posted January 26, 2013 Author Share Posted January 26, 2013 I'm on it Elpatron, I will try to create a blank template with only the hooks and i will write comments (explaining what each hook is calling) in the .tpt files instead of divs.. BTW: Is there a list with the necessary hooks for prestashop theme? Link to comment Share on other sites More sharing options...
El Patron Posted January 26, 2013 Share Posted January 26, 2013 here is a list of the existing 1.5 hooks. http://doc.prestashop.com/display/PS15/Hooks+in+PrestaShop+1.5 one can also create dynamic hooks via modules...I've not done a theme but I think it's very interesting....make sure to make the theme ps 'compliant', i.e installs and un-installs from the ps theme installer....make it load and unload without problem.....that is key...also make sure to check out responsive theme design...and look at performance... good luck! 1 Link to comment Share on other sites More sharing options...
hali6sic6 Posted January 26, 2013 Author Share Posted January 26, 2013 I started to experiment with view hooks to understand it better... Do i need to use anything else other than hooks to display information or i just call the hook and style it in CSS? Link to comment Share on other sites More sharing options...
El Patron Posted January 26, 2013 Share Posted January 26, 2013 modules hook themselves, they are then called by ps when the hook is found in templates and/or classes... this is how they hook into your template...if you use say the 1.5.3+ template...this will give you an idea of what hooks to include....and how 2 Link to comment Share on other sites More sharing options...
hali6sic6 Posted January 26, 2013 Author Share Posted January 26, 2013 This will take a long time... I can't wait to finish... I think i'm going to strip down everything from the default theme and use that as an absulut blank theme.. i will upload it after i finish.... If thers any more information you think it would help please share and thank you for helping! Link to comment Share on other sites More sharing options...
El Patron Posted January 26, 2013 Share Posted January 26, 2013 yes, back up back up back up 1 Link to comment Share on other sites More sharing options...
NemoPS Posted January 26, 2013 Share Posted January 26, 2013 Just to give out my .02: I wouldn't start "from scratch" with prestashop. We can do it with Wordpress, as we can use a barely customized html page as a template for it, but with Presta things are different. Many variables are assigned in the templates themeselves, along with complex computations (such as product combinations, prices etc). It would require ages to build a proper template out of a blank page. My suggestions, which is also the path I always follow, is to mockup your design, erase all the css related to the default theme (a backup of course) and code that one nstead, adjusting html blocks where needed. This is not the optimal way of doing things, but it's the only choice prestashop gives us. or so I think, but if anyone knows a better way, please LET-US-KNOW! 3 Link to comment Share on other sites More sharing options...
hali6sic6 Posted January 27, 2013 Author Share Posted January 27, 2013 (edited) Yes.. it's quite hard to build a blank theme for prestashop (I'm not advancing very well).. But the problem is that I need the possibility to use bootstrap or simple css if i like and not be grounded to the default look of prestashop.. So I'm trying ti make a starter theme that you don't have to strip down and lose a lot of time with it.. Edited January 27, 2013 by hali6sic6 (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted January 28, 2013 Share Posted January 28, 2013 (edited) Well, I'm using bootstrap right now for a theme, and the only thing I had to do with tpl was changing the class names for columns Indeed, Prestashop's templating structure is really poor, and should be made more flexible and extendeble Edited January 28, 2013 by Nemo1 (see edit history) 1 Link to comment Share on other sites More sharing options...
hali6sic6 Posted January 28, 2013 Author Share Posted January 28, 2013 Good idea Nemo1! but the default prestashop template activates a mobile version of the theme.. How do you delete the entire mobile thing? Link to comment Share on other sites More sharing options...
NemoPS Posted January 28, 2013 Share Posted January 28, 2013 By deleting the mobile folder.... or disabling it from the back office, under theme options Link to comment Share on other sites More sharing options...
hali6sic6 Posted January 28, 2013 Author Share Posted January 28, 2013 I will certainly come up with something of starter theme that I will submit to the community but I need time and as much information as possible. I just hate the fact that its based on smarty.. Is there any way to change the template engine or something like that? Link to comment Share on other sites More sharing options...
NemoPS Posted January 28, 2013 Share Posted January 28, 2013 Nah, I'd drop that Idea, it' used for the back office too. A template system is not bad ...IF properly used yeah, IF! You'll hardly get some information on prestashop, I just discovered the developers introduced a new way to add new hooks... by chance. This is ridiculous! It's not even mentioned in the docs 1 Link to comment Share on other sites More sharing options...
El Patron Posted January 28, 2013 Share Posted January 28, 2013 Nah, I'd drop that Idea, it' used for the back office too. A template system is not bad ...IF properly used yeah, IF! You'll hardly get some information on prestashop, I just discovered the developers introduced a new way to add new hooks... by chance. This is ridiculous! It's not even mentioned in the docs this about dynamic hooks? Link to comment Share on other sites More sharing options...
NemoPS Posted January 28, 2013 Share Posted January 28, 2013 Uh... can't remember the name actually, I mean the {hook h='nameofhthook'} syntax I came across in the forums Link to comment Share on other sites More sharing options...
hali6sic6 Posted January 28, 2013 Author Share Posted January 28, 2013 This is horrible an commerce solution with 5stars with a templating system with 1start.. this depresses me Link to comment Share on other sites More sharing options...
hali6sic6 Posted January 29, 2013 Author Share Posted January 29, 2013 I'm getting closer to the finish line.. it takes a lot of time to handle all the hooks and styling them.. i'd really like Prestashop to have a templating system similar to Wordpress or Joomla.... Link to comment Share on other sites More sharing options...
hali6sic6 Posted January 29, 2013 Author Share Posted January 29, 2013 I find some good info on themplating here... Cant wait to show my work... Link to comment Share on other sites More sharing options...
NemoPS Posted January 29, 2013 Share Posted January 29, 2013 Can't wait to see the result I'll sure test this once it's ready (and once I have time!) Link to comment Share on other sites More sharing options...
hali6sic6 Posted February 5, 2013 Author Share Posted February 5, 2013 Is it possible to insert block directly in theme instead of hook? Like in picture: Link to comment Share on other sites More sharing options...
djit Posted March 6, 2013 Share Posted March 6, 2013 I've tried *very hard* to build a theme from scratch using bootstrap: I'm still stuck 2 weeks later. Getting around smarty's conditional, global.css, modules' css, modules' js, hacks to display modules in other blocks than their default one (moving shopping cart in the header drove me crazy ) is a real pain. There's too much logic scattered across many files. I think you're better off starting with the default theme and overriding whatever you need with your custom css files. 1 Link to comment Share on other sites More sharing options...
NemoPS Posted March 6, 2013 Share Posted March 6, 2013 I've tried *very hard* to build a theme from scratch using bootstrap: I'm still stuck 2 weeks later. Getting around smarty's conditional, global.css, modules' css, modules' js, hacks to display modules in other blocks than their default one (moving shopping cart in the header drove me crazy ) is a real pain. There's too much logic scattered across many files. I think you're better off starting with the default theme and overriding whatever you need with your custom css files. Agreed. Plus, I just found out that the compass extension known as "susy" is great for responsive themes with prestashop. I've used it a couple of time with success so far 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